VISA is a standard I / O API for instrument programming.

Multiple uses of VISA

VISA can control GPIB, serial, USB, Ethernet, PXI or VXI instruments, and call the corresponding driver according to the type of instrument used, users do not need to learn the communication protocols of various instruments. VISA is independent of the operating system, bus, and programming environment. In other words, the same API is used regardless of the device, operating system, and programming language.
Before you start using VISA , make sure you select the appropriate instrument control method .

Message-based communication

GPIB, serial, USB, Ethernet, and some VXI instruments use message-based communication. Program message-based instruments using high-level ASCII strings. The instrument uses the local processor to parse the command string, set the appropriate register bits, and perform the operation the user expects. SCPI (Programmable Instrument Standard Command) is a standard for ASCII command strings used for instrument programming. Similar instruments often use similar commands. Users only need to learn a set of commands, instead of learning the different command messages of various instruments from various instrument manufacturers. The most commonly used message-based functions are: VISA read, VISA write, VISA enable trigger, VISA clear, and VISA read STB.

Register-based communication

PXI and many VXI instruments use register-based communication. Register-based instruments are programmed using low-level binary information that will be written directly to the instrument control registers. The advantage of this communication method is fast, because the instrument does not need to parse the command string and convert the information into a register-level program. Register-based instruments actually communicate on the direct hardware operating layer. The most commonly used register-based functions are: VISA input, VISA output, VISA in, and VISA out.

VISA是仪器编程的标准I/O API。

VISA的多种用途

VISA可控制GPIB、串口、USB、以太网、PXI或VXI仪器,并根据使用仪器的类型调用相应的驱动程序,用户无需学习各种仪器的通信协议。VISA独立于操作系统、总线和编程环境。换言之,无论使用何种设备、操作系统和编程语言,均使用相同的API。
开始使用VISA之前,应确保选择合适的仪器控制方法

基于消息的通信

GPIB、串口、USB、以太网和某些VXI仪器使用基于消息的通信方式。对基于消息的仪器进行编程,使用的是高层的ASCII字符串。仪器使用本地处理器解析命令字符串,设置合适的寄存器位,进行用户期望的操作。SCPI(可编程仪器标准命令)是用于仪器编程的ASCII命令字符串的标准。相似的仪器通常使用相似的命令。用户只需学习一组命令,而无需学习各个仪器生产厂商各种仪器的不同命令消息。最常用的基于消息的函数是:VISA读取、VISA写入、VISA置触发有效、VISA清空和VISA读取STB。

基于寄存器的通信

PXI和许多VXI仪器使用基于寄存器的通信方式。对基于寄存器的仪器进行编程,使用的是将直接写入仪器控制寄存器的底层二进制信息。该通信方式的优点是速度快,因为仪器不需解析命令字符串,并将信息转换为寄存器层次的程序。基于寄存器的仪器实际上是在直接硬件操作层上进行通信。最常用的基于寄存器的函数是:VISA输入、VISA输出、VISA转入和VISA转出。