ASYN driver for National Instruments VISA
VISAdrv (EPICS ASYN driver for National Instruments VISA)

VISAdrv is an EPICS support module allowing access to VISA devices from asyn, it is similar in functionality and usage to drvAsynSerialPortConfigure().You can use it to access devices such as the National Instruments 488.2 GPIB/ENET 100

Typically you would create an asyn port using drvAsynVISAPortConfigure() and then use EPICS Stream device to send commands and interpret results. See the IOC startup file for example usage.

You will need to edit VISAdrvApp/src/Makefile and change NIVISADIR to point to the location of your National Instruments VISA installation

If you are building EPICS as static libraries (i.e. STATIC_BUILD=YES in e.g. CONFIG_SITE) then the IOC as well as VISAdrv will need to link against the system NI VISA library. See VISAdrvTestApp/src/build.mak for an example.

To add this into your program you need to:

See VISAdrvTestApp/src/build.mak for an example.

Then to configure the driver in the IOC at boot time (see iocsBoot/iocVISAdrvtest/st.cmd) use a command like:

    # local serial port (NI MAX name)
    drvAsynVISAPortConfigure("L0", "ASRL5::INSTR")
    # local serial port (alias)
    drvAsynVISAPortConfigure("L0", "COM5")
    # GPIB device added to local device list 
    drvAsynVISAPortConfigure("L0", "GPIB0::3::INSTR")
    # Remote System: GPIB device added to remote PC and served from there using NI VISA Server 
    drvAsynVISAPortConfigure("L0", "visa://remotecomputer/GPIB0::3::INSTR")

where L0 is you asyn port name followed by the local or remote VISA name of your device (see NI Measurement and Automation explorer if you don't know the name)

The drvAsynVISAPortConfigure() command supports several additional options that you may need to set to communicate properly with the device, see the help page of the command for additional details.

See also build.mak

Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5