serial syntax
Roland from South Africa  [107 posts]
10 year


I'm looking at the serial interface and trying to understand the syntax.

In an older post;

there is the text;
"So you would have a VBScript module with

if GetVariable("COG_Y") > 100 then
  SetVariable "serial_cmd", "SS<cr>"
end if

and then in the Serial module you would have


as what gets sent to your serial device."

What I don't understand is where the text "SS<cr>" comes from. I can't find any reference to it's meaning or why it's there.

Also, are there any tutorials on receiving serial data?

Steven Gentner from United States  [1446 posts] 10 year

The "SS<cr>" is just a dummy example of something that you would want to send to a serial device. The actual content will depend on what your serial protocol is ... i.e. what you need to send to the device in order to have it do what you want. As this differs in EVERY serial device we can't put in examples without knowing what board and protocol is bring used.

What are you trying to send serial commands to?

Roland from South Africa  [107 posts] 10 year
Hi Steven

Thanks, I sort of figured that out after posting. Not being too familiar with VB syntax, I'm having a hard time understanding program examples.

My mechanics and electronics is essentially finished, and now I'm figuring out out how to get the roborealm work done. Components of the system are a VB program, RR, and three Pic boards controlling buttons, motors and solenoids, addressed through three USB ports. They use simple commands to perform tasks.

Essentially, an operator will select a test configuration, 1 of 18. This will be "choice", in VB and passed to RR. Control will be passed onto RR and it will trigger the robot motion.

Once the robot moves to vantage position 1 (of about 12), RR will read the robot position via the USB port, and result in a pass/fail for position 1 after applying the test. Each test will have to run through a bunch of if/then on the 'choice' and 'position' to enable the filters or not.

It looks like it is not possible to jump to, or conditionally skip filters in the RR program? I presume I would need to do that in a VB program, but haven't found enough detail on how to implement all the filters directly in a VB script.

So I suppose I'll copy and paste a huge matrix in VB to get all the possible permutations, and set a single variable to use on an if/then in RR

Make sense?



This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index