Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxRegisterEveryNSamplesEvent Simulated device

Hy to all,
simulate a 6014 CARD for test my simple test application using Measurement & Automation Explorer (MAX). I'm using ANSI C without Measurement Studio to develop my application. When i register the callback by DAQmxRegisterEveryNSamplesEvent (...) i don't get any error (return value==0), bat when the (simulated) acquisition is started the Callback isn't called. Does it depends on the simulated card?? How does the simulated card implement the timing and triggering?? have Anyone followed this kind of modality??
 
Thanks in advance.
0 Kudos
Message 1 of 4
(3,482 Views)
ringos75,
 
Timing and triggering are not simulated for simulated devices.  From the NI-DAQmx help file:

Timing and Triggering with NI-DAQmx Simulated Devices

With NI-DAQmx simulated devices, the following timing and triggering considerations exist:

  • NI-DAQmx simulated devices do not simulate timing and triggering.
  • An NI-DAQmx simulated device never issues a software event or causes a timed loop to execute.
  • Reads never have to wait for data.
  • Triggers always occur immediately.
  • Watchdog timers do not expire.

You should be able to write your program as though a real device were there (ie... all methods should error if you given the invalid parameters) however when you run the program with a simulated device, the tasks will act with the behaviors described above.

Hope this helps,

Dan

0 Kudos
Message 2 of 4
(3,476 Views)
So i cannot use this type of event callback because of no timing is present in simulated card, can i?
 
Thanks.
0 Kudos
Message 3 of 4
(3,475 Views)
ringos75,
 
You are correct.  Events will not be simulated if the device you are using is simulated.  However, if you are writing an application that will eventually be run on  'real' hardware, events may be a good route to take (however with a simulated device, all you can really test is that the parameters you are setting and functions you are calling are appropriate for that type of device).  If you application has to work for both simulated devices and real devices, then you could branch your program using the function DAQmxGetDevIsSimulated function.
 
Hope this helps,
Dan
0 Kudos
Message 4 of 4
(3,470 Views)