Function Blocks of REXYGEN
Reference manual

REX Controls s.r.o.

Version 2.50.12
2022-11-22
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 The signal quality corresponding with OPC
2 EXEC – Real-time executive 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
 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
 ISUB – Integer subtraction
 IMUL – Integer multiplication
 IDIV – Integer division
 IMOD – Remainder after integer division
 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
5 ANALOG – Analog signal processing
 ABSROT – Processing data from absolute position sensor
 ASW – Switch with automatic selection of input
 AVG – Moving average filter
 AVS – Motion control unit
 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
 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
 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
 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 – Logical product of multiple signals
 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 of two signals
 INTSM – Integer number bit shift and mask
 ISSW – Simple switch for integer signals
 INTSM – Integer number bit shift and mask
 ITOI – Transformation of integer and binary numbers
 NOT_ – Boolean complementation
 OR_ – Logical sum of two signals
 ORQUAD, OROCT, ORHEXD – Logical sum of multiple signals
 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
 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
 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
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)
 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
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
 DSSM – Discrete state space model of a linear system
 EKF – Extended (nonlinear) Kalman filter
 FOPDT – First order plus dead-time model
 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
 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 SPEC – Special blocks
 EPC – External program call
 HTTP – HTTP GET or POST request (obsolete)
 HTTP2 – Block for generating HTTP GET or POST requests
 SMTP – Send e-mail message via SMTP
 STEAM – Steam and water properties
 RDC – Remote data connection
 REXLANG – User programmable block
16 LANG – Special blocks
 PYTHON – User programmable block in Python
17 MQTT – Communication via MQTT protocol
 MqttPublish – Publish MQTT message
 MqttSubscribe – Subscribe to MQTT topic
18 MC_SINGLE – Motion control - single axis blocks
 RM_Axis – Motion control axis
 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_MoveRelative, MCP_MoveRelative – Move to position (relative to execution point)
 MC_MoveSuperimposed, MCP_MoveSuperimposed – Superimposed move
 MC_MoveContinuousAbsolute, MCP_MoveContinuousAbsolute – Move to position (absolute coordinate)
 MC_MoveContinuousRelative, MCP_MoveContinuousRelative – Move to position (relative to previous motion)
 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_AxisOut – Axis output
 RM_AxisSpline – Commanded values interpolation
 RM_Track – Tracking and inching
19 MC_MULTI – Motion control - multi axis blocks
 MC_CamIn, MCP_CamIn – Engage the cam
 MC_CamOut – Disengage the cam
 MCP_CamTableSelect – Cam definition
 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)
20 MC_COORD – Motion control - coordinated movement blocks
 RM_AxesGroup – Axes group for coordinated motion control
 RM_Feed – MC Feeder
 RM_Gcode – CNC motion control
 MC_AddAxisToGroup – Adds one axis to a group
 MC_UngroupAllAxes – Removes all axes from the group
 MC_GroupEnable – Changes the state of a group to GroupEnable
 MC_GroupDisable – Changes the state of a group to GroupDisabled
 MC_SetCartesianTransform – Sets Cartesian transformation
 MC_ReadCartesianTransform – Reads the parameter of the cartesian transformation
 MC_GroupSetPosition, MCP_GroupSetPosition – Sets the position of all axes in a group
 MC_GroupReadActualPosition – Read actual position in the selected coordinate system
 MC_GroupReadActualVelocity – Read actual velocity in the selected coordinate system
 MC_GroupReadActualAcceleration – Read actual acceleration in the selected coordinate system
 MC_GroupStop – Stopping a group movement
 MC_GroupHalt – Stopping a group movement (interruptible)
 MC_GroupInterrupt, MCP_GroupInterrupt – Read a group interrupt
 MC_GroupContinue – Continuation of interrupted movement
 MC_GroupReadStatus – Read a group status
 MC_GroupReadError – Read a group error
 MC_GroupReset – Reset axes errors
 MC_MoveLinearAbsolute – Linear move to position (absolute coordinates)
 MC_MoveLinearRelative – Linear move to position (relative to execution point)
 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_MovePath – General spatial trajectory generation
 MC_GroupSetOverride – Set group override factors
21 CanDrv – Communication via CAN bus
 CanItem – Secondary received CAN message
 CanRecv – Receive CAN message
 CanSend – Send CAN message
22 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
Bibliography

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