Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ad73f5
commit 658e3e2
Showing
4 changed files
with
78 additions
and
41 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,81 @@ | ||
Galvant Industries GPIBUSB Command List | ||
Galvant Industries GPIBUSB Command List – Firmware v5 | ||
|
||
** Baudrate: 460800 ** | ||
** Note: All writes to the controller must end with a carriage return ('\r' or dec:13) ** | ||
** All responses from the adapter will have a CR added. ** | ||
** 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 | ||
|
||
+a:1 | ||
Set the GPIB address of the device you wish to communicate with. Here the target address is 1. Check the device to find what its address is. | ||
++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. | ||
|
||
+eoi:1 | ||
Used to toggle EOI detection on (1) and off (0). If set to on, the controller will stop reading bytes from the device when EOI is asserted. When set to off, the controller will stop when it reads the byte defined by the +eos: command. 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. | ||
++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. | ||
|
||
+eos:1 | ||
Set the character that the device uses to signal end of data. This is especially important when EOI | ||
is off. However, some instruments will use both a termination character and use EOI. If you make sure to set EOS even if you are using EOI data termination, the controller will suppress the last byte. It is recommended that you disable any termination characters at the instrument and just use EOI. | ||
To set the termination character, put the decimal form of the character after the colon. For example, to | ||
set the character to 'z', you would write +eos:122 | ||
++clr | ||
Sends the "Selected Device Clear" (SDC) to the currently specified GPIB address as per ``++addr``. | ||
|
||
+read | ||
Force the controller to read data from the instrument by placing the instrument in talk mode. Normally this is NOT required. When writing commands that end with a question mark (?), the controller will automatically read the response. However, older instruments do not include question marks at the end of query commands. In these cases, using this command will prompt the controller to read the response data. | ||
++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. | ||
|
||
+test | ||
Used to test the controller and your communication software. Controller will respond with: testing\n\r | ||
Controller needs to be plugged into an instrument that is on (ie red LED off) for this to work. | ||
++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. | ||
|
||
+get | ||
Short for �Group Execute Trigger�. This command will send the GPIB bus command to all attached instruments. Introduced in firmware version 3. | ||
++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. | ||
|
||
+strip:0 | ||
Sets the number of characters to remove from the end of the instrument's response before sending it to the attached computer. This is useful when the instrument appends a CR as the adapter uses CR to terminate communication. This can prevent having to include extra serial port reads in an effort to clear the buffer when programming. NOTE: This command can fail if the total number of bytes to be sent to the computer is close to an integer multiple of 100. Introduced in firmware version 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. | ||
|
||
+ver | ||
Returns the firmware version. Introduced in firmware version 3. | ||
++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). | ||
|
||
+autoread: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. This is useful for when uploading small amount of binary data to your instruments as 0x3F (ascii for "?") will cause the adapter to attempt to read a response. Introduced in firmware version 4. | ||
++ifc | ||
Asserts the GPIB IFC line for 150us. | ||
|
||
+reset | ||
Resets the microcontroller. Can be useful for when you need settings back to power-on default, or if and instrument/device has decided it no longer wishes to listen to the GPIB bus. Introduced in firmware version 4. | ||
++llo | ||
Disable front panel operation of the currently addressed instrument by sending the GPIB command byte LLO. | ||
|
||
+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 (0). Introduced in firmware version 4. | ||
++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``. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters