-
Notifications
You must be signed in to change notification settings - Fork 11
/
basic_commands.txt
81 lines (58 loc) · 5.32 KB
/
basic_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Galvant Industries GPIBUSB Command List – Firmware v5
** Baudrate: 460800, standard 8N1 serial settings, no flow control **
** Note: All writes to the controller must end with a carriage return ('\r' or dec:13) or newline ('\n' or dec:10)**
** All responses from the adapter will have a CR added by default. **
All of this information can be found, along with additional information, can be found in the readme.md file for the firmware located at github.com/Galvant/gpibusb-firmware
++addr 1
Sets the GPIB address of the device you wish to communicate with. Here the target address is 1. GPIB address range from 1 to 31. Check the device to find what its address is. When in device mode this will set the address of the device.
++auto 1
Used to toggle automatic response reading on (1) and off (0). If set to on (default) the adapter will automatically start reading the response from the device if your data contained a question mark (?).
When set to off, the response will not be read and you will need to send the ``++read`` command to
do so. If set to on, reading will terminate on EOI if ``++eoi 1`` is set, or will terminate on EOS charactrs if ``++eoi 0`` is set.
++clr
Sends the "Selected Device Clear" (SDC) to the currently specified GPIB address as per ``++addr``.
++debug 0
Used to toggle simple debug messages on (1) and off (0). When set to on, communicaiton timeout error messages are sent to the host PC containing basic details as to when and what timed-out. This includes which data line timed-out (DAV, NDAC, NRFD), if you were waiting for it to go high or low, as well as if the adapter was reading or writing. Default is off.
++eoi 1
Used to toggle EOI assertion when writing on (1) and off (0). If set to on, the adapter will assert EOI on the last byte sent over the GPIB bus. Default is on (1). Most devices will use EOI, some will give you the option, and some will not. For those that give you the option, it is highly recommended that you use EOI to signal end of data.
++eos [0|1|2|3]
Set the character that the adapter uses to signal end of data. EOS characters are appended to the end of data being sent to GPIB devices and removed from the data received from GPIB devices. When using ```++read``` reading will terminate when EOS characters are detected. There are four options for this command: ```++eos 0``` appends CR+LF, ```++eos 1``` appends CR, ```++eos 2``` appends LF, and ```+eos 3``` does not append anything. Default is 3.
+++eot_enable 1
Used to toggle end-of-transmission (EOT) characters on (1) and off (0). When set to on, data received
from your GPIB devices will have the EOT character appended to the end when forwarded to the attached PC. This character is specified with the ```++eot_char``` command. Default is on.
++eot_char 13
Specifies the character that will be appended to all transmissions sent from the adapter to the attached PC. The value is a number in the set [0,255] which is the decimal version of the desired ASCII character. Default is 13 (CR).
++ifc
Asserts the GPIB IFC line for 150us.
++llo
Disable front panel operation of the currently addressed instrument by sending the GPIB command byte LLO.
++loc
Enables front panel operation of the currently addressed instrument by sending the GPIB command byte GTL.
++mode 1
Used to switch the adapter between controller mode (1) and device mode (0). Default is controller mode.
++read [eoi]
Sets the currently addressed GPIB device to talk. This is useful when ``++auto 0`` is set or if you have an instrument that does no rely on the question mark query syntax. There are two ways to use this command: ``++read`` will read until the EOS characters set by ``++eos`` is found, or ``++read eoi`` will read until the EOI line is asserted.
++read_tmo_ms 1000
Set the GPIB read/write timeout period in milliseconds.
++rst
Resets the GPIBUSB adapter. Any unsaved settings will be restored to the previously saved values.
Make sure to wait a few seoncds after sending this command for the adapter to fully restart.
++savecfg 1
Saves current settings to EEPROM so that they can be preserved through restarts and power cycles.
Although you can query the savecfg value with ``++savecfg``, this is only done for compatibility reasons. The only way to save your settings to EEPROM is to send ``++savecfg 1``. The following
variables are saved: ``++mode``, ``++addr``, ``++eot_char``, ``++eot_enable``, ``++eos``, ``++eoi``,
and ``++auto``.
++spoll
Perform a GPIB serial poll on the currently specified GPIB address. In addition, you can inline specify a different address with the syntax ``++spoll 16`` where 16 is the target GPIB address for your serial poll.
++srq
Returns that status of the GPIB SRQ line. Returns `1` if the line is asserted or `0` if not. If this returns `1` then that means a device on your GPIB bus is requesting service. You should then perform serial polls via ``++spoll`` to find which device needs service.
++status 0
Sets the status byte of the adapter when in device mode. This byte is transmitted over the GPIB
bus when addressed with a serial poll. Currently, device mode will not assert SRQ no matter
what you set the status byte to. This will be implemented in a future firmware update. Valid
values are `[0,255]`.
++trg
Perform a GPIB bus trigger on the currently specified GPIB address by sending the GPIB command
byte `GET`.
++ver
Returns the string ``Version 5.0``.