Instrument control package

From Octave
Revision as of 12:26, 28 September 2012 by Andrius (talk | contribs) (draft)
Jump to navigation Jump to search

Package for interfacing the outside world of hardware via Serial, i2c or Parallel interfaces.

Examples

Serial

Configuring interface

You might want to configure interface in a loopback mode for testing.

  • If you have a Serial adapter, then simply connect pins 3 (Tx) and 2 (Rx) together (assuming your adapter is RS-232 DE9, otherwise check before doing anything). One can also insert an LED in series to view the actual bitstream.
  • If you do not have a Serial adapter then create a virtual port using:
# socat PTY,link=/dev/ttyS15 PTY,link=/dev/ttyS16

which will open two interconnected interfaces, where one (e.g. /dev/ttyS15) can be opened in Octave and second (e.g. /dev/ttyS16) using something like GNU screen:

$ screen /dev/ttyS16 <baudrate>

do not forget to change interface permissions if you want to use them with Octave/screen without root privileges.

Opening and closing the interface

Configuring open interface

srl_read() Timeout

Parallel

parallel

i2c

i2c