Function Blocks of REXYGEN
Reference manual

REX Controls s.r.o.

Version 3.0.1
2024-03-01
Plzeň (Pilsen), Czech Republic
1 Introduction
 1.1 How to use this manual
 1.2 The function block description format
 1.3 Conventions for variables, blocks and subsystems naming
 1.4 Signal Quality Corresponding with OPC
2 EXEC – Real-time executive configuration
 ALARMS – Alarms Definition Configuration
 ARC – The REXYGEN system archive
 EXEC – Real-time executive
 HMI – Human-Machine Interface Configuration
 INFO – Description of Algorithm
 IODRV – The REXYGEN system input/output driver
 IOTASK – Driver-triggered task of the REXYGEN system
 LPBRK – Loop break
 MODULE – Extension module of the REXYGEN system
 OSCALL – Operating system calls
 PROJECT – Additional Project Settings
 QTASK – Quick task of the REXYGEN system
 SLEEP – Timing in Simulink
 SRTF – Set run-time flags
 STATELOAD – Load multiple block states and parameters
 STATESAVE – Save multiple block states and parameters
 SYSEVENT – Read system log
 SYSLOG – Write system log
 TASK – Standard task of the REXYGEN system
 TIODRV – The REXYGEN system input/output driver with tasks
 WWW – Internal Web Server Content
3 INOUT – Input and output blocks
 Display – Numeric display of input values
 From, INSTD – Signal connection or input
 Goto, OUTSTD – Signal source or output
 GotoTagVisibility – Visibility of the signal source
 Inport, Outport – Input and output port
 SubSystem – Subsystem block
 INQUAD, INOCT, INHEXD – Multi-input blocks
 OUTQUAD, OUTOCT, OUTHEXD – Multi-output blocks
 OUTRQUAD, OUTROCT, OUTRHEXD – Multi-output blocks with verification
 OUTRSTD – Output block with verification
 QFC – Quality flags coding
 QFD – Quality flags decoding
 VIN – Validation of the input signal
 VOUT – Validation of the output signal
4 MATH – Math blocks
 ABS – Absolute value
 ADD – Addition of two signals
 ADDQUAD, ADDOCT, ADDHEXD – Multi-input addition
 CNB – Boolean (logic) constant
 CNE – Enumeration constant
 CNI – Integer constant
 CNR – Real constant
 DIF – Difference
 DIV – Division of two signals
 EAS – Extended addition and subtraction
 EMD – Extended multiplication and division
 FNX – Evaluation of single-variable function
 FNXY – Evaluation of two-variables function
 GAIN – Multiplication by a constant
 GRADS – Gradient search optimization
 IADD – Integer addition
 IDIV – Integer division
 IMOD – Remainder after integer division
 IMUL – Integer multiplication
 ISUB – Integer subtraction
 LIN – Linear interpolation
 MUL – Multiplication of two signals
 POL – Polynomial evaluation
 REC – Reciprocal value
 REL – Relational operator
 RTOI – Real to integer number conversion
 SQR – Square value
 SQRT – Square root
 SUB – Subtraction of two signals
 UTOI – Unsigned to signed integer number conversion
5 ANALOG – Analog signal processing
 ABSROT – Absolute rotation (multiturn extension of the position sensor)
 ASW – Switch with automatic selection of input
 AVG – Moving average filter
 AVS – Motion control unit
 AVSI – Smooth trajectory interpolation
 BPF – Band-pass filter
 CMP – Comparator with hysteresis
 CNDR – Nonlinear conditioner
 DEL – Delay with initialization
 DELM – Time delay
 DER – Derivation, filtering and prediction from the last n+1 samples
 EVAR – Moving mean value and standard deviation
 INTE – Controlled integrator
 KDER – Derivation and filtering of the input signal
 LPF – Low-pass filter
 MINMAX – Running minimum and maximum
 NSCL – Nonlinear scaling factor
 OSD – One Step Delay
 RDFT – Running discrete Fourier transform
 RLIM – Rate limiter
 S1OF2 – One of two analog signals selector
 SAI – Safety analog input
 SEL – Selector switch for analog signals
 SELQUAD, SELOCT, SELHEXD – Selector switch for analog signals
 SHIFTOCT – Data shift register
 SHLD – Sample and hold
 SINT – Simple integrator
 SPIKE – Spike filter
 SSW – Simple switch
 SWR – Selector with ramp
 VDEL – Variable time delay
 ZV4IS – Zero vibration input shaper
