LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using two daqmx create channel to acquire signals in random

Hi

I am trying to acquire signals from PXI 4472 with two DAQmx create channels. The channel selection is random. For eg. first create channel i have ch. 0, 2, 4, and 6 and the other create channel is Ch. 1,3,5 and 7. This I can do, but the problem is that I need to write the acquired data in seperate files for each channels and that too in sequential order. How can I do that. I know i need to use the loop but how will I will select the channels from two different task.

Thanx in advance

Nitin
0 Kudos
Message 1 of 4
(2,515 Views)
You could compare the Channel name to each channel when you aquire and then if it returns a false (Dev1/ai0 /= Dev1/ai1), then do nothing and if it is true Dev1\ai0 =  dev1\ai0), then save the data to file c:\1.xls (or whatever channel it is).  In order to do this sequnetially, on the save to spreadsheet vi on the append to file? terminal, wire a true constant.

Kenny
Kenny

0 Kudos
Message 2 of 4
(2,512 Views)
Hi Kenny,

I am trying to do that but I am still not getting it.
I am attaching my VI, The channels in the first create channel are 0,2,4 and 6 and the second one is 1,3,5 and 7 and I need to write the data acquired by these channels in an each seperate files in a sequential manner. I tried using for loop to compare it but is not working as i need to write the data in binary format.

Thanx in advance

Nitin
0 Kudos
Message 3 of 4
(2,505 Views)

Ok, here was my idea, I am not sure if it will work for you or not after looking at your VI. 

You can use some of your subVIS that you made to make the path different for each file.  But what I had in mind for the channels was what I did in the vi i attached.  You can just repeat the process for each of the channels and you would know that they were saved correctly.  You could also feed in the iteration number of the main VI while loop to have the binary files change sequentially (ie, data1, data2, etc).

Again, this may not be a route you want to take, you may have other ideas. 
 
Ill try to work on it some more later, but I have to get back to work for now 🙂
 
Kenny
Kenny

0 Kudos
Message 4 of 4
(2,499 Views)