LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D queue problem

I needed to enqueue a 2D data array but thought instead I could use two 1D arrays I have attached my code as the LED and waveform charts are not changing or displaying anything. can someone please help??

 

 

0 Kudos
Message 1 of 4
(2,216 Views)

Hi Ails,

 

the queues accept the datatype you used to create the queues. As you created the queues with a scalar DBL they only accept scalars. To use 2d arrays with queues you should wire an array cnstant to CreateQueue...

 

Your producer/consumer loops contain some "funny" code. You read 2D arrays from the DAQ but then you only work with scalar values!? Why not use all the values you get from DAQmxRead? Or: why not read single values from DAQmx when that's all you need for calculations?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,214 Views)

Thanks Gerdw for you help I am need to LabVIEW so I'd say a lot of my code is funny.

 

I am using two terninals on the DAQ AI0 and AI1 I want to output AI1 to the waveform and  AI0 as a number. If I change it to read single values from DAQmx will this work

 

How do I change the DAQmx to read single values?

 

Ail

 

 

0 Kudos
Message 3 of 4
(2,212 Views)

Hi Ails,

 

"I want to output AI1 to the waveform and  AI0 as a number. If I change it to read single values from DAQmx will this work"

As long as you use a chart: yes, easily.

 

"How do I change the DAQmx to read single values?"

Do you see that text under the DAQmxRead-function? You can change that - just right-click the icon...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,210 Views)