6 GEN – Signal generators
 ANLS – Controlled generator of piecewise linear function
 BINS – Controlled binary sequence generator
 BIS – Binary sequence generator
 BISR – Binary sequence generator with reset
 MP – Manual pulse generator
 PRBS – Pseudo-random binary sequence generator
 SG, SGI – Signal generators
7 REG – Function blocks for control
 ARLY – Advance relay
 FLCU – Fuzzy logic controller unit
 FRID – Frequency response identification
 I3PM – Identification of a three parameter model
 LC – Lead compensator
 LLC – Lead-lag compensator
 LPI – Loop performance index
 MCU – Manual control unit
 PIDAT – PID controller with relay autotuner
 PIDE – PID controller with defined static error
 PIDGS – PID controller with gain scheduling
 PIDMA – PID controller with moment autotuner
 PIDU – PID controller unit
 PIDUI – PID controller unit with variable parameters
 POUT – Pulse output
 PRGM – Setpoint programmer
 PSMPC – Pulse-step model predictive controller
 PWM – Pulse width modulation
 RLY – Relay with hysteresis
 SAT – Saturation with variable limits
 SC2FA – State controller for 2nd order system with frequency autotuner
 SCU – Step controller with position feedback
 SCUV – Step controller unit with velocity input
 SELU – Controller selector unit
 SMHCC – Sliding mode heating/cooling controller
 SMHCCA – Sliding mode heating/cooling controller with autotuner
 SWU – Switch unit
 TSE – Three-state element
8 LOGIC – Logic control
 AND – Logical product of two signals
 ANDQUAD, ANDOCT, ANDHEXD – Multi-input logical product
 ATMT – Finite-state automaton
 BDOCT, BDHEXD – Bitwise demultiplexers
 BITOP – Bitwise operation
 BMOCT, BMHEXD – Bitwise multiplexers
 COUNT – Controlled counter
 EATMT – Extended finite-state automaton
 EDGE – Falling/rising edge detection in a binary signal
 EQ – Equivalence two signals
 INTSM – Integer number bit shift and mask
 ISSW – Simple switch for integer signals
 ITOI – Transformation of integer and binary numbers
 NOT – Boolean complementation
 OR – Logical sum of two signals
 ORQUAD, OROCT, ORHEXD – Multi-input logical sum
 RS – Reset-set flip-flop circuit
 SR – Set-reset flip-flop circuit
 TIMER – Multipurpose timer
9 TIME – Blocks for handling time
 DATE – Current date
 DATETIME – Get, set and convert time
 TC – Timer control and status
 TIME – Current time
 WSCH – Weekly schedule
10 ARC – Data archiving
 10.1 Functionality of the archiving subsystem
 10.2 Generating alarms and events
 ALB, ALBI – Alarms for Boolean value
 ALM, ALMI – Alarm activation
 ALN, ALNI – Alarms for numerical value
 ARS – Archive store value
 10.3 Trends recording
 ACD – Archive compression using Delta criterion
 TRND – Real-time trend recording
 TRNDV – Real-time trend recording with vector input
 10.4 Archive management
 AFLUSH – Forced archive flushing
 ACLEAR – Forced archive purge
11 STRING – Blocks for string operations
 CNS – String constant
 CONCAT – Concat string by pattern
 FIND – Find a Substring
 ITOS – Integer number to string conversion
 LEN – String length
 MID – Substring Extraction
 PJROCT – Parse JSON string (real output)
 PJSOCT – Parse JSON string (string output)
 PJSEXOCT – Parse JSON string (string output)
 REGEXP – Regular expresion parser
 REPLACE – Replace substring
 RTOS – Real Number to String Conversion
 SELSOCT – Selector switch for string signals
 STOR – String to real number conversion
 TRIM – Remove leading and trailing whitechar
12 PARAM – Blocks for parameter handling
 GETPA – Block for remote array parameter acquirement
 GETPR, GETPI, GETPB – Blocks for remote parameter acquirement
 GETPS – Block for remote string parameter acquirement
 PARA – Block with input-defined array parameter
 PARE – Block with input-defined enumeration parameter
 PARR, PARI, PARB – Blocks with input-defined parameter
 PARS – Block with input-defined string parameter
 SETPA – Block for remote array parameter setting
 SETPR, SETPI, SETPB – Blocks for remote parameter setting
 SETPS – Block for remote string parameter setting
 SGSLP – Set, get, save and load parameters
 SILO – Save input value, load output value
 SILOS – Save input string, load output string
