Documentation for /afs/desy.de/user/u/utcke/src/Piezo/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

piezo__define.pro

This class provides a simple interface to Julia's piezo actuator via a serial over TCP interface (more precisely, the PI - Physik Instrumente - E-816 RS-232 and USB submodule as plugged into an E-665 (or E-621, or E-625) controller. A better way to achive the same and much more would probably be a wrapper around the PI General Command Set (GCS) library, PI_GCS2DLL for Windows, and libpi_gcs2.so* for Linux.

A socket is opened on object creation; PIEZO::DoIt is called to send simple commands to the actuator and read its reply, and PIEZO::close is called on exit, to free the LUN opened on initialisation.

The set of available commands is specified in http://pi-portal.ws/index.php?option=com_docman&task=doc_download&gid=109&&Itemid=57 and more information about the E-816 in general can be found at http://pi-portal.ws/index.php?option=com_docman&task=cat_view&gid=62&&Itemid=57
The same set of commands, the General Command Set, also works for the E-516 and E-517 Display Interface Modul as well as the E-753, E-725, E-712 , and E-761 digital controller.

Calling PIEZO::DoIt will usually result in some state-change for the actuator.

Examples

Piezo = OBJ_NEW("PIEZO") Piezo->doit, 'MOV A33.' print, Piezo->doit('POS? A') Piezo->close

Class description for PIEZO

Properties

Port init
Host init

Fields

PORT 0S
HOST ''
SOCKET 0S

Author information

History

$Id: piezo__define.pro,v 1.4 2009/07/29 15:21:03 utcke Exp $

Written by: Sven Utcke (sven.utcke@gkss.de, sven.utcke@gmx.de) 18.2.2009

July, 2009 added E-816 to documentation
July, 2009 greatly extended the documentation.

Routines

result = PIEZO::Init( [Host=Host] [, Port=Port])

This function is used communicate with Julia's piezo-based actuator using serial over TCP.

PIEZO::Set [, Port=Port] [, Host=Host]

This procedure allows us to change the Host and Port over which to access the PIEZO.

result = PIEZO::Get( [Port=Port] [, Host=Host])

This function/procedure allows to read the internal state of a PIEZO object.

PIEZO::Get, Port=Port, Host=Host
result = PIEZO::DoIt(Command)

This function/procedure sends a command to the piezo, where command has to be a string.

PIEZO::DoIt, Command
PIEZO::Close

This procedure closes the serial over TCP connection to the piezo actuator, and in particular frees the associated LUN.

PIEZO__DEFINE

Routine details

topPIEZO::Init

result = PIEZO::Init( [Host=Host] [, Port=Port])

This function is used communicate with Julia's piezo-based actuator using serial over TCP.

This function is only to be called from OBJ_NEW().

Return value

This function is only used inside OBJ_NEW(), which will then return a new PIEZO object.

Keywords

Host in optional

The DNS-name of the piezo SPS.

Port in optional

The TCP port of the piezo SPS.

Statistics

Lines: 19
McCabe complexity:

topPIEZO::Set

PIEZO::Set [, Port=Port] [, Host=Host]

This procedure allows us to change the Host and Port over which to access the PIEZO.

This procedure changes the Host and Port stored inside the PIEZO object.

Keywords

Port in optional

The TCP port of the piezo SPS.

Host in optional

The DNS-name of the piezo SPS.

Examples

Piezo = OBJ_NEW("PIEZO") Piezo->Set, Port=499

Statistics

Lines: 4
McCabe complexity:

topPIEZO::Get

result = PIEZO::Get( [Port=Port] [, Host=Host])

This function/procedure allows to read the internal state of a PIEZO object. The function can return only one of HOST or PORT --- if more than one keyword parameter is specified, only the Host will be returned.

Return value

The function returns the first requested value (in the order HOST, PORT).

Keywords

Port in optional

The TCP port of the piezo.

Host in optional

The DNS-name of the piezo.

Examples

Piezo = OBJ_NEW("PIEZO") Port = Piezo->Get(/PORT) Piezo->Get(Host=Host)

Statistics

Lines: 4
McCabe complexity:

topPIEZO::Get

PIEZO::Get, Port=Port, Host=Host

Keywords

Port
Host

Statistics

Lines: 4
McCabe complexity:

topPIEZO::DoIt

result = PIEZO::DoIt(Command)

This function/procedure sends a command to the piezo, where command has to be a string. The function PIEZO::doit returns the PIEZO's answer, if any.

Side effects depend on the command, in many cases the state of the actuator will be changed.

Command: has to be a string.

Return value

The reply returned by the piezo, a string.

Parameters

Command in required

The command to be send to the Piezo, a string. Examples include 'SAI?' (returns 'A'), 'ERR?' (usually returns '0' for no error), 'DCO? A' (usually replies '0' for no drift compensation).

Examples

Piezo = OBJ_NEW("PIEZO") Piezo->DoIt, 'DCO? A' Result = Piezo->DoIt('DCO? A') Piezo->doit, 'MOV A33.' print, Piezo->doit('POS? A') Piezo->close

Statistics

Lines: 20
McCabe complexity:

topPIEZO::DoIt

PIEZO::DoIt, Command

Parameters

Command

Statistics

Lines: 3
McCabe complexity:

topPIEZO::Close

PIEZO::Close

This procedure closes the serial over TCP connection to the piezo actuator, and in particular frees the associated LUN.

An open connection needs to exist (this will have been created by PIEZO::Init, i.e. once you have closed the connection, the PIEZO object becomes useless).

Examples

Piezo = OBJ_NEW("PIEZO") Piezo->doit, 'MOV A33.' print, Piezo->doit('POS? A') Piezo->close

Statistics

Lines: 5
McCabe complexity:

topPIEZO__DEFINE

PIEZO__DEFINE

Statistics

Lines: 3
McCabe complexity:

File attributes

Modification date: Wed Jul 29 17:21:03 2009
Lines: 255