Live console / print information

2 weeks 5 days ago #29536282 by wstuck
I have a few scrips that I have been working on in MicroBasic but I need some help. Is there a live console for testing live signal data. I can run the simulation and enter data and everything looks fine. I can see the program changing the digital outputs in the software fine. I am not able the see the live get value command values in a print command anywhere. What am I missing? When I have used other microprocessors, I could watch the print values live to see the data values changing. I am sure it is user error.Basic Code:
' This script was written by Bill Stuck for Design Ability Inc 2023-05-19



print_Label:

Print("starting ... \r")
print(" \r")
Print("This script was written by Bill Stuck for Design Ability Inc 2023-05-19 \r")
print(" \r")
wait(1000) ' wait 1000 mS
print(" \r")

top: ' label header

POT01 = getvalue(_ANAIN, 6)

if(POT01 >= 2500) ' Read Analog 6 POT Value
    setcommand(_DSET, 1) ' Set digital output 1 on
    print("ON \r")
    print(" \r")
    setcommand(_DRES, 2) ' Reset digital output 2 off
    print("ON \r")
    print(" \r")
else
    setcommand(_DRES, 1) ' Reset digital output 1 off
    print("ON \r")
    print(" \r")
    setcommand(_DSET, 2) ' Set digital output 2 on
    print("ON \r")
    print(" \r")
end if
wait(1000) ' wait 1000 mS
goto top ' return to label header top:

 Thanks for your help. 

Please Log in or Create an account to join the conversation.

1 week 6 days ago #29536283 by jeremy.batson
Hello wstuck,

You can use the "Console" tab in Roborun+ to monitor any serial printed data. Additionally you can print the value of the Digital Output States by using the following command:
print("DO=", getvalue(_DO, 1), "\r")

Let me know if this answers your question.

With Kind Regards
Jeremy Batson
Field Application Engineer
The following user(s) said Thank You: wstuck

Please Log in or Create an account to join the conversation.

Time to create page: 0.050 seconds