LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ stimulation to acquisition

Hi,

I want to run two DAQ assistants concurrently for acquisition and stimulation. However, I want the aqcisition one to stop when the stimulationg one stops. Any ideas on hoe to do that?

Thank you

Cycy
0 Kudos
Message 1 of 9
(3,896 Views)

Hi Cycy for doing that in DAQ you can use the triggers, in Daqmx, you can configure triggers to star and stop acquisitions

http://digital.ni.com/public.nsf/websearch/878BD3188B1CD64686256F8C0060CCAB?OpenDocument 

https://www.ni.com/en/support/documentation/supplemental/21/ni-daqmx-data-acquisition-triggering-tec...

https://forums.ni.com/t5/Example-Code/Start-Trigger-and-Stop-After-n-Pulses-for-Continuous-Analog/ta...

I hope this can help

 

 

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 2 of 9
(3,876 Views)
Hi Cycy,

Sorry for the slow response, I have generated a very simple example for you that will generate a sine wave, output it on Dev2/ao0 (my Dev 1 has no AO) and then read the data in on Dev2/ai0.

All this is happening within a while loop, and so the while loop stop button first stops the simulation, and then the acquisition and then finally stops thje loop.

It should be easier to implement than the triggers.

Regards
JamesC
NIUK and Ireland

Message 3 of 9
(3,866 Views)

Hi James,

 

That helps a lot but how do I get the stopped output from the DAQ stimulator?

 

Thanks

 

Cycy

0 Kudos
Message 4 of 9
(3,853 Views)
Hi Cycy,

If you open the example you will see where the Stopped output comes from the DAQ Assistant, and then goes into the Stop (f) of the DAQ Assistant 2.

This link is highlighted in red.



Regards
JamesC
NIUK and Ireland

Message Edited by JamesC on 09-27-2006 12:56 PM

0 Kudos
Message 5 of 9
(3,851 Views)
Hi James,
 
For some reason, that stop output doesn't exist on my DAQ assistant. I copied and pasted the one you gave me. That seemed fine until I configured it. Then it just showed "invalid output" instead of "stopped". Is the way I'm configuring that VI preventing it to have that output?
 
Thanks
 
Cycy
0 Kudos
Message 6 of 9
(3,832 Views)

Hi Cycy,

I am using DAQmx 8.3, if you are using an earlier version of DAQmx you might not have this functionality.

Please go to this Link to download the latest version.

Regards
JamesC
NIUK and Ireland

 
0 Kudos
Message 7 of 9
(3,830 Views)
Hi James,

I was away from my lab for a while so I didn't have the chance to test it till today. I have downloaded DAQmx 8.3 and installed it but it still doesn't work... I have to copy the assistant from your program and wire it in mine. Then, when I configure it, it says :"this program contains errors. You may continue but it will not run while errors are still there". Then, when I close it, the "stopped" output has disapeared and I have bad wires. Any Ideas on how to get that "stopped" output to show itself without copying?

Thanks

Cycy
0 Kudos
Message 8 of 9
(3,801 Views)

Hi Cyny,

Inside your DAQ assistant, what task timing have you set up?

If you set up for "n number of samples" or "1 sample (SW timed)" then you do not have the option to stop the aquisition.  That is one option that you only have avalaible when you select "continuous samples" and "1 sample (HW timed)"

Do you see the stop output if you use the continuous samples option?

AdamB

 

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 9 of 9
(3,777 Views)