Omron E5CK Temperature Controller¶
The Omron E5CK temperature controllers are programmable temperature controllers. The Py4Syn implementation is strongly software based, overcoming device programming limitations, allowing it to be used like an IScannable device and supporting tens of thousands of ramp steps.
Using EPICS Omron E5CK temperature controller module¶
Usage of Python class for EPICS Omron E5CK temperature controllers.
-
class
py4syn.epics.OmronE5CKClass.
OmronE5CK
(pvName, mnemonic)[source]¶ Class to control Omron E5CK temperature controllers via EPICS.
Examples
>>> from py4syn.epics.OmronE5CKClass import OmronE5CK >>> >>> def showTemperature(pv='', name=''): ... e5ck = OmronE5CK(pv, name) ... print('Temperature is: %d' % e5ck.getValue()) ... >>> def fastRaiseTemperature(e5ck, amount, rate=30): ... e5ck.setRate(rate) ... e5ck.setValue(e5ck.getValue() + amount) ... >>> def complexRamp(e5ck): ... e5ck.setRate(10) ... e5ck.setValue(200) ... e5ck.wait() ... e5ck.setRate(2) ... e5ck.setValue(220) ... e5ck.wait() ... sleep(500) ... e5ck.setRate(5) ... e5ck.setValue(100) ... e5ck.wait() ... e5ck.stop() ... >>> import py4syn >>> from py4syn.epics.ScalerClass import Scaler >>> from py4syn.utils.counter import createCounter >>> from py4syn.utils.scan import scan >>> >>> def temperatureScan(start, end, rate, pv='', counter='', channel=2): ... e5ck = OmronE5CK(pv, 'e5ck') ... py4syn.mtrDB['e5ck'] = e5ck ... c = Scaler(counter, channel, 'simcountable') ... createCounter('counter', c, channel) ... e5ck.setRate(rate) ... scan('e5ck', start, end, 10, 1) ... e5ck.stop() ...
Constructor See
py4syn.epics.StandardDevice
Parameters: - pvName : string
Power supply base naming of the PV (Process Variable)
- mnemonic : string
Temperature controller mnemonic
-
getRealPosition
()[source]¶ Returns the same as
getValue()
.See:
getValue()
Returns: - `float`
-
getStepNumberSync
()[source]¶ Helper module to retrieve an up-to-date value for the current program step number. Similar to
getStepNumber()
, but it doesn’t rely on monitor value and instead does a synchronous caget() call.See:
getStepNumber()
Returns: - `int`
-
getTarget
()[source]¶ Returns the current target temperature. If the device is running, the target temperature is the temperature the device is changing to. If the device is not running, the target temperature is ignored.
Returns: - `float`
-
getTimeScale
()[source]¶ Returns the time scale being used by the controller. The timescale can either be zero, for hours:minutes, or one, for minutes:seconds.
Returns: - `int`
-
isRunning
()[source]¶ Returns true if the controller is in program mode. Whenever it is program mode, it is following a target temperature.
Returns: - `bool`
-
onProgrammingChange
(value, **kwargs)[source]¶ Helper callback that tracks when the IOC finished programming the device.
-
onStepChange
(value, **kwargs)[source]¶ Helper callback that indicates when a new program step has been reached
-
onTemperatureChange
(value, **kwargs)[source]¶ Helper callback that indicates when the measured temperature has changed
-
preset
()[source]¶ Makes the controler enter a well defined known state. This method creates and runs an “empty” ramp program. The program simply mantains the current temperature forever, whatever that temperature is. This is mostly a helper function, to allow making complex temperature ramps starting from a known state and reusing the preset values.
Note
Running a new program requires stopping the current program. While the program is stopped, the controller power generation drops to zero. Because of this power drop, this method may be slow to stabilize.
-
sendCommand
(command)[source]¶ Helper method to send a custom command to the controller.
Parameters: - command : str
The command to be send
-
setRate
(r)[source]¶ Sets the ramp speed in degrees per minutes for use with
setValue()
. This method does not send a command to the controller, it only stores the rate for the next ramps.See:
setValue()
Parameters: - r : float
Ramp speed in °C/min
-
setTimeScale
(minutes)[source]¶ Changes the time scale being used by the controller. The timescale can either be zero, for hours:minutes, or one, for minutes:seconds. This operation requires switching the controller operation mode to be successful, and then a reset is issued after it. The whole operation takes more than 5 seconds.
Parameters: - minutes : int
Set to 1 for minutes:seconds, or 0 for hours:minutes
-
setValue
(v)[source]¶ Changes the temperature to a new value. This method calls preset if it has not already been called first. The speed that the new temperature is reached is set with
setRate()
. The default rate is 5 °C/minute.See:
setRate()
Parameters: - v : float
The target temperature in °C
-
setVelocity
(velo)[source]¶ Same as
setRate()
.See:
setRate()
Parameters: - r : float
Ramp speed in °C/min
-
stop
()[source]¶ Stops executing the current temperature program and puts the device in idle state. In the idle state, the device will not try to set a target temperature.
-
synchronizeStep
(current)[source]¶ Helper method to set up a constant temperature right before running a ramp program. This method detects if a current ramp program is running or not. If it’s not, then it doesn’t do anything. If there is a ramp running, then it configures and advances to a “synchronization step”, that is, a step where the temperature does not change. This step marks the beginning of the new ramp.
The method returns the resulting step number
Parameters: - current : float
The temperature target for the synchronization step
Returns: - `int`