Programming Guide

Table Of Contents
SIGLENT
SVA1000X Programming Guide 77
4.1.4 Example of LabVIEW
Environment: Win7 32bit system, LabVIEW 2011
The functions of this example: use the NI-VISA, to control the device with USBTMC and
TCP/IP access to do a write and read.
Follow the steps to complete the example:
1 Open LabVIEW, create a VI file.
2 Add controls. Right-click in the Front Panel interface, select and add VISA resource
name, error in, error out and some indicators from the Controls column.
3 Open the Block Diagram interface. Right-click on the VISA resource name and you can
select and add the following functions from VISA Palette from the pop-up menu: VISA Write,
VISA Read, VISA Open and VISA Close.
4 Connect them as shown in the figure below
5 Select the device resource from the VISA Resource Name list box and run the program.
In this example, the VI opens a VISA session to a USBTMC device, writes a command to the
device, and reads back the response. In this example, the specific command being sent is
the device ID query. Check with your device manufacturer for the device command set. After
all communication is complete, the VI closes the VISA session.
6 Communicating with the device via TCP/IP is similar to USBTMC. But you need to
change VISA Write and VISA Read Function to Synchronous I/O. The LabVIEW default
is asynchronous I/O. Right-click the node and select Synchronous I/O
Mod>>Synchronous from the shortcut menu to write or read data synchronously.