Most computers include a serial port (typically RS232). Those that do not can typically be augmented with a serial interface via PCI slots, USB port adapters, and so on. The only hardware Set Up required is connecting the serial cable to the serial port on the PC and the serial port on the instrument. The serial instrument may include some hardware drivers or software utilities for communication. It should include documentation on the baud rate, packet size, stop bits, and parity bits that the instrument will use. These specifications are necessary to ensure proper communication over the serial bus.
To confirm that you can communicate with your instrument, open Measurement & Automation Explorer (NI MAX) found at Start»All Programs» MAX.
Figure 1. MAX Main Menu (Expanded Devices and Interfaces)
Expand the Devices and Interfaces subdirectory below My System. Below it, you should see all the serial and parallel ports on your computer. In this example, the computer has one serial port (COM1). Parallel ports show up as LPT1 if available. Figure 2 shows the directory path to the serial port and the configuration window when COM1 is selected.
Figure 2. Serial Port Configuration Window
From this configuration window you can change the VISA Resource Name for easier identification and you can open the VISA Test Panel to send and receive communication from your serial instrument. Your instrument should have specific commands for collecting and transmitting data, and sending those commands to the instrument from the VISA Test Panel confirms that you have a connection.
Click on the Port Settings tab (at the bottom of the center column) and confirm that the baud rate, packet size, stop bits, and parity bits are compliant with the instrument being used in your application. If these are not set correctly, communication with the instrument will not be successful. Check the user manual of your instrument for its required settings.
Figure 3. Port Settings
When you have completed your configuration and verified communication with the instrument, you need a fast way to progress from interactive mode to programming mode so you can immediately begin writing your tests without a tedious transition process. The best way to achieve this is by using instrument drivers.