LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2d arrays in xy graph

 Hello all, 

i have analog ( multiple channels - 2d Array ) and counter data ( single channel - 1 d array). I need to plot it on XY graph.  so i used a for loop for auto indexing and plotted on XY graph . is it correct ??

or any other better ways?

I have attached an image of that. Kindly download 

 

note: I have already checked ( only analog - multiple channels -2D array ) on the waveform graph. I am getting output fine. 

0 Kudos
Message 1 of 4
(3,777 Views)

Hi bhuvanesh,

 

didn't I told you before not to rename your PNG images to JPG?

 

so i used a for loop for auto indexing and plotted on XY graph . is it correct ?? or any other better ways?

What's the purpose of concatenating empty 1D arrays to your DAQmx data?

Do you really want to use the counter data for X axis and those AI voltages as Y data?

Why don't you read the very same number of samples from your counter task as you do for the AI voltages?

 

I have attached an image of that.

We cannot debug images using LabVIEW.

Why don't you attach your VI?

Best regards,
GerdW


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

hi Gerdw , 

What's the purpose of concatenating empty 1D arrays to your DAQmx data?

Then how can you mingle 2d array ( analog ) with 1d array  ( counter ) to reproduce with XY graph ?

can you Picture it out ? That is what i am expecting ? any better  possible way ?? sir ?

 

 

Why don't you read the very same number of samples from your counter task as you do for the AI voltages?

Ya we can change.. no issues. Just for an example, i tried.  

 

i have attached a VI here . 

 

 

0 Kudos
Message 3 of 4
(3,750 Views)

Hi bhuvanesh,

 

just get rid of those empty array constants!

 

check.png

When you read a fixed amount of samples using DAQmxRead you should NOT use an additional wait in your loop!

 

Ya we can change.. no issues.

When you don't read the same amount of samples from both tasks then the loop building the plots for the graph doesn't make (a lot of) sense: you would try to bundle two arrays of different length!

Best regards,
GerdW


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