08-04-2016 03:59 PM
Please check the bloack diagram (FALSE state of Case Structure has Wait function with 20ms) and attached code (saved in LabVIEW 2015).
On running the code and using 'Trig' button, I can see only 1000 samples (for each channel) and not 4000 samples.
Please help me understand, what am I doing wrong?
Solved! Go to Solution.
08-05-2016 08:07 AM
Wire "4000" to the "samples per channel" input of the DAQmx Timing VI. The default value when unwired is "1000".
08-05-2016 08:23 AM
Hello Brandon,
Thanks for the reply, yesterday I figured this out.
However I'm still trying to understand that, when I've wired 4000 to the 'number of samples per channel' input of 'DAQmx Read' function, why is that not over-riding the default setting of 'DAQmx Timing' function.
08-05-2016 08:49 AM
It's not overriding it because the two parameters control different concepts.
The DAQmx Timing VI configures the AI timing engine's sample clock. In the case you had originally, with "Finite Samples" and the default "samples per channel", the sample clock will consist of 1000 pulses, which causes 1000 samples to be latched by the device. This configuration is what gets used when you start the task. (This happens implicitly when you call DAQmx Read, but can also happen explicitly if you explicitly call DAQmx Start Task.)
Behind the scenes, the DAQmx driver is acquiring those samples from FIFOs on the device and putting them into a buffer. The "number of samples per channel" input on DAQmx Read VI configures the number of samples to read from that buffer.
08-09-2016 07:58 PM - edited 08-09-2016 08:28 PM
Hi Brandon, I'm now running into a different issue.
I'm using PXIe-4300 (with TB-4300B), to my understanding, this DAQ card has 8 simultaneous sampling analog input channels.
Now, I've a continuously running task, with first 6 channels configured.
Along with this I'm creating another task, which will read 4000 samples on last two channels, based on trigger.
Whenever I'm running the second code (while the first code is continuously running). On using 'Trigger', I'm getting error '-50103'. This error is expected in DAQ card with multiplexed ADC but why in a simultaneous sampling card?
How to create two tasks with this DAQ card?
Note: For time bieng I'm unmarking this post as 'Solved' so that this post attract more attention.
08-10-2016 08:17 AM
"Simultaneous sampling" means that the product has multiple ADCs and they can all latch data at the same time (instead of being scanned). It doesn't refer to the quantity of AI timing engines; the PXIe-4300 only has a single AI timing engine, and therefore only a single device FIFO and clock generator, thus the limit of a single active hardware-timed AI task.
Many NI DAQ devices only have a single AI timing engine. A probably-not-exhastive list of exceptions I can think of include multi-slot CompactDAQ chassis (generally three) and a handful of PXIe-43xx and 44xx devices (4339 and 4463/64 have two, 4302/03/04/05 and 4340 have four).
08-10-2016 08:43 AM
Hey Brandon,
Thanks again.