hptalk

This help was written for HPKit v0.2.1

hptalk is a tool used to send commands to the instrument, and, possibly, to read back its answer.

Once installed you can run hptalk from a terminal by writing:

 $ hptalk [COMMAND] 

Which sends the COMMAND to the instrument and reads its answer.

Options

The available options for hptalk are:

  • -d | –device=DEVICE_NAME: This option sets which serial interface will hptalk communicate with; by default it is set to ‘/dev/ttyUSB0’;
  • -a | –adapter=ADAPTER: This option sets which adapter will hptalk communicate with; by default it is set to ‘prologix‘; if you don’t want to configure the adapter, because you’ve already configured it before (e.g. with hprologix), set ADAPTER to ‘none‘;
  • -r | –address=PAD,[SAD]: This option sets the adapter’s address, PAD is the primary address and, SAD is the secondary address, which isn’t necessary;
  • -o | –output=OUTFILE: This option tells hpkit to write the instrument’s answer to OUTFILE instead of stdout;
  • -t | –timeout=TIMEOUT: set the TIMEOUT in millisecs for the serial port; by default it is set to 2000, the minimum is 100;
  • -n | –no-answer: tells the adapter not to read a possible answer from the instrument; If present it can be read with:
     $ hptalk ++read # just for the PROLOGIX ADAPTER
  • -m | –multi-row-answer: tells hptalk that the answer will be more than a single line;
  • -h | –help: shows the help;
  • -v | –version: shows the version and license information;

Examples

Here are some examples that may be useful:

Sending a command

 $ hptalk RST # RST is usually the reset command
$ 

Sending a command without reading the answer

$ hptalk -n I?EN
$ hptalk ++read # only for PROLOGIX ADAPTER
0.1E10
$ 

Links

Reply