loading
 
Display Serial Data
John Wood from United Kingdom  [67 posts]
9 year
Hi,
I have serial data displayed but it flashes on and off at the at the serial data refresh rate.
Is there a way I can hold the last data and keep it displayed until over written by the serial updated data, rather than flash.


Thanks John
Steven Gentner from United States  [1446 posts] 9 year
John,

Not sure what display mechanism you are using to cause the data to flash ... but if you use the Chart_Variables module that should be sufficient to see the data change over time. If not, can you include your robofile that you are using where you see this flashing?

http://www.roborealm.com/help/Chart_Variables.php

Thanks,
STeven.
John Wood from United Kingdom  [67 posts] 9 year
Hi Steven,
Here is the test .Robo file I am using.
The sent data from my pic is sent approx twice per second or slower. What I would like is the last data displayed to be shown while the next one arrives, rather than vanish as the pipe is looped...if that makes any sense...:-)



program.robo
Steven Gentner from United States  [1446 posts] 9 year
You were close ... the idea is that you only set another variable when the depth is non-zero. Since the serial module runs each time, if there isn't any new data that will set depth to zero and remove its value. See the attached robofile where a last_Depth variable is set which will not change until the Depth variable becomes non-zero.

Note, based on the way that you have the serial module, is there any delimiter that gets sent (i.e. newline) that you can add to that receive sequence? The reason I ask is that if you have a delimiter the timeout becomes less relevant since the module then knows to continue once the delimiter is seen. Otherwise, right now, it has to timeout before it assumes no additional data is being sent.

i.e. if the device can send

[DEPTH]<cr>

that will work better.

STeven.

program.robo
John Wood from United Kingdom  [67 posts] 9 year
Hi Steven,

Works perfectly, thanks once again for you quick response, much appreciated.

John

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