Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQmx Simulated Devices Triggering

Hello guys,
 
I need to simulate the 6025e device in order to write a program in Labview for the real one.
 
The application is supposed to acquire 1000 points from an analog channel in a retriggable routine. Each time there is a pulse on a PFI channel, it should read 1000 values from the analog signal and then wait for next pulse.
 
Is it possible to do that with the simulated device ?
 
Thanx.
0 Kudos
Message 1 of 5
(4,327 Views)
Hello,
I've got a couple things I'd like to mention.  First, all triggering on NI-DAQmx simulated devices is instantaneous.  So, if you set up a triggered task, as soon as the task starts, it will behave as if it has received the trigger immediately.  So, you will be able to program your app, but just keep this behavior in mind. 
Secondly, the only truly re-triggerable application for multifunction DAQ devices is counter tasks.  So to have a re-triggerable analog input, you actually need to set up a re-triggerable pulse train output and use that pulse train as the scan clock for the analog input task. 
If, however, there is enough time between your trigger pulses, you can simply set up a triggered finite analog input, and re-start the task in a loop.  In fact, there is already a great example that does so.  In the LabVIEW example finder (Help>>Find Examples), navigate to Hardware Input and Output>>DAQmx>>Analog Measurements>>Voltage.  Then take a look at "Acq&Graph Voltage-Int Clk-HW Trig Restarts.vi"  Hope this helps!
-Alan A.
0 Kudos
Message 2 of 5
(4,310 Views)
Hello Alan A, thank you very much for your answer.
 
So if I understand you correct, regarding the instantaneous triggering in NI-Daqmx simulated devices, suppose that in real life situation, I have some amount of time after 1000 samples were taken before the next trigger on a PFI line, in the simulated device case, it won't have this amount of time ? Meaning, that after 1000 samples were taken, next 1000 samples will be taken right away ?
 
Another question: Is the noisy sinus waveform, is the only simulated analog input I can use for the NI-Daqmx simulated devices ? Meaning, in my example I can train on this input only or can I have other input shapes ?
 
 
 
 
 
0 Kudos
Message 3 of 5
(4,299 Views)

Just wanted to add to my first question above:

About the instantaneous triggering in NI-Daqmx, suppose I don't want the next 1000 samples to be taken right after the previous 1000 samples, but say we're talking about a sinusoidal analog input, and only after each peek (which let's say is signaled by a trigger on a PFI line in a real life situation) I want those samples to be acquired, can I simulate this kind of triggering in the NI-Daqmx simulated devices ?

Thank you.

0 Kudos
Message 4 of 5
(4,304 Views)
Hello,
I'll try to answer your questions in the order you asked them.
 
Q:  "So if I understand you correct, regarding the instantaneous triggering in NI-Daqmx simulated devices, suppose that in real life situation, I have some amount of time after 1000 samples were taken before the next trigger on a PFI line, in the simulated device case, it won't have this amount of time ? Meaning, that after 1000 samples were taken, next 1000 samples will be taken right away ?"
A:  Yes
 
Q:  "Another question: Is the noisy sinus waveform, is the only simulated analog input I can use for the NI-Daqmx simulated devices ? Meaning, in my example I can train on this input only or can I have other input shapes ?"
A:  Yes, the sine wave is the only option for simulated data.
 
Q:  "About the instantaneous triggering in NI-Daqmx, suppose I don't want the next 1000 samples to be taken right after the previous 1000 samples, but say we're talking about a sinusoidal analog input, and only after each peek (which let's say is signaled by a trigger on a PFI line in a real life situation) I want those samples to be acquired, can I simulate this kind of triggering in the NI-Daqmx simulated devices ?"
A:  I'm not exactly sure what you mean, I think perhaps you are talking about triggering on an analog level of the simulated data??  If that is what you are talking about, this is not possible.  There are some things that simply aren't ideal with simulated devices.  Triggering is one of those, due to the fact that conceptually, it doesn't really make much sense (i.e. a hw trigger on a non-existent piece of hw).  But, NI decided to make triggering possible with simulated devices (instantaneous only) as opposed to throwing an error.  That will at least allow programming to continue, even if it might not behave exactly as if the hardware was there. 
 
Hope this helps!
 
-Alan A.
 
 
0 Kudos
Message 5 of 5
(4,280 Views)