Man page - ibterm(1)
Packages contains this manual
apt-get install gpib-user-tools
Manual
IBTERM
NAMESYNOPSIS
DESCRIPTION
OPTIONS
NOTES
Implementation details
SEE ALSO
COPYRIGHT
NAME
ibterm - Interactive GPIB terminal
SYNOPSIS
|
ibterm {-d primary_address } [-m minor ] [-s secondary_address ] [-i eoi ] [-e eos ] [-r reos ] [-b bin ] [-x xeos ] [-t timeout ] [-p prompt ] [-f history_file ] [-N] [-X] [-h] |
DESCRIPTION
An interactive terminal program for sending commands to a device over an IEEE-488 general purpose instrument bus and printing the responses.
OPTIONS
-d address
Sets the device's primary address (pad). The address must be between 0 and 30 .
-m number
Specify the minor number of the device file this interface board will use. A number of 0 corresponds to /dev/gpib0, 1 is /dev/gpib1, etc. Defaults to 0 .
-s address
Sets the device's secondary address (sad). The address must be 0 (disabled) or between 96 and 126 (0x60 and 0x7e hexadecimal). Defaults to 0 .
-i 0|1
Assert EIO with last byte sent. Defaults to 1 (true).
-e code
ASCII code of end-of-string (eos) character. The code must be between 0 and 255 . Defaults to 0 (no code).
-r 0|1
Terminate read on eos character (reos) flag. Defaults to 0 (false).
-b 0|1
Binary eos character match mode (bin) flag. Defaults to 0 (false).
-x 0|1
Assert EOI when transmitting eos (xeos) flag. Defaults to 0 (false).
-t timeout
Sets the IO timeout for the device. The timeout must be a value from the below table. The default value is 10 , corresponding to 300 milliseconds.
-p string
Sets the prompt. Defaults to βibterm>β
-u string
Send Untalk/Unlisten after each read and write
-f file
Command history file. Defaults to β.ibterm_hist_< primary_address >β
-N
No automatic read on device, enter return at prompt to read.
-X
Force hexadecimal output.
-h
Print help and exit.
NOTES
To quit the program enter the EOF character (Ctrl+D) at the prompt.
For interactivity, timeout should not be greater than 13 i.e. 10 secs.
A device read can always be triggered by hitting enter at the prompt. Interrupting the program while reading from the device may cause hangs.
Implementation details
The program is implemented as follows:
loop:
|
Print prompt to stdout |
||
|
Read a line of text from stdin |
||
|
Write the text (if any) to the device at pad |
||
|
If -N is not set, or no text was entered: |
Attempt to read response from
the device
If no response is received before
timeout
:
go to loop
else:
print the response on stdout
|
Go back to loop. |
SEE ALSO
See the readline (3) man page for editing input and searching history.
COPYRIGHT
Copyright Β© 2003-2006, 2008 Frank Mori Hess