To download NI software, including the products shown below, visit ni.com/downloads.
Overview
The provided code allows for use of an NI-DAQmx Digital Output Lines to control relays in NI Switch Executive.
Description
The provided code is an IVI-Swtch compatible IVI wrapper for NI-DAQmx modules that have digital output lines. This will allow an NI-DAQmx digital output module to be used to control relays in NI Switch Executive and other IVI-Swtch applications. The user will need to set up an IVI Instrument Driver Software Module, an IVI Driver Session, and an IVI Logical Name in order to use this as an IVI device. The attached file contains the DLL required to run the IVI-Swtch device as well as additional images for implementing the code.
Steps to Implement and Execute Code
Requirements to Run
Software
NI Switch Executive
IVI-Swtch
MAX
**NI-DAQmx 9.8 or later**
Hardware
Any NI-DAQmx module with digital output lines.
Additional Information
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Recieved the following error. Any suggestions?
An error has occurred while attempting to access device DIO
Primary Error: (Hex 0xBFFA011) Function or method not supported.
Elaboration: FunctionId:3, FunctionName:InitWithOptions
Where did this error come up? In Switch Executive configuration in MAX?
Can you export a copy of your IVI configuration to confirm that the correct configuration was made (IVI Logical Names, driver session, Software Module, etc). [Open MAX, Click My Computer >> IVI Drivers, Then Click Save IVI Configuration As]
Yes, it happens when I try to add the IVI Switch in the Switch Executive in MAX.
acovian,
Thanks!
It appears that the issue may be that the Prefix appears to be incorrectly names as "DAQmxDitigal", where the t and g has been swapped. You should update the prefix and name to fix the typo. The error is likely that it cannot find a funcation called "DAQmxDitigal_InitWithOptions", because the dll only provides "DAQmxDigital_InitWithOptions"
Also if you don't mind updating the comment above to remove the XML you copied (it made loading the example take super long)
Dear Frank-L,
Your IVI tool is works very fine with mine NI-6501 device. By the way, is it possible to share the source codes for this driver?
Thanks in advance!
Is this .dll still supported with newer versions of Switch Executive / DAQmx? I am trying to use this to control a PXI-6509 which will be driving TTL controlled RF switches. I get an error when adding the logical device to the SW Exec virtual device.
I am using the following:
- Switch Executive 2015
- DAQmx 18.6
Is there any chance for source code? Or for newer version with selectable DOuts (string like in LabVIEW) if I can't use all lines of device?
Thanks in advance!