13 MODEL – Dynamic systems simulation
 CDELSSM – Continuous state space model of a linear system with time delay
 CSSM – Continuous state space model of a linear system
 DDELSSM – Discrete state space model of a linear system with time delay
 DFIR – Discrete finite input response filter
 DSSM – Discrete state space model of a linear system
 EKF – Extended (nonlinear) Kalman filter
 FOPDT – First order plus dead-time model
 IPEN2, IPEN3 – N-link inverted pendulum on cart - Physical parameters
 IPEN2pu, IPEN3pu – N-link inverted pendulum on cart - Dynamic parameters
 MDL – Process model
 MDLI – Process model with input-defined parameters
 MVD – Motorized valve drive
 NSSM – Nonlinear State-Space Model
 SOPDT – Second order plus dead-time model
14 MATRIX – Blocks for matrix and vector operations
 14.1 Implementation notice:
 CNA – Array (vector/matrix) constant
 MB_DASUM – Sum of the absolute values
 MB_DAXPY – Performs y := a*x + y for vectors x,y
 MB_DCOPY – Copies vector x to vector y
 MB_DDOT – Dot product of two vectors
 MB_DGEMM – Performs C := alpha*op(A)*op(B) + beta*C, where op(X) = X or op(X) = X^T
 MB_DGEMV – Performs y := alpha*A*x + beta*y or y := alpha*A^T*x + beta*y
 MB_DGER – Performs A := alpha*x*y^T + A
 MB_DNRM2 – Euclidean norm of a vector
 MB_DROT – Plain rotation of a vector
 MB_DSCAL – Scales a vector by a constant
 MB_DSWAP – Interchanges two vectors
 MB_DTRMM – Performs B := alpha*op(A)*B or B := alpha*B*op(A), where op(X) = X or op(X) = X^T for triangular matrix A
 MB_DTRMV – Performs x := A*x or x := A^T*x for triangular matrix A
 MB_DTRSV – Solves one of the system of equations A*x = b or A^T*x = b for triangular matrix A
 ML_DGEBAK – Backward transformation to ML_DGEBAL of left or right eigenvectors
 ML_DGEBAL – Balancing of a general real matrix
 ML_DGEBRD – Reduces a general real matrix to bidiagonal form by an orthogonal transformation
 ML_DGECON – Estimates the reciprocal of the condition number of a general real matrix
 ML_DGEES – Computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors
 ML_DGEEV – Computes the eigenvalues and, optionally, the left and/or right eigenvectors
 ML_DGEHRD – Reduces a real general matrix A to upper Hessenberg form
 ML_DGELQF – Computes an LQ factorization of a real M-by-N matrix A
 ML_DGELSD – Computes the minimum-norm solution to a real linear least squares problem
 ML_DGEQRF – Computes an QR factorization of a real M-by-N matrix A
 ML_DGESDD – Computes the singular value decomposition (SVD) of a real M-by-N matrix A
 ML_DLACPY – Copies all or part of one matrix to another matrix
 ML_DLANGE – Computes one of the matrix norms of a general matrix
 ML_DLASET – Initilizes the off-diagonal elements and the diagonal elements of a matrix to given values
 ML_DTRSYL – Solves the real Sylvester matrix equation for quasi-triangular matrices A and B
 MX_AT – Get Matrix/Vector element
 MX_ATSET – Set Matrix/Vector element
 MX_CNADD – Add scalar to each Matrix/Vector element
 MX_CNMUL – Multiply a Matrix/Vector by a scalar
 MX_CTODPA – Discretizes continuous model given by (A,B) to (Ad,Bd) using Pade approximations
 MX_DIM – Matrix/Vector dimensions
 MX_DIMSET – Set Matrix/Vector dimensions
 MX_DSAGET – Set subarray of A into B
 MX_DSAREF – Set reference to subarray of A into B
 MX_DSASET – Set A into subarray of B
 MX_DTRNSP – General matrix transposition: B := alpha*A^T
 MX_DTRNSQ – Square matrix in-place transposition: A := alpha*A^T
 MX_FILL – Fill real matrix or vector
 MX_MAT – Matrix data storage block
 MX_RAND – Randomly generated matrix or vector
 MX_REFCOPY – Copies input references of matrices A and B to their output references
 MX_SLFS – Save or load a Matrix/Vector into file or string
 MX_VEC – Vector data storage block
 MX_WRITE – Write a Matrix/Vector to the console/system log
 RTOV – Vector multiplexer
 SWVMR – Vector/matrix/reference signal switch
 VTOR – Vector demultiplexer
15 OPTIM – Optimization blocks
 QCEDPOPT – Quadratic Cost Economic Dispatch Problem optimization block
 QP_MPC2QP – Conversion of MPC problem to quadratic programming
 QP_OASES – Quadratic programming using active set method
 QP_UPDATE – Update matrices/vectors of quadratic programming
