LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you add 2 physical channels from the same control?

I tried using the the index array feature, and cant figure out where to connect the output.

 

I am trying to read the data into multiplt columns using the "array to spreadsheet" vi, but I don't know the proper sequences of Vi's between the Daqmx read (Analog 1D Wfm Nsamp) and the "array to spreadsheet" vi.

 

I attached my VI, but it is version 8.2 so it may be completely different

0 Kudos
Message 11 of 42
(955 Views)
Can you attach an image? I'm posting from my phone.
0 Kudos
Message 12 of 42
(944 Views)

Here you go!

VI_Image.JPG

0 Kudos
Message 13 of 42
(941 Views)
Since you are acquiring a waveform data type, you might be better off with the export waveforms to spreadsheet file. Otherwise, you would need to use the Get Waveforms Components to get the y array. You'll lose the timing information though.
0 Kudos
Message 14 of 42
(936 Views)

I'm sorry, I think I was misunderstood. The data doesn't necessarily have to be written to a spreadsheet. A .txt file is 100% fine, I just need it to write in columns of data for each voltage input. Does this alter your latest advice?

0 Kudos
Message 15 of 42
(931 Views)
Not really. The function I mentioned will create a text file. I don't think it's a good idea to throw away your sampling information but you are free to do that with the get waveform components to get just the y array.
0 Kudos
Message 16 of 42
(926 Views)

By "sampling information", are you referring to the sampling rate?

0 Kudos
Message 17 of 42
(923 Views)
Yes. This is generally pretty important information if you need to do any post processing.
0 Kudos
Message 18 of 42
(919 Views)

Shoot. The sampling rate is very important in this VI. I think I am having the most difficulty understanding exactly what is being output from the Daqmx Read Vi. Are 2 sets of data being output? If so, I just need to be able to somehow put those two datasets into columns in a .txt file.

 

 

Right now I use this sequence (it is not working):  Daqmx read>>>build array>>> array to spreadsheet String>>> write to text file

 

When I tried including the "get waveform components", the output from Daqmx Read wasnt compatible with the "get waveform components" input

0 Kudos
Message 19 of 42
(916 Views)
You would have to index the waveform array first. That could be done by simply placing it inside a for loop. The function I mentioned doors all of that for you with a header that includes the sample rate. To use wire to spreadsheet, you would have to create your own header.
0 Kudos
Message 20 of 42
(913 Views)