LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add multiple TermChar properties in property node

Hello all
 
I am communicating to a device via RS232 and most of the responses are terminated with  a <CRLF>.  but some of the commands are not terminated.  Can i use multiple termination char properties in the property node ?
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 1 of 4
(2,609 Views)
Usually, I set the termination settings before reading each command. If the command is terminated with <CRLF> then set the termchar to <LF> before reading the reply. Make a Read VI that will set or not  the termchar according to a boolean input.


Message Edité par Jean-Pierre Drolet le 07-19-2005 08:44 PM



LabVIEW, C'est LabVIEW

Message 2 of 4
(2,603 Views)
there is a <*> heartbeat command that is not terminated that is broadcast every second.  i want to ignore these heartbeats when expecting a response from other commands.  and there are other commands that are not terminated.  I can use your example for the other commands but what about the <*> ??
 
thanks
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 3 of 4
(2,585 Views)
Tell the guy who programmed the device that it is evil to make comm protocol exceedingly difficult to parse. Smiley Mad
Communication with a device should be client driven e.g. the device replies only when asked to by the client. If the client wants a heartbeat, it asks a heartbeat every second. period. </rant>

After each command sent, read the received characters and parse according to what response formats are expected. Remove heartbeats from the reply and retry if needed. If you can give few typical strings received from the device, I could be more specific in my answer.






LabVIEW, C'est LabVIEW

0 Kudos
Message 4 of 4
(2,572 Views)