LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flock of Birds: acquiring continous stream of data

Hello all,
Hope you can help. I am using LabView to acquire data from the Flock of Birds (positions sensors). These send data back in bursts and I am using a timed loop to read the data at the COM port (blue icon with red arrow in attached file) then converting into binary values. For the data processing part of my program I need a continous stream of values and not the bursts that I am currently getting, but I don't know how to achieve this.
I think that using a timed loop is the most efficient way of acquiring data at known time intervals but if any one has any suggestions as to how I can get continous data and time then please let me know.
 
Thankyou in advance,
Clarice
0 Kudos
Message 1 of 9
(4,484 Views)
Clarice,

I cannot comment on the Timed Loop directly because it is not available on the platform I use. I used Flock of Birds several years ago and things may have changed since then as well.

When reading data from a serial port instrument, the usual practice is to use the Bytes at Serial Port property and then read that many bytes. The data is passed to a parallel loop via queues for processing. The Communications loop does nothing but read the data and stuff it into the queue. The processing loop parses the data for the separate sensors, reformats it, and sveas or displays it. Look at examples of Producer/Consumer.

Lynn
0 Kudos
Message 2 of 9
(4,454 Views)

Hello,

I have tried to find Producer/Consumer in the Help topics but have not managed to find anything. Perhaps we are using different versions of LV.

My port reader (the blue icon) is based on 'Bytes from serial port'.

I cannot get data passed out of a loop continously into a queue, do you have any suggestions? I think that is the main reason that my program does not work.

Many thanks,

Clarice

0 Kudos
Message 3 of 9
(4,418 Views)
Hi

I recently learned to use the event loop in an interesting way (thanks to tbob),
You might like to try.  put an event loop inside a while loop. use a shift register at the while loop to pass an array of bytes on each event. wire the output of your vi to value signal property node of your read buffer.
cantenate the bytes inside the event every time you receive a new byte. I don't have labview at home now. I see if i can rigged up an example in my workplace tomorrow

Goy
0 Kudos
Message 4 of 9
(4,407 Views)

Here is some FOB code submitted to NI I stumbled across today, if it is of any use:

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=CC1B4C52F3B856E2E034080020E74861&p_...

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 9
(4,375 Views)
Hi all,

I had downloaded that NI file down for controlling of the FOB, but I was not able to establish connection. Do you guys think that the issue might stem from the fact that I use a serial (RS232) to usb converter cable instead of a serial to serial? I don't have a serial port in my laptop that can support the serial to serial connection. Do you think I should use VISA and set it to usb base data acqusition? Has anyone used this program and able to establish a connection for data acquisition?

LYC
0 Kudos
Message 6 of 9
(4,011 Views)

Does the USB/RS-232 converter show up in MAX as a COM port?  Does it show up in Windows device manager with a COM#?  If not, are you sure the device drivers are installed for the converter?

0 Kudos
Message 7 of 9
(3,983 Views)
I had reinstalled the driver and checked the windows device manager for the COM#. The COM number is COM4. However, I still cannot obtain any forms of data using that premade FOB program from NI. Does it work exclusively for serial to serial only. I would assume with the serial to usb converter it will be ok. However it is still not working, so at this point should I tried to modify that serial.vi to a usb.vi?

LYC2
0 Kudos
Message 8 of 9
(3,961 Views)
Hello Clarice,

A USB-232 will act exactly like a normal COM port when it is installed properly.  You can just pretend it is another COM port on your computer.  What error do you get when running the customer submitted example above (which is not officially supported by NI)?

As for the producer/consumer example, you can try searching the word: "queues" in the example finder, and there should be a number of example that populate.

Have a great week.
O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 9 of 9
(3,941 Views)