Framework - Automation
CDP Automation
An operator is a mathematical function and is useful in the development, configuration and maintenance of automation systems. This help page gives an overview of the premade operators that comes with the system and how these maps to IEC 61131-3 operators.
For the full description on how to use operators in projects and in components, how chaining operators work and how to create your own operators, see the detailed operator guide.
Overview of predefined Operators
Operators useful in automation
- Alarm - Trigger an alarm based on signal values
- Scaling - Scale signal value from one range and type to another range and type (using ScalingPoints)
- ADConverter - Analog to digital value converter
- DAConverter - Digital to analog value converter
- Delay - Buffer and delay signal output for some time
- MinMaxLimiter - Limit (truncate) signal output values
- NormalPosition - Invert signal value conditionally
- EdgeTrigger - Trigger signal value on rising and/or falling edge(s)
- ChangeTrigger - Trigger (boolean) output value on input value change
- Toggle - Toggles signal value between true/false on the edge of the input signal
- Force - Conditionally forces a signal value
- Interlock - Set signal to specified value if prerequisites are met
- SafeValue - Forces a safe value when masked signal value is not 0 or when signal routing is invalid
- PIDRegulator - Calculate control values knowing system position and desired position
- Derivative - Calculate the mathematical derivative (ie. rate of change per second) of signal
- Integral - Calculate the mathematical integral (ie. time weighted cumulative sum) of signal
- PWM - Encodes input value into a pulse width modulated bool signal
- KalmanFilter - Filter signal with simple one-dimensional linear Kalman filter
- IIRFilter - An infinite impulse response (IIR) low-pass filter operator
- RampFilter - A Ramp filter operator
- DeltaTime - Measure the time delay between input signal changes
- Timestamp - Output the current timestamp as a double value
- ComposeTimestamp - Compose timestamp from date and time basic parts
- DecomposeTimestamp - Decompose timestamp into date and time basic parts
- MovingAverage - Calcluate average of signal values in time (using different methods)
- MovingMinimum - Calcluate minimum of signal values in time
- MovingMaximum - Calcluate maximum of signal values in time
- TON - On delay timer (output is set to true after preset time delay)
- TOF - Off delay timer (output is set to false after Preset Time delay)
- TP - Pulse timer (output pulsed on for pulse time after rising edge in input)
- CTU - Count up (count up rising edges of input)
- CTD - Count down (count down rising edges of input)
- CTUD - Count up and down (upcount rising edges of CU input and downcount rising edges of CD input)
- WatchdogTimer - Detect boolean value inactivity over given time delay.
- PriorityEncoder - Find first highest value in input list and get its index.
Signal value transformation operators
- Add - Add argument values to signal
- Sub - Subtract argument values from signal
- Mul - Multiple signal by argument values
- Div - Divide signal value by arguments
- Offset - Apply a constant add operation on signal value
- Mask - Apply a binary mask on signal value
- Invert - Apply additive inverse operation on signal value
- LeftShift - Apply a arithmetic left shift operation on signal value
- RightShift - Apply a arithmetic right shift operation on signal value
- BitExtract - Extract a bit from signal
- BitPack - Bitwise OR bit of signal by bit of parameter signal
- Evaluate - Evaluate different mathematical expressions based on signal and/or arguments value
- Regex - POSIX regular expression search operator that will copy matched substrings (groups) into output arguments
- SearchReplace - String search/replace operator that transforms text input to text output by searching and replacing (can use POSIX regular expressions)
- ByteSwap - Changes byte order of signal value
- AND - AND argument values into a signal
- OR - OR argument values into a signal
- XOR - XOR argument values into a signal
- ROL - Bitwise rotation of a value to the left
- ROR - Bitwise rotation of a value to the right
- MOD - Modulo division of values
- MUX - Multiplexer where an index is used to select from several values
- GT - Find if signal value is greater than argument
- LT - Find if signal value is less than argument
- GE - Find if signal value is greater than or equal with argument
- LE - Find if signal value is less than or equal with argument
- EQ - Find if signal value is equal with argument
- NE - Find if signal value is not equal with argument
- SR - Set dominant flip flop the output
- RS - Reset dominant flip flop the output
Math operators
- Abs - Calculate absolute value of the signed input value
- Sign - Return sign (-1, 0 or 1) of the signed input value
- Pow - Raise the input value to the power of the exponent argument
- Sqrt - Calculate the square root of the input value
- Exp - Calculate the natural exponential of the input value
- Ln - Calculate the natural logarithm of the input value
- Log - Calculate the logarithm of the input value to base 10
- Log2 - Calculate the logarithm of the input value to base 2
- Cos - Calculate the cosine of the input radian angle value
- CosH - Calculate the hyperbolic cosine of the input radian angle value
- ACos - Calculate the radian angle for the input cosine value
- ACosH - Calculate the radian angle for the input hyperbolic cosine value
- Sin - Calculate the sine of the input radian angle value
- SinH - Calculate the hyperbolic sine of the input radian angle value
- ASin - Calculate the radian angle for the input sine value
- ASinH - Calculate the radian angle for the input hyperbolic sine value
- Tan - Calculate the tangent of the input radian angle value
- TanH - Calculate the hyperbolic tangent of the input radian angle value
- ATan - Calculate the radian angle for the input tangent value
- ATanH - Calculate the radian angle for the input hyperbolic tangent value
Message operators
- MessageRegexProxy - send copies of received CM_TEXTCOMMAND text messages to one or multiple targets, based on POSIX regular expression match.
- MessageTransform - transform CM_TEXTCOMMAND text messages using POSIX regular expressions.
Other operators
- AddRandom - Add random value to signal
Generators and schedulers
- Sine - Simple sine signal generator
- WaveformGenerator - Generates sine, triangle, square or sawtooth waveforms of different slope
- RampGenerator - Generates upward, downward and nonlinear ramps
- Cron - Time-based scheduler, that changes its output based on pattern similar to the Unix-like operating systems crontab.
IEC 61131-3 Operator mapping in PLC
Many of the CDP Operators map to corresponding IEC 61131-3 operators, as shown in this operator comparison table:
IEC 61131-3 Name | CDP Operator name | Description | Note |
---|---|---|---|
ADD | Add | Add values together | |
MUL | Mul | Multiply values together | |
SUB | Sub | Subtract values from each other | |
DIV | Div | Divide values with each other | |
MOVE | N/A | Move a variable to another variable | MOVE can be implemented using signal routing |
SEL | Evaluate | Binary selection of values | Can be implemented as "G?IN1:IN0" |
MAX | Evaluate | Get the maximum of two values | Can be implemented as "max(IN0,IN1)" |
MIN | Evaluate | Get the minimum of two values | Can be implemented as "min(IN0,IN1)" |
LIMIT | MinMaxLimiter | Limit a value between min and max | |
GT | GT | Greater than | |
LT | LT | Less than | |
GE | GE | Greater or equal to | |
LE | LE | Less or equal to | |
EQ | EQ | Equal to | |
NE | NE | Not equal to | |
TRUNC | N/A | Convert from real to int | Can be implemented using signal routing |
ABS | Abs | Absolute of value | |
SQRT | Sqrt | Square root of value | |
LN | Ln | The natural logarithm of a variable | |
LOG | Log | The logarithm of a variable in base 10 | |
EXP | Exp | Exponential function of variable | |
SIN | Sin | The sine of a variable | |
COS | Cos | The cosine of a variable | |
TAN | Tan | The tangent of a variable | |
ASIN | ASin | The arc sine of a variable | |
ACOS | ACos | The arc cosine of a variable | |
ATAN | ATan | The arc tangent of a variable | |
EXPT | Exp | The exponentiation of a variable with another variable | |
CAL | N/A | Call a functionblock or program | Can be implemented as an operator containing the function to execute |
NOT | Invert | Bitwise NOT of a value | |
SHL | LeftShift | Bitwise left-shift of a variable | |
SHR | RightShift | Bitwise right-shift of a variable | |
AND | AND | Bitwise AND of variables | |
OR | OR | Bitwise OR of variables | |
XOR | XOR | Bitwise XOR of variables | |
ROL | ROL | Bitwise rotation of a variable to the left | |
ROR | ROR | Bitwise rotation of a variable to the right | |
MOD | MOD | Modulo division of variables | |
MUX | MUX | Multiplexer where one variable is used as an index in a list of variables. | |
SR | SR | Set dominant flip flop | |
RS | RS | Reset dominant flip flop | |
TON | TON | On delay timer | |
TOF | TOF | Off delay timer | |
TP | TP | Pulse timer | |
CTU | CTU | Count up counter | |
CTD | CTD | Count down counter | |
CTUD | CTUD | Count up and down counter |
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.