RS-232 Component Macro

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Ron
Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times

RS-232 Component Macro

Post by Ron »

Hi,

How do you implement the timeout variable that we supply the macro?

I created a variable, in a Calculation block I put the following

RS232_RX_Timeout = 100 (Ben had previously suggested that I use 50 - 100ms in the event to know nothing has happened). I am assuming that by setting it = 100 this means 100ms in the RS232 macro.

The setiing = 100 is only executed once in a intializtion block.

Then I use the receive macro, under that I test for RS232_RX_Timeout = 255, if yes then nothing received for 100ms so do something for this case, if no, look to see what was received.

Is this how to implement the timeout variable?

Thanks

Ron

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Ron

The timeout variable goes into the dialogue box in the RS232 read component macro. Simply type 100 into the box for a delay of 100ms.

Post Reply