Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #metadef
- #metadef
- #name Hewlett-Packard 34401A
- #meta
- #idString HEWLETT-PACKARD,34401A,
- #name Agilent 34401A
- #handle HP34401A
- #port com
- #baudrate 9600
- #author maukka
- ; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6)
- #value VoltageDC V D6 VDC,d
- #value CurrentDC A si ADC
- #value VoltageAC V D6 VAC
- #value CurrentAC A si AAC
- #value Resistance ohm si ohm,ohm4
- #value Frequency Hz si hz
- #value Ratio - d3 Ratio
- #value Period s d6 Period
- ; How to poll for data, this is used for table and #values?
- ; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
- ; This is a single line command
- #askValues READ?
- ; When it gets extra measurements they will be put into the log window.
- ; It may be due to a timeout on reading the data or because it receives two lines of data.
- ; You can change the timeout with (Default is 1 second)
- #readingDelay 5
- #modeChangeDelay 10
- ; Switch meter to this mode during start, leave empty to avoid any switching
- #initialMode
- ; String to ask about actual meter mode,
- ; This is a single line command
- #askMode
- SENSE:FUNCTION?;[500]
- ; When one of these commands are used through the command interface a new configuration will be done before using #askMode
- ; Only one word for each #mayModifyMode
- ; Specify command without initial colon and in the shortest possible form
- ; #mayModifyMode conf
- #mayModifyMode meas
- #mayModifyMode abor
- #mayModifyMode trig
- #mayModifyMode sens
- #mayModifyMode func
- #interfaceType DMM
- #interface readValue 0
- ; Strings to configure device in different modes
- ; First parameter must match a #value (4 parameter) and second parameter must match what #askMode returns
- ; First parameter is also used in shortcut menu
- #cmdMode VDC VOLT
- abort
- [500]
- *cls
- [500];CONF:VOLT:DC;[500]
- #cmdMode VAC VOLT:AC
- abort
- [500]
- *cls
- [500];CONF:VOLT:AC;[500]
- #cmdMode ohm RES
- abort
- [500]
- *cls
- [500];conf:res;[500]
- #cmdMode ohm4 FRES
- abort
- [500]
- *cls
- [500];conf:fres;[500]
- #cmdMode d DIOD
- abort
- [500]
- *cls
- [500];conf:diod;[500]
- #cmdMode hz FREQ
- abort
- [500]
- *cls
- [500];conf:freq;[500]
- #cmdMode Period PER
- abort
- [500]
- *cls
- [500];conf:per;[500]
- #cmdMode ADC CURR
- abort
- [500]
- *cls
- [500];conf:curr:dc auto;[500]
- #cmdMode AAC CURR:AC
- abort
- [500]
- *cls
- [500];conf:curr:ac auto;[500]
- #cmdMode Ratio VOLT:RAT
- abort
- [500]
- *cls
- [500];conf:volt:dc:ratio;[500]
- ; Prepare the meter to response to #askValues
- #prepareSample
- abort
- sample:count 1
- trig:source imm
- trig:count 1
- system:remote;[500]
- ; Initial commands to meter when establishing connection
- #initCmd
- :SYSTEM:REMOTE;[500]
- ; Final command to meter before breaking connection
- #finalCmd abort;*cls;*rst;init;system:local
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement