id4_common.devices.piezo_jena ============================= .. py:module:: id4_common.devices.piezo_jena .. autoapi-nested-parse:: 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,,1 switch the modulation input on ON (external modulation enabled) modon,,0 switch the modulation input on OFF (external modulation disabled) modon, query modulation-input state on ; response lands in .TINP where is 0 (x), 1 (y), or 2 (z). Module Contents --------------- .. py:class:: PiezoJena Bases: :py:obj:`ophyd.Device` PiezoJena status / input control via MOXA channel 2. .. py:attribute:: tmod .. py:attribute:: aout .. py:attribute:: tinp .. py:method:: modulation_input_on(axis) Switch the modulation input on `axis` ON (external modulation enabled). Sends ``modon,,1``. .. py:method:: modulation_input_off(axis) Switch the modulation input on `axis` OFF (external modulation disabled). Sends ``modon,,0``. .. py:method:: 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,`` query on .AOUT, waits ``settle_time`` seconds for the asyn record to push the response into .TINP, then returns the latest .TINP value.