-
Notifications
You must be signed in to change notification settings - Fork 2
IOC Utilities
Wiki > The Backend System > IOCs > IOC utilities
There are a number of IOC shell utilities defined in C:\Instrument\Apps\EPICS\support\utilities
which can be used in an IOC shell to help startup IOCs. The doxygen docs are here http://epics.isis.rl.ac.uk/doxygen/main/support/utilities/.
Performs an arithmetic operation on an expression and return the integer value to a specific environment variable:
calc("ENV1","1+1",1,2)
The arguments are as follows:
- The output environment variable
- The expression to be evaluated
- Options
- The output length
My best guess is that the expression is evaluated using the calcPerform
method from the EPICS standard library so the expression should match the syntax as used in a calc record.
The options are detailed in ioccalc.cpp
in the utilities directory.
Examples can be seen in the Galil and McLennan motor records.
As calc, but returns a double value. The 4th argument is for the number of decimal places, not the value length.
dcalc("ENV1","0.1*0.2",1,2)
An example can be seen in the Eurotherm IOC, file st-timing.cmd
.
TODO
Defines an environment variables as empty or a comment depending on if lhs is empty. The variables defined are:
-
IF<resultsvar>
'#' if empty; otherwise ' ' -
IFNOT<resultsvar>
' ' if empty; otherwise '#'
parameters
-
resultvar
- the basename of the environment variable to set -
lhs
- the string to test -
operation
- set the first bit for verbose mode -
rhs
- does nothing
TODO
TODO
TODO
TODO