11-05-2008 12:53 AM
If you are setting up an acquisition task in NI-Max, on the "Triggering" tab, if you
select "Digital Edge" from "Trigger Type" on the right a new control
will appear and let you select from a list of choices like "/Dev1/PFI1".
How can you programmatically get a list of these values in LabVIEW?
I
know that list of type "DAQmx Terminal" from the "I/O -> DAQmx Name
Controls" LabVIEW pallet. It's also known as "NI Terminal" in the
floating help window.
The "DAQmx Terminal" control does not have
a property node for this, nor does it have an invoke node. The DAQmx
function pallet has property nodes for channels and physical channels,
but not one for terminals. The property for 'Device' doesn't provide anything either.
I've found the functionality I need in the .NET NationalInstruments.DAQmx assembly:
DaqSystem.Local.LoadDevice().GetTerminals()
Beside it being .NET (I don't want to make the .NET framework a installation requirement for one measely function call), it is not ideal because it only works if it is only ran once in LabVIEW. If you use it a second time it throws an error stating "You may only create one instance of a type of Query List once during the lifetime of your application." (LabVIEW 8.5 Example attached)
So, again, How can you programmatically get list of available triggers sources from DAQmx in LabVIEW?
Thanks for the help.
Solved! Go to Solution.
11-05-2008 11:40 AM - edited 11-05-2008 11:41 AM
Hey,
I think you'll find what you need in the DAQmx Devices property node - one of the properties is the Terminals (the same property you found in the .NET assembly).
Please post back if this isn't what you're looking for.
Andrew S
11-05-2008 12:23 PM
I don't have that option on my property node. Even your VI is broken.
What version of LabVIEW and what version of DAQmx?
11-05-2008 12:54 PM
Hmm, we did add a lot of device properties in DAQmx 8.0 and 8.3 I believe, I'm not sure when we added the Terminals property. I'm using DAQmx 8.8 and LV 8.6 (saved it back for 8.0 just in case).
Are you able to upgrade your version of DAQmx? - that would be what is controlling the property availability rather than LabVIEW version.
Cheers,
Andrew S
11-05-2008 02:22 PM
I have DAQmx 8.6, so that's probably the difference.
Thanks for your help.