Control I/O uses a Functional Block Diagram (FBD) programming language and all functions are graphically represented in function blocks. These blocks have one or more inputs and outputs. The function of the block is in practice the relationship between the state of its inputs and its outputs. An FBD helps us determine the function between output variables and input variables through a series of rudimentary blocks and diagrams connected with arrows known as "connections".
A block represents a value (Boolean, Integer, Float ...) or a function between inputs and outputs (Counter, Timer, ...). Blocks are made of sockets used to link different blocks together. By linking blocks together, you define how data flows from the most upstream to the most downstream block (left to right). Output sockets can only be linked to input sockets; you cannot create feedback by linking output sockets to input sockets directly. To create loops in your diagrams, you will have to use memories.
A diagram is made of blocks connected by links. Blocks are made of input and output sockets and links always connect output sockets from one node to inputs of another. You create a diagram by Dragging blocks from the Blocks Palette into the canvas, alternatively, you may Double Left-click on a block in the palette to create it. After placing and arranging blocks, you create links between them by clicking on a block's output socket and dragging it to the target input socket.
Input (green), output (red) and memory (purple) blocks have an address and name. The address defines the position of that block in the internal memory of CONTROL I/O (similar to a real PLC), while the name helps to identify the block without having to keep track of the address. This memory is shared with FACTORY I/O, meaning that a block with the same address as a scene tag has the same value. By using addresses, you can easily map a generic diagram to scene tags by setting the correct addresses for inputs and outputs.
ADD2: Adds two numbers;
ADD3: Adds three numbers;
DIV: Divides two numbers;
MUL: Multiplies two numbers;
SUB: Subtracts two numbers.
CDT: Counts down a number setting the output (Q) to True when reaches 0. Use PV to set the initial value, LOAD to reset the counter and CV to get the current value;
CTU: Counts a number up setting the output (Q) to True when it reaches the preset value (PV). Use RESET to reset the counter and CV to get the current value;
CTUD: Implements both CTU and CTD counters.
ASSIGN: OUT is equal to PT2 if IN is True, else OUT is equal to PT1;
DATETIME TO NUMERICAL: Converts a DateTime into numerical values;
NUMERICAL TO DATETIME: Converts numerical values into a DateTime;
PID: Proportional-integral-derivative controller.
AND2: Performs a logical AND between two Boolean values;
AND4: Performs a logical AND between four Boolean values;
FTRIG: Detects a transition of a Boolean value from True to False (falling edge detection);
JK: JK flip-flop;
NOT: Complements a Boolan value;
OR2: Performs a logical OR between two Boolean values;
OR4: Performs a logical OR between four Boolean values;
ROL: Performs a bitwise left rotation on a number;
ROR: Performs a bitwise right rotation on a number;
RS: Memory with reset priority;
RTRIG: Detects a transition of a Boolean value from False to True (rising edge detection);
SHL: Performs a bitwise shift left on a number;
SHR: Performs a bitwise shift right on a number;
SR: Memory with set priority;
XOR2: Performs a logical exclusive OR between two Boolean values;
XOR3: Performs a logical exclusive OR between three Boolean values.
ABS: Calculates the absolute value of the input number;
ACOS: Calculates the angle whose cosine is the input number. Domain of input for a real result is -1 to 1. Output range is 0 to Π (0 to 180°);
ASIN: Calculates the angle whose sine is the input number. Domain of input for a real result is -1 to 1. Output range is -Π/2 to Π/2 (-90° to 90°);
ATAN: Calculates the angle whose tangent is the input number. Can be used with all real numbers. Output range is -Π/2 to Π/2 (-90° to 90°);
CEILING: Calculates the smallest integer greater to or equal to the input number;
CLAMP: Clamps the input number between a minimum and maximum value;
COS: Calculates the cosine of the input angle (in radians);
EXP: Calculates e raised to the input power;
FLOOR: Calculates the largest integer smaller to or equal to the input number;
LERP: Performs a linear interpolation between two values. The input value T ranges from 0 to 1;
LOG: Calculates the base e logarithm of the input value;
LOG10: Calculates the base 10 logarithm of the input value;
MAX: Calculates the larger of two input numbers;
MIN: Calculates the smaller of two input numbers;
ROUND: Rounds the input value to the nearest integer;
SIGN: Calculates the sign of the input number;
SIN: Calculates the sine of the input angle (in radians);
SQRT: Calculates the square root of the input number;
TAN: Calculates the tangent of the input angle (in radians);
TODEGREES: Converts the input value from radians to degrees;
TORADIANS: Converts the input value from degrees to radians.
LESS THAN (<): Compares if the first operand (IN1) is less than the second (IN2);
LESS OR EQUAL (<=): Compares if the first operand (IN1) is less than or equal to the second (IN2);
EQUAL (=): Compares if the first operand (IN1) is equal to the second (IN2);
NOT EQUAL (≠): Compares if the first operand (IN1) is different than the second (IN2);
GREATER THAN (>): Compares if the first operand (IN1) is greater than the second (IN2);
GREATER OR EQUAL (>=): Compares if te first operand (IN1) is greater than or equal to the second (IN2).
TOF: Timer that sets the output (Q) to False after an elapsed time defined by PT. It starts on a falling edge transition (True to False) of IN and resets on a rising edge transition (False to True);
TON: Timer that sets the output (Q) to True after an elapsed time defined by PT. It starts on a rising edge transition of IN (False to True) and resets of a falling edge transition (True to False).