LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial streams and control

There is a good post here about reading the serial port stream and a good post here about parsing the data. I have been trying to incorporate these two methods for my application. I am working with a couple of NMEA devices a flux gate compass and a DGPS compass. Both of these devices stream data continously from once to 20 times per second. They are on separate com ports. I need to catch the data but I also need to send commands and look for the proper acks to the commands. Should I set up a separate que for commands and acks. I am concerned that with the data continously streaming I will be looking for an ack and get data. Perhaps the smart thing to do is give a stop streaming command before I give another command?

0 Kudos
Message 1 of 2
(2,009 Views)

Hi Viper,

 

As long as you understand your packet structure and you parse out your identification bits you should be fine. As you mentioned the Parser.vi in your second link is pretty good example of how to handle the parsing in LabVIEW. You will need to look at your device manual to see how the packets are structured and then adapt the code from there. Your code will need separate loops for each read resource with a parser to confirm the packet type.

 

Regards,

 

Josh Brown 

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(1,972 Views)