CaMonitor Manual
Usage:
r = CaMonitor[rn,options]
Where:
- rn is EPICS record name.
- options includes ValueCommand, ConStatCommand,
InitialValue and AlarmOnly.
Description:
CaMonitor opens a EPICS record and set a monitor event to
that record. When the value or alarm state of rn is changed,
the function specified by ValueCommand is executed.
Its value and alarm severity can be retrieved by r@Value[] and
r@Severity[], respectively. If ValueCommand is not
specified, the value of the record will never be available.
If AlarmOnly option is set to True, the value change is not
reported unless the change of alarm state is not associated.
ConStatCommand option specifies the function called when the
connection state changes. If it is connected, r@ConStat[] is
CaMonitor@CS$Conn.
r@Start[] starts the monitor and r@Stop[]
stops the monitor. r=. closes the connection and clears
r.
Methods:
ConStat[]
Returns the channel access connection state. Possible values are:
CaMonitor@CS$NeverConn | not connected yet |
CaMonitor@CS$PrevConn | previously connected, but not now |
CaMonitor@CS$Conn | connected |
CaMonitor@CS$Closed | channel already closed |
FlushIO[] (class method)
Sends all the Put, Start and Stop requests to the network.
Name[]
Returns the record name.
NewName[n]
Changes the EPICS record associated with this instance to the one
with the name n.
Put[v]
Writes the value v to the record. This request is not sent
until one of TkWait[], TkSense[] or CaMonitor@FlushIO[] is executed.
Severity[]
Returns the severity of the record. Possible values are:
- CaMonitor@DB$NoAlarm
- CaMonitor@DB$MinorAlarm
- CaMonitor@DB$MajorAlarm
- CaMonitor@DB$InvalidAlarm
Start[]
Starts the monitor of the record. The monitor automatically starts
itself, so you don't need to invoke Start[] when an instance of
CaMonitor is created. If you don't want to it to start automatically,
you should specify Autostart option to False.
This request is not sent
until one of TkWait[], TkSense[] or CaMonitor@FlushIO[] is executed.
Stop[]
Stops the monitor of the record. This request is not sent
until one of TkWait[], TkSense[] or CaMonitor@FlushIO[] is executed.
Value[]
Returns the value of the record.
Example:
er = CaMonitor["LIiKLY:KL_A1:HVSW",ValueCommand:>StateChanged["a1"]];
Send feedback to:
Samo Stanic
.