03-15-2011 04:38 AM
Andrew,
How can I configure 1 of the 72 channels within the expanded selection to another task for monitoring STOP analog trigger? Namely, the PXI will be provided with a TTL like 0-5 VDC signal rising with the START of DAQ and falling with the STOP of DAQ. I consider wiring this signal to both the EXT_TRIG and the analog channel so that the rising edge would trigger my DAQ via the EXT_TRIG and the level change from 5VDC to 0VDC would be "seen" by the analog channel.
Is this concept OK and how to "exclude" the analog triggering channel from the expanded selection by assigning it to another task. Can you give me an example of it?
Thanks in advance,
Roman
03-16-2011 03:45 PM
Roman,
There's no way ot use two different AI Tasks for any one particular device. The reason for this is because there is only one timing engine, and that timing engine cannot be divided up over multiple tasks of the same type. DAQmx will probably throw you an error stating that the source cannot be routed as requested. You could dedicate one entire card on a different timing source, and use a separate AI task to set that up individually, but then it would no longer be synchronized to the other cards.
Again, there is no stop trigger. DAQmx has a "pause" trigger, but this is not supported on DSA devices (44xx) only in DAQ devices (63xx, 62xx, etc.). You can end the software acquisition on a DSA device by doing one of two things:
1. Send a command the explicitly ends the task in the LabVIEW program. This command could be based on a comparison made by separating off the particular element you're interested in from the DAQmx Read VI. That comparison then either reads true or false which is wired into the conditional terminal of your while loop.
2. Specify the task as a finite (non-continuous) task. This means the task will end when it is finished--it won't continue running. You specify the number of samples to acquire, and when those samples are all acquired, the task finishes automatically.
If you're interested in learning more with DAQmx and with LabVIEW, you should look into taking a course. If you give NI a call, and ask to speak with your account manager or technical sales representative, you can explain what you're trying to do, and he or she can try to match up a pertinent class for you to help your programming.
Hope this helps,
Andrew
03-17-2011 08:18 AM
Andrew,
I have found a solution as attached. I monitor DI0 of the PXI-6713's DIO port, DAQ chunk size is 1 sample and it works perfect. The DAQ is triggered by the falling edge, then it is stopped when DI0 reads level change back to high. What I do not understand is why NI-DAQmx does not allow me to lower the sampling rate from 1000 S/s to 100 S/s or similar, but allows me to raise it to 2000 S/s.
Roman
03-17-2011
12:53 PM
- last edited on
05-30-2025
03:41 PM
by
Content Cleaner
Roman,
I'm glad you found a solution--I forgot you were also working with another digital i/o card, but it looks like you're doing a similar software-timed implementation of what I described earlier.
Finally, I wanted to mention that the reason your DSA devices won't go below a sample rate of 1kHz is because it uses an "oversample clock" which divides down to certain frequencies you specify. You can see the list of available frequencies in the 447x specifications. Because the 6713 you have cannot be hardware timed (as Sean mentioned earlier) you will be limited to polling for that digital value in software. However, it sounds like your pulse is arriving slow enough that htis is not a problem.
Regards,
Andrew