LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I acquire data form 12 serial ports simultaneously?

If you include the instrument number in the queue data, you might be able to do it with one queue. Wire an array into the create queue and use the instrument number to index the array. 12 queues will get pretty involved.
Message 11 of 16
(1,096 Views)
The instrument returns it's ID which in this case is an upper case letter A-L for the 12 sensors. I tried what you suggested but couldn't get it to work.
 
My test vi with 5 sensors is using 5 separate queues and yes teh wiring is a tad messy.  🙂
 
I need to take a little time to clean everything up and create subvi's.
0 Kudos
Message 12 of 16
(1,067 Views)
I may have mixed things up a bit. Add the instrument number data to the queue. Wire the array to the consumer loop that receives the queue data. Then use the instrument number to insert data into the proper spot in the array. Post your code and we'll see if we can help.
Message 13 of 16
(1,058 Views)

I like your train of thought Uncle.

Thought:

If the queue was a cluster with a field to hold the device ID and another field for the data....

The recieved queue elements could be unbundled to direct the data appropriately.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 16
(1,051 Views)
Try making a seperate vi for each wind gauge and have them broadcast their data over a datasocket connection, then have a seperate vi read the 12 datasocket connections at whatever interval you want.

just a thought
0 Kudos
Message 15 of 16
(1,048 Views)

Yes a multi threaded (one for each instrument) producer consumer should work.  I have even done this with spawning threads on the initialize step, works really well.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 16 of 16
(1,043 Views)