gtvmarty
- 23rd September 2009, 07:01
Hi All,
I'm trying to find out what happens to the "SerIn" command when no valid data is present on the RS232 line.
For example:
Loop:
SerIn pin1,T9600,SerialData 'get serial data from Pin1,
'store it in variable "SerialData"
SerOut pin2,T9600,[SerialData] 'send the variable to a terminal to
'view the variable value on screen.
GoTo Loop 'do it forever.
If i press a key, i see the key appear on the screen.
But, while no keys are pressed (and the program is still looping), what value does the variable "SerialData" become?
I expected to see a column of say 0's to run down my screen, or at least the previous value of SerialData, but that doesnt happen.
It doesn't appear to be 0 and think it might be a null (alt-255) or is it just an idle DC level until data arrives?
What i'm trying to acheive is a condition that can tell the difference between 'active data' and 'no data'.
Hope this made sense???
Marty.
I'm trying to find out what happens to the "SerIn" command when no valid data is present on the RS232 line.
For example:
Loop:
SerIn pin1,T9600,SerialData 'get serial data from Pin1,
'store it in variable "SerialData"
SerOut pin2,T9600,[SerialData] 'send the variable to a terminal to
'view the variable value on screen.
GoTo Loop 'do it forever.
If i press a key, i see the key appear on the screen.
But, while no keys are pressed (and the program is still looping), what value does the variable "SerialData" become?
I expected to see a column of say 0's to run down my screen, or at least the previous value of SerialData, but that doesnt happen.
It doesn't appear to be 0 and think it might be a null (alt-255) or is it just an idle DC level until data arrives?
What i'm trying to acheive is a condition that can tell the difference between 'active data' and 'no data'.
Hope this made sense???
Marty.