Sparc Posted November 5, 2008 Report Share Posted November 5, 2008 If you are setting up a 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? 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. I know it can be done in LV. The question is can mere mortals do it. I submit "\Program Files\National Instruments\MAX\Assistants\DAQ Assistant\plugIns\triggering.llb\DAQmxAssistant_subGetAvailableTriggerSources.vi" as evidence. Too bad this VI won't open in any version of LabVIEW I have (7.1, 8.0, 8.2.1, 8.5). Thanks for your help. Quote Link to comment
Sparc Posted November 6, 2008 Author Report Share Posted November 6, 2008 I'd prefer to do this with just LabVIEW but the NationalInstruments.DAQmx .NET assembly has this: DaqSystem.Local.LoadDevice("<device name>").GetTerminals() Which returns the information I'm looking for. Anybody have anything better? [Edit: Add following error information] Great. Guess what happens when you try to use GetTerminals() twice? Error 1172 occurred at Error calling method NationalInstruments.DAQmx.Device.GetTerminals of ObjectId handle: 0x759114C for obj 0x2086D77[Device] in domain [LabVIEW Domain for Run] and thread 3176, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. Inner Exception: System.InvalidOperationException: You may only create one instance of a type of Query List once during the lifetime of your application. ) in Device Terminals using dotNet.vi Works fine the first time. The second time it throws this error. Its great if you only have one device. Not so great if you have more than one (as even changing the Device name doesn't help). VI attatched in LV 8.5. Download File:post-1232-1225849484.vi Quote Link to comment
Karissap Posted November 6, 2008 Report Share Posted November 6, 2008 To get all DAXmx Terminals you can use the DAQmx Device properties node. Quote Link to comment
Sparc Posted November 6, 2008 Author Report Share Posted November 6, 2008 Curious. Tell me how you found that. Or tell me what version of LabVIEW and/or DAQmx you are using. Quote Link to comment
Karissap Posted November 6, 2008 Report Share Posted November 6, 2008 Its there in the first menu for me, I must have a later version of DAQmx, I tried it on LabVIEW Version 7.1 and it was there. My DAQmx version is 8.7.2 Quote Link to comment
Sparc Posted November 6, 2008 Author Report Share Posted November 6, 2008 I have DAQmx 8.6. I think that must be the problem. Thank you for your help. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.