16 SPEC – Special blocks
 EPC – External program call
 HTTP – HTTP GET or POST request (obsolete)
 HTTP2 – Block for generating HTTP GET or POST requests
 RDC – Remote data connection
 REXLANG – User Programmable Block
 SMTP – Send e-mail message via SMTP
 STEAM – Steam and water properties
 UART – UART communication block
17 LANG – Special blocks
 PYTHON – User programmable block in Python
18 DSP – Digital Signal Processing blocks
 BSFIFO – Binary Structure - Queueing serialize and deserialize
 BSGET, BSGETOCT – Binary Structure - Get a single value of given type
 BSGETV, BSGETOCTV – Binary Structure - Get matrix (all values of the same given type)
 BSSET, BSSETOCT – Binary Structure - Set a single value of given type
 BSSETV, BSSETOCTV – Binary Structure - Set matrix of given type
 FFT – Fast Fourier Transform block
 MOSS – Motion smart sensor
 PSD – Power Spectral Density block
19 MQTTDrv – Communication via MQTT protocol
 MqttPublish – Publish MQTT message
 MqttSubscribe – Subscribe to MQTT topic
20 MC_SINGLE – Motion control - single axis blocks
 MCP_AccelerationProfile – Acceleration profile
 MCP_Halt – Stopping a movement (interruptible)
 MCP_HaltSuperimposed – Stopping a movement (superimposed and interruptible)
 MCP_Home – Homing
 MCP_MoveAbsolute – Move to position (absolute coordinate)
 MCP_MoveAdditive – Move to position (relative to previous motion)
 MCP_MoveContinuousAbsolute – Move to position (absolute coordinate)
 MCP_MoveContinuousRelative – Move to position (relative to previous motion)
 MCP_MoveRelative – Move to position (relative to execution point)
 MCP_MoveSuperimposed – Superimposed move
 MCP_MoveVelocity – Move with constant velocity
 MCP_PositionProfile – Position profile
 MCP_SetOverride – Set override factors
 MCP_Stop – Stopping a movement
 MCP_TorqueControl – Torque/force control
 MCP_VelocityProfile – Velocity profile
 MC_AccelerationProfile, MCP_AccelerationProfile – Acceleration profile
 MC_Halt, MCP_Halt – Stopping a movement (interruptible)
 MC_HaltSuperimposed, MCP_HaltSuperimposed – Stopping a movement (superimposed and interruptible)
 MC_Home, MCP_Home – Homing
 MC_MoveAbsolute, MCP_MoveAbsolute – Move to position (absolute coordinate)
 MC_MoveAdditive, MCP_MoveAdditive – Move to position (relative to previous motion)
 MC_MoveContinuousAbsolute, MCP_MoveContinuousAbsolute – Move to position (absolute coordinate)
 MC_MoveContinuousRelative, MCP_MoveContinuousRelative – Move to position (relative to previous motion)
 MC_MoveRelative, MCP_MoveRelative – Move to position (relative to execution point)
 MC_MoveSuperimposed, MCP_MoveSuperimposed – Superimposed move
 MC_MoveVelocity, MCP_MoveVelocity – Move with constant velocity
 MC_PositionProfile, MCP_PositionProfile – Position profile
 MC_Power – Axis activation (power on/off)
 MC_ReadActualPosition – Read actual position
 MC_ReadAxisError – Read axis error
 MC_ReadBoolParameter – Read axis parameter (bool)
 MC_ReadParameter – Read axis parameter
 MC_ReadStatus – Read axis status
 MC_Reset – Reset axis errors
 MC_SetOverride, MCP_SetOverride – Set override factors
 MC_Stop, MCP_Stop – Stopping a movement
 MC_TorqueControl, MCP_TorqueControl – Torque/force control
 MC_VelocityProfile, MCP_VelocityProfile – Velocity profile
 MC_WriteBoolParameter – Write axis parameter (bool)
 MC_WriteParameter – Write axis parameter
 RM_Axis – Motion control axis
 RM_AxisOut – Axis output
 RM_AxisSpline – Commanded values interpolation
 RM_HomeOffset – Homing by setting offset
 RM_Track – Tracking and inching
