LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

could not acquire two analog signals simultaneously

Hello,

 

I have a setup driven by a sawtooth wave of very low frequency (0.005 Hz). This is to ramp an electromagnet up and down. This is my primary siganl and the other signal is a pure dc voltage signal taken from from 4-point-probe measurement. I connected the first siganl the analog input (port AI0) of a USB DAQ (NI 6341) and the other siganl to port AI1 in the same DAQ. The code was giving an error 50103 but I moved the error notifier out of the while-loop and this helps.

 

Howerver, the code is not working properly and I need help to acquire the two signals and plot them in an XYgraph. The code is attached with this message.

 

Thank you 

 

Hadi

0 Kudos
Message 1 of 6
(2,714 Views)

Your code makes no sense. Create a task with both channels and one single read operation. You are reading Nchan, 1 sample where N-1 for each train. If you want to read both samples, N=2 and the array contains a single reading form each channel, one for X and one for Y. Convert that to a single complex scalar and build it up into an array of data in a shift register. You can connect the complex array directly to the xy graph terminal.

 

Don't clear the task at each iteration (Why would you do that???).

0 Kudos
Message 2 of 6
(2,685 Views)

Hello Altenbach

Thank you so much for your comments. I tried to alter my code and here it is attached with my reply. The code is working without error but with no display or progression for the XY plot. I don't know about how to implement shift registers correctly. Therefore I need some help or guidance to do that.

 

 

Thank you

 

Hadi

0 Kudos
Message 3 of 6
(2,611 Views)

Ouch.  That is actually worse.  I don't know which of Altenbach's comments you actually tried.

 

Two channels.  One task.  See below.  A better concept would be to set up continuous sample and acquire multiple samples at the rate the card is set for.

 

0 Kudos
Message 4 of 6
(2,602 Views)

Thanks. How do you combine two-channel inputs in the same task? I tried but I couldn't.

0 Kudos
Message 5 of 6
(2,587 Views)

Click the drop down on the constant.  Click Browse....    You get a dialog where you can select multiple channels.  (use Control and Shift as necessary.)

0 Kudos
Message 6 of 6
(2,575 Views)