LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Conflict using Labview and a serial port

Hi All,
I am developing a 6 circuit product using Labview and a serial port. 2 of the circuits are identical ( 1 configured as a 14 channel Radio Control servo controller, the other a 14 channel data acquisition board ). 1 of the circuits is a dongle connected to a PC via serial cable/port. The other 3 circuits are RF comms devices allowing dongle and 14 channel circuits to communicate.

The idea is to capture logged data from one 14 chan board and transmit it to the 14 chan servo controller board in "real time". So for example a biped robot can mimic movements of a user wearing a leg harness.

The circuitry and embedded code is virtually finished and I have just started to connect this new hardware to my prebuilt
Labview routine.

I can power up the circuits using Hyperterminal for a couple of hours and keep the connection. This means the PC receives frames of 42 bytes from the logger at 100 hz and is able to transmit frames to the servo controller at 50 hz.

I dont know how Hyperterminal works in order to create this reliable connection but I have tried to recreate the same functionality in Labview but keep losing the link. I find I can run both the logger and servo controller separately but as soon as I connect both at the same time I lose the connection within seconds.

I undestand the dongle is set to receive logger frames until a write request occurs at which point receive is put on hold untill the write is finished. The RF side of things is configured back and forth as Tx and Rx. Clearly it can cope with rapidly switching this way in when Hyperterminal is used.

Should the question is how do I achieve the same function as Hyperterminal ( I'm guessing ).

I have struggled befor
e to get Labview doing Rx and Tx at the same time and I suspect this is a similar type of issue.

Hopefully some can help

Best Regards

Chris - Robotic Systems.
Download All
0 Kudos
Message 1 of 2
(2,608 Views)
Hyperterminal works in the duplex mode, able to send and receive serial data. Although it seems as if it sends and receives at the same time, it in fact does this in time slices. There is never a time when it tries to access the port to send and receive at the same time. You should check your code to make sure that there is no conflict between sending and receiving. One should lock the other out. Another thing to check is handshaking if you use it. Do you use harware handshaking (RTS/CTS) or software (xon/xoff)? If you are not using handshaking, you may have buffer overruns. Without seeing your code, it is hard to tell, but these are some things for you to check. One more thing, are you initializing the port properly, and leaving it open until you exit th
e vi?
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 2
(2,608 Views)