id4_common.devices.piezo_jena#

PiezoJena control via the 4-ID-G MOXA serial gateway.

The PiezoJena controller is wired to channel 2 of the MOXA box exposed by the asyn record at 4idgSoftX:asyn_MOXA_G:2. The asynRecord protocol uses three fields:

.TMOD transmit mode (1 = write, 0 = read/write) .AOUT ASCII output (the command sent on the wire) .TINP ASCII input (the response read back)

Wire commands:

modon,<axis>,1 switch the modulation input on <axis> ON

(external modulation enabled)

modon,<axis>,0 switch the modulation input on <axis> OFF

(external modulation disabled)

modon,<axis> query modulation-input state on <axis>;

response lands in .TINP

where <axis> is 0 (x), 1 (y), or 2 (z).

Module Contents#

class id4_common.devices.piezo_jena.PiezoJena#

Bases: ophyd.Device

PiezoJena status / input control via MOXA channel 2.

tmod#
aout#
tinp#
modulation_input_on(axis)#

Switch the modulation input on axis ON (external modulation enabled). Sends modon,<axis>,1.

modulation_input_off(axis)#

Switch the modulation input on axis OFF (external modulation disabled). Sends modon,<axis>,0.

read_status(axis, settle_time=0.2)#

Issue a status query for axis and return the .TINP response.

Switches .TMOD to 0 (read/write), writes the bare modon,<axis> query on .AOUT, waits settle_time seconds for the asyn record to push the response into .TINP, then returns the latest .TINP value.