06-28-2011 06:42 AM
Hi,
First time out with the DAQmx and PXI. So, could be I just don't know the right words to search for, but I've not found much info so far.
So I've got a DAQ and a DMM in a PXI rack. In addition, there are some other devices controlled by GPIB.
What I need to do is ramp a voltage on one pin (say pin1) of a device and monitor another (say pin 6) to determine an event.
A particular case is: as pin1 ramps up, at some point during the ramp, pin6 will toggle from 0V to 6V. I need to record voltage on pin1 when pin6 changes.
In some cases I might be ramping an analog out on the DAQ or might be ramping the voltage on an supply via GPIB.
I can see how to configure a trigger on the PF input on the daq, and run the ramp in another loop, and read a DAQ analog in or the DMM, but how do I get notification of the trigger to stop the ramp and note the ramp level?
06-29-2011 01:54 PM
Hello MacDroid,
Let me make sure I understand your application. You are outputting a voltage from one pin (Pin 1 from your example) that will increase until a trigger is received on another pin (e.g. Pin 6), at which point you wish to retrieve the current value of the voltage from the first pin, possibly using an analog input on the card. If that is the case, then you may want to set up a 'stop trigger' on your analog input task. This example might be able to provide that functionality for you. For my own reference, what DAQ card are you using? Let me know, thanks!
Regards,
Joe S.
06-29-2011 02:17 PM
That is correct, with the addition that the voltage being applied to Pin 1 is being generated elsewhere in the code and must be stopped as well.
The DAQ is a PXIe x-series 6356
And a PXI 4070 DMM
I'll have been unable to get any indication that the APFI0 input on the DAQ does anything 😞
I'll have a look at the example.
06-30-2011 07:27 AM
I have some questions about the example.
If I understand what the example is doing, it sets up to sample an input, x number of times at a given rate. And to start taking samples when a digital edge is detected on another input.
Why does it expect a "no more samples error", isn't it reading a x number of samples? Isn't it a successful completion when x number of samples have been read?
Also, I'm not clear on what the relative read actually does.
07-01-2011 12:45 PM
MacDroid,
Basically what the example is doing is configuring a finite acquisition and continuously changing the point at which it reads data. If it is set to read 500 samples, it will keep trying to read 500 samples from the current read position, meaning it will effectively read continuously. A reference trigger automatically stops an acquisition once it has gathered all the required pretrigger samples, so once the program receives a trigger on the specified terminal, it will split the samples into pre- and post-trigger samples and stop the acquisition. We expect to see an error because once it gets that trigger, it realizes that it's not actually reading sample 500, it's reading sample 20,000 (for example) and throws an error.
This example was just one method that you could use. Another option (and perhaps an easier option) would be to just configure that terminal as a pause trigger, which will pause the generation.
Regards,
Joe S.
10-26-2011 10:27 AM
Finally had some time to look at this again...still no joy.
I'm probably being thick, but I just can't get something that works.
I have attempted to make a quick example for myself. When it runs it throws and error that says the trigger source PXIe Slot2/a1 is invalid...valid values are PXIe Slot2/a1 or PFI0.
How can PXIe Slot2/a1 be valid and not valid.
10-27-2011 01:20 PM
MacDroid,
Let me see if I can help you find the cause of this issue. Would you be able to provide a screenshot of the error that you are seeing as well as a screenshot of your code? This way, I'll be able to see how you are attempting to configure your task and the error that it is returning. Let me know, thanks!
Regards,
Joe S.