The programming of specific device controls to their desired values is done by sending device dependent messages to the device using the specific commands that instrument understands. The format of these commands is up to the manufacturer and can vary greatly from one device to another. They are typically ASCII strings such as "FL1Z0R3" (FL1 = filtering on, Z0 = auto-zero off, R3 = 1-volt range) or ":CAL:USER;RANGE 3" (CAL:USER = perform user calibration procedure, RANGE 3 = set gain range #3).
These messages are preceded by a sequence of commands to select the talker and listener. For example, if the controller is at GPIB address 0 and a voltmeter to be programmed is at address 03, you can set its voltage range to 1 volt by having the controller send the commands to Un-listen, Un-talk, set My Listen Address = 03, set My Talk Address = 0, and finally send the ASCII characters "R3".
All of this is done by having the controller send the string of commands 3f Sf23 55 (or equivalently the ASCII string "?# U") followed by the device dependent message "R3". It's useful to understand that a sequence of commands can be specified as an ASCII string since many GPIB systems are programmed using an extended form of BASIC; in BASIC, sending an ASCII string is often the easiest and most compact way of sending GPIB commands or messages.
These messages are preceded by a sequence of commands to select the talker and listener. For example, if the controller is at GPIB address 0 and a voltmeter to be programmed is at address 03, you can set its voltage range to 1 volt by having the controller send the commands to Un-listen, Un-talk, set My Listen Address = 03, set My Talk Address = 0, and finally send the ASCII characters "R3".
All of this is done by having the controller send the string of commands 3f Sf23 55 (or equivalently the ASCII string "?# U") followed by the device dependent message "R3". It's useful to understand that a sequence of commands can be specified as an ASCII string since many GPIB systems are programmed using an extended form of BASIC; in BASIC, sending an ASCII string is often the easiest and most compact way of sending GPIB commands or messages.
Wed, 2010-09-01 12:53
- Login or register to post comments
»