21 MC_MULTI – Motion control - multi axis blocks
 MCP_CamIn – Engage the cam
 MCP_CamTableSelect – Cam definition
 MCP_CombineAxes – Combine the motion of 2 axes into a third axis
 MCP_GearIn – Engage the master/slave velocity ratio
 MCP_GearInPos – Engage the master/slave velocity ratio in defined position
 MCP_PhasingAbsolute – Create phase shift (absolute coordinate)
 MCP_PhasingRelative – Create phase shift (relative to previous motion)
 MC_CamIn, MCP_CamIn – Engage the cam
 MC_CamOut – Disengage the cam
 MC_CombineAxes, MCP_CombineAxes – Combine the motion of 2 axes into a third axis
 MC_GearIn, MCP_GearIn – Engange the master/slave velocity ratio
 MC_GearInPos, MCP_GearInPos – Engage the master/slave velocity ratio in defined position
 MC_GearOut – Disengange the master/slave velocity ratio
 MC_PhasingAbsolute, MCP_PhasingAbsolute – Phase shift in synchronized motion (absolute coordinates)
 MC_PhasingRelative, MCP_PhasingRelative – Phase shift in synchronized motion (relative coordinates)
22 MC_COORD – Motion control - coordinated movement blocks
 MCP_GroupHalt – Stopping a group movement (interruptible)
 MCP_GroupInterrupt – Read a group interrupt
 MCP_GroupSetOverride – Set group override factors
 MCP_GroupSetPosition – Sets the position of all axes in a group
 MCP_GroupStop – Stopping a group movement
 MCP_MoveCircularAbsolute – Circular move to position (absolute coordinates)
 MCP_MoveCircularRelative – Circular move to position (relative to execution point)
 MCP_MoveDirectAbsolute – Direct move to position (absolute coordinates)
 MCP_MoveDirectRelative – Direct move to position (relative to execution point)
 MCP_MoveLinearAbsolute – Linear move to position (absolute coordinates)
 MCP_MoveLinearRelative – Linear move to position (relative to execution point)
 MCP_MovePath – General spatial trajectory generation
 MCP_MovePath_PH – General spatial trajectory generation PH
 MCP_SetCartesianTransform – Sets Cartesian transformation
 MCP_SetKinTransform_Arm – Kinematic transformation robot ARM
 MCP_SetKinTransform_UR – Kinematic transformation for UR robot
 MC_AddAxisToGroup – Adds one axis to a group
 MC_GroupContinue – Continuation of interrupted movement
 MC_GroupDisable – Changes the state of a group to GroupDisabled
 MC_GroupEnable – Changes the state of a group to GroupEnable
 MC_GroupHalt – Stopping a group movement (interruptible)
 MC_GroupInterrupt, MCP_GroupInterrupt – Read a group interrupt
 MC_GroupReadActualAcceleration – Read actual acceleration in the selected coordinate system
 MC_GroupReadActualPosition – Read actual position in the selected coordinate system
 MC_GroupReadActualVelocity – Read actual velocity in the selected coordinate system
 MC_GroupReadError – Read a group error
 MC_GroupReadStatus – Read a group status
 MC_GroupReset – Reset axes errors
 MC_GroupSetOverride – Set group override factors
 MC_GroupSetPosition, MCP_GroupSetPosition – Sets the position of all axes in a group
 MC_GroupStop – Stopping a group movement
 MC_MoveCircularAbsolute – Circular move to position (absolute coordinates)
 MC_MoveCircularRelative – Circular move to position (relative to execution point)
 MC_MoveDirectAbsolute – Direct move to position (absolute coordinates)
 MC_MoveDirectRelative – Direct move to position (relative to execution point)
 MC_MoveLinearAbsolute – Linear move to position (absolute coordinates)
 MC_MoveLinearRelative – Linear move to position (relative to execution point)
 MC_MovePath – General spatial trajectory generation
 MC_MovePath_PH – General spatial trajectory generation PH
 MC_ReadCartesianTransform – Reads the parameter of the cartesian transformation
 MC_SetCartesianTransform – Sets Cartesian transformation
 MC_UngroupAllAxes – Removes all axes from the group
 RM_AxesGroup – Axes group for coordinated motion control
 RM_Feed – MC Feeder ???
 RM_Gcode – CNC motion control
 RM_GroupTrack – T
23 CanDrv – Communication via CAN bus
 CanItem – Secondary received CAN message
 CanRecv – Receive CAN message
 CanSend – Send CAN message
24 OpcUaDrv – Communication using OPC UA
 OpcUaReadValue – Read value from OPC UA Server
 OpcUaServerValue – Expose value as an OPC UA Node
 OpcUaWriteValue – Write value to OPC UA Server
A Licensing options
B Licensing of individual function blocks
C Error codes of the REXYGEN system
D Special signals of the REXYGEN system
Bibliography

2024 © REX Controls s.r.o., www.rexygen.com