Printing variables

7 years 3 months ago #29528130 by peterhebben
Printing variables was created by peterhebben
Hello,

I am using a MSG1600 and trying to output variables over the usb port.

Using the MagSensor Control utillity plain text strings work perfectly in both the simulator and on the actual sensor.

For instance:
Print_Label:
Print(\"Hello World!\")


Works perfectly, however:

For i = 0 AndWhile i <= 10 Evaluate i += 2
Print(i, \"\\n\")
Next


Works only in the simulator but not downloaded and ran on the actual sensor.

Can anyone help me to solve this problem?

Thank you

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

7 years 3 months ago #29528131 by roboteq
Replied by roboteq on topic Re:Printing variables
Your script works here. We tested on a motor controller and not a magsensor. But the way that the script interpreter works is identical.

What do you see on the console?

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

7 years 3 months ago #29528133 by peterhebben
Replied by peterhebben on topic Re:Printing variables
Thank you for the quick test and reply,

I located the problem, I did not set the script output port correctly.

The the thing that got me confused me is that if the output port is configured incorrect plain strings are printed but variables are not.

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

Time to create page: 0.122 seconds