Before attempting to build this tool, you must install the Linux_GPIB package first. To build this tool, create a directory to work in and unpack the tgz file into the working directory. As a normal user in the working directory, type make and the code should build with no errors or warnings. Then copy the executable file HP3634_ctl into a convenient directory like ~/bin.
The E3634 power supply defaults to address 8 and the tool is configured to default to that address. If you have changed the address for your E3634, you can supply the new address on the command line via the -D option:
> HP3634_ctl -D new_address.
If you want to change the default address, edit the default address value DEFAULT_HP3634A_ADDR value in HP3634A.h.
All of the commands supported by the tool can be viewed by entering the tool with no command line parameters and the tool will respond with the list:
> ./HP3634_ctl
Usage: HP3634_ctl [-d dev_addr] CMD1 [arg1] [CMD2]...
where CMDn [argn] is one of:
- HELP cmd_name
- READ_CMDFILE cmdfilename
- SLEEP_MS NmilliSeconds
- GET_ID no parameters
- GET_ERRORS no parameters
- SET_CUR_LIMIT i_limit_value
- GET_CUR_LIMIT no parameters
- GET_MAX_CUR_LIMIT no parameters
- SET_OCP_LIMIT ocp_value
- GET_OCP_LIMIT no parameters
- SET_OCP_STATE ON/OFF/CLEAR
- GET_OCP_STATE no parameters
- SET_OUTPUT_VOLTAGE output_voltage_value
- GET_OUTPUT_VOLTAGE no parameters
- GET_MAX_OUTPUT_VOLTAGE no parameters
- SET_OVP_LIMIT ovp_value
- GET_OVP_LIMIT no parameters
- GET_OVP_STATE no parameters
- SET_OVP_STATE ON/OFF/CLEAR
- SET_VOLTAGE_RANGE HI/LOW
- GET_VOLTAGE_RANGE no parameters
- SET_OUTPUT ON/OFF
- GET_OUTPUT no parameters
- GET_MEASURED_VOLTAGE no parameters
- GET_MEASURED_CURRENT no parameters
- SAVE_CONFIG 1/2/3
- RECALL_CONFIG 1/2/3
- SEND_RST no parameters
- GET_QSR_REG no parameters
- GET_QSR_CONDITION no parameters
- GET_STD_EVENT_REG no parameters
- SET_CAL_SECURE_CODE code
- SET_CAL_SECURE_STATE OFF/ON code
- GET_CAL_SECURE_STATE no parameters
- SET_CAL_STRING "cal_string"
- GET_CAL_STRING no parameters
- GET_CAL_COUNT no parameters
- SET_CAL_CURRENT current value
- SELECT_CAL_CURRENT MIN/MID/MAX
- CAL_CURRENT_PROTECTION no parameters
- SET_CAL_VOLTAGE current value
- SELECT_CAL_VOLTAGE MIN/MID/MAX
- CAL_VOLTAGE_PROTECTION no parameters
- CAL_DAC_ERROR no parameters
The configuration options (starting with -) must all
be before the first command.
You can also see the parameters for a single command with the -H option:
> HP3634_ctl -H SELECT_CAL_VOLTAGE
and the tool will respond with the command line options for that command:
SELECT_CAL_VOLTAGE MIN/MID/MAX
Instrument commands may be typed on the command line. Multiple instrument commands can be on the command line and they are executed in the order of appearance. Commands are not case sensitive, so get_cur_limit works as well as GET_CUR_LIMIT.
> HP3634_ctl SET_CUR_LIMIT 1.5 SET_OUTPUT_VOLTAGE 3.3 SET_OUTPUT ON
will set the current limit value to 1.5 Amps, the output voltage to 3.3 Volts, and turn the output on.
A text file with commands in it can also be used with the READ_CMDFILE command. If you created a text file cfg_3p3 containing:
SET_VOLTAGE_RANGE LOW
SET_CUR_LIMIT 1.5
SET_OUTPUT_VOLTAGE 3.3
and then issued the following command:
> HP3634_ctl READ_CMDFILE cfg_3p3 SET_OUTPUT ON
the supply will go to the low output voltage range, set the current limit to 1.5 Amps, set the output voltage to 3.3V, and turn the output on.
Syntax for the command file is the same as the syntax for the command line with the exception that you cannot change the GPIB address in the command file.
Some error checking is done in the tool but it is possible to send a command that the E3634...
Read more »