LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-PCI 8431/2 buffering

OK,
I have a 8431/2 that needs to receive data(each message is 5 bytes) coming in at 19200 with 2 IDLE characters between each message. No term chars, no breaks. I also need to process each message real time. What is a good labivew design approach here, other than going to Labview RT.
 
I have tried using NI-Serial and NI-VISA and data is being overwritten I simply wait for 5 characters to arrive, and process them. The problem is that messages are being lost. I could change the app around to receive a load of input and then process it, but that is not what I am after.
 
 
0 Kudos
Message 1 of 5
(2,564 Views)

Hi,

Have you tried using the Basic Serial Write and Read.vi that ships with LabVIEW? You can find this example in LabVIEW by going to Help>>Find Examples and in the Search tab type Serial.  This will bring up a list of serial examples.

Other than the VISA or Serial API I do not know of another way to acquire data.  The vi's that you have used, are they ones that you wrote or example programs? Will you post it so I can take a look at it to see what you are doing?

Thanks!

JenK

0 Kudos
Message 2 of 5
(2,553 Views)
I cannot do my processing in < 2ms for each 5 bytes received. I am certain data is being overwritten. I beleive I need hardware assistance to buffer the data so that I can process it at my rate. Do you know anything about the 8431/2?
Simple example code is not whay I am looking for, been there done that. If I slow down my simulators transmitter, everthing works fine. Unfortunately, the final product that I shall be interfacing with will only have 2 chars idle time between 5 byte packets.
For example, in other programming languages/platforms, I'd have the reciever interrupt when it detects the two idle chars. My ISR would put them in a buffer for my main thread to operate on when it gets to it. Is this possible with the 8431 and Labview? How? Other ideas? Polling is not gonna do it.
0 Kudos
Message 3 of 5
(2,545 Views)

Nevermind,

A queue from a data collection loop to the processing loop does the trick.

Message 4 of 5
(2,542 Views)

I'm glad to hear that you were able to get things working.  If you have more questions repost. Thanks!

JenK

0 Kudos
Message 5 of 5
(2,536 Views)