The SICL Keyboard utility was created to show users how ICS’s 8065 can be controlled from Agilent’s SICL library. Agilent ships the SICL library as part of their IO Libraries VISA package. Agilent’s VISA is a wrapper that calls SICL to communicate with VXI-11.2 interfaces and VXI-11.3 instruments. Agilent’s VISA has limited VXI-11.2 capability and does not make use of SICL’s full VXI-11.2 capability. ICS’s SCIL keyboard program is the better way to go since it makes direct SICL calls and provides full control of the GPIB bus.
The SICL Keyboard utility provides the user with an easy way to communicate with ICS’s Model 8065 Ethernet-to-GPIB Controller and control GPIB instruments through Agilent’s SICL library. ICS’s 8065 is a VXI-11.2 server and interfaces to a GPIB (IEEE-488) bus that can control 1-14 instruments. Through the SICL Keyboard it is possible to link to a VXI-11.2 server, to control the GPIB bus, to search for GPIB instruments, and to communicate with the GPIB instruments.
Normally you will use VISA or RPC applications to control the GPIB instruments. However, this assumes a working system that you have confidence in. The SICL Keyboard utility allows you to confirm the overall system functionality, which will give you the confidence to allow you to start building your applications. Within a matter of moments you can determine that the 8065 is functional, how to address the instruments, and receive confirmation that the instruments are alive and healthy.
The first thing you need to do is link to the VXI-11.2 Server (8065). If the 8065 is set to the factory default IP address just press the Select and Create Link button. If the 8065 is set to a different IP value, enter the IP value in the window, select it and then press the Select and Create Link button to establish the link.
Creating a link to a VXI-11.2 server gives you the ability to perform server-level functions. It is now possible to perform certain commands. If a command is possible, the corresponding button will become enabled.
Chief among the server-level functions is the Find Instruments function. This will scan the server for GPIB instruments attached to the VXI-11.2 server. Any/all instruments found will be listed in the text/reply window. The instruments will be listed by their GPIB bus addresses in the pull down list. Select the desired instrument in the pull down list and then use the Select Inst and Link button to establish a link to the instrument. The remaining SICL Keyboard controls will now be enabled.
The interface commands are sent to the VXI-11.2 server itself. They affect the entire GPIB bus controlled by the server. These server level commands consist of the commands in the top half of the SICL Keyboard window. Finding instruments, Send IFC, and reading the Bus Status are examples of interface level commands.
The instrument commands are sent to a specific GPIB instrument. As such, they do not affect the VXI-11.2 server, or other instruments. Instrument commands can be device specific commands, GPIB (IEEE-488.1) commands or 488.2 (IEEE-488.2) common commands. The controls for sending these instrument level commands are located in the bottom half of the SICL Keyboard window. Examples of instrument commands are sending of commands, locking and unlocking, device clear, device trigger, and serial polling.
The Device Command list box is used to enter device specific and 488.2 commands that are to be sent to the GPIB instrument. The commands are entered as ASCII character strings without a terminator. The SICL Keyboard will automatically add the terminator selected in the Message Terminators check boxes. Note that the Device Command pull down list contains a few of the common 488.2 commands to control GPIB instruments. In addition to the list of commands in the pull down list, there are numerous other 488.2 commands that may be manually entered. If a desired command is not in the pull down list, it may be typed into the Device Command box.
The SICL Keyboard allows the user to send the GPIB Device Clear and Trigger commands to the instrument and to Serial Poll the instrument. Serial Poll returns the value of the instruments' Status Byte Register. With the exception of bit 6 (RSV bit), the meaning of the bits in the Status Byte Register are set by the designer and the IEEE-488 Standard that the instrument adheres to. The RSV bit is on (logic '1') when the instrument is driving the SRQ line and requesting service.
The bottom of the SICL Keyboard window provides two looping mechanisms. The IDN Message Loop will continuously cycle an *IDN? query/response until stopped, or an error occurs. The IDN response is presented in the text/reply box immediately above the looping section.
The Device Command Loop allows you to input any command string into the Device Command box. The contents of the Device Command box will be sent continuously until stopped, or an error occurs. If the command string contains a question mark (?), a device response will be read from the instrument at that point.
Three sets of options exist that may be adjusted by the user. The Message Terminators indicate how the text messages should be terminated. Checking one (or both) of the terminators will cause the addition of the selected character to the end of each text message. Selecting both CR and LF will cause a <CR><LF> sequence at the end of each text message sent. The IEEE-488.2 Standard specifies a LF message terminator.
The Control Signals allow setting (or clearing) of the ATN and REN GPIB bus signals. It is advised that the ATN box remain non-modified (cleared) at all times for normal operation. The REN signal is normally set for controlling GPIB instruments. If REN is cleared, it is possible that a GPIB instrument will not respond to commands and queries.
The Device Response selections determine how instrument response strings are handled. The Auto Query checkbox determines whether a question mark (?) in the device command string causes an automatic read of the device. If the box is checked, the *IDN? query will generate an automatic read of the instrument response. If the box is not checked, there will not be any automatic reads and the user is required to use the Read Device Response button to manually read the instrument response. Warning - Failure to read a query response may confuse the instrument and will generate a query error in an IEEE-488.2 compatible device.
The Display Byte Count will cause a count to be displayed in the text/reply box. The count is the number of characters in the instrument response. This will include any invisible (non-printable) characters such as CR or LF.
The Display All Characters will cause invisible (non-printable) characters to be displayed. While the characters will be displayed, it will usually not be possible to tell what character is represented. However a visible mark may be observed, indicating that a character does exist at that point in the reply. Caution - CR or LF characters may sometimes appear as blank lines.
The Auto Lock will cause an atomic operation such as Send or Send-Receive to be encapsulated with instrument lock and unlock commands. This will protect the integrity of the instruments response by preventing another controller from altering the instruments state until it has responded to the current command. See the Lock and Unlock discussion below.
No specific VXI-11 protocol knowledge is required to use the SICL Keyboard utility. However, it is important to be able to use the information gained from the SICL Keyboard to help you with your program. The most important usage of this information is in the creation of SICL resources. Normally a SICL VXI-11 resource requires three components and looks similar to the following example:
“lan;vxi-11[192.168.0.254]:gpib"
The first field is the protocol type. Agilent’s SICL uses lan:vxi-ll to represent VXI-11 devices. The next field is the hostname (or IP) and indicates which network address to use. The third field defines the name of the instrument and contains the interface name as well as the GPIB address of the instrument. If there is no GPIB address, the identification is for the interface.
The SICL Keyboard allows you to easily obtain the information for the creation of the VISA resource. By using the Select and Create Link and Find Instruments buttons, you can quickly perform a census of all VXI-11 resources available. Furthermore, you can quickly identify which instrument is located at specific GPIB addresses.
Assume that Select and Create Link links to a server named Test2. And a Find Instruments shows instruments at addresses 4 and 17. Select instrument 4 first, then perform an *IDN? query to determine which device it is. Then do the same for instrument 17.
Typically you would create the following two VISA (SICL) resources in your program:
“lan;vxi-11[192.168.0.254]:gpib,4"
“lan;vxi-11[192.168.0.254]:gpib,17"
Additionally you may be able to create an alias for each of the resources. An alias is a short name that will uniquely identify the resource and which may be used as a resource name rather than the long VXI-11 resource name. The alias can be created from the *IDN? response from the GPIB instrument.
An understanding of the Lock and Unlock is also important. Since a VXI-11 resource is available to any application on the network, the VXI-11 protocol allows locking of resources. This prevents other applications from interfering with your application. It is possible to lock a VXI-11.2 server or a VXI-11.3 instrument. Whichever is being used should be locked during any critical times. An example of this is the *IDN? query. The instrument should be locked prior to the sending of the command and then unlocked following the reading of the response. Otherwise, another application may read the response when expecting another type of data. Alternatively, it is possible to lock an instrument for the entire duration of the application, rather than for small discrete times. Also see Auto Lock in the Options Section above.
Interface (Controller) and Instrument (Device) links must be maintained by periodic use or else they will be destroyed by the VXI-11.2 server. The timeout period for link inactivity is 3 minutes. The SICL Keyboard program includes a background KeepAlive timer that will exercise any existing interface and instrument links once a minute if they have not been used in the past one minute period.
Copyright 2005 ICS Electronics Revised
12-06-05