SDO_WRITE_DATA (FB) ¶ FUNCTION_BLOCK SDO_WRITE_DATA EXTENDS CiA405Base This function block is used for writing a specific object in object dictionary of a DEVICE . If DATA was written without error CONFIRM becomes TRUE . DATA has to be in Little Endian byte order. If an error occurs ERROR becomes unequal 0. In case of a SDO abort ERROR is set to CANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_OTHER_ERROR and ERRORINFO contains the associated abort code (in Little endian) as defined by CiA 301. InOut: Scope Name Type Initial Comment Inherited from Input NETWORK USINT 1 CAN network number the function block should operate on. Note: It is not the same like the network number in CANBus configurator. The CiA405 NETWORK is calculated by NetID + 1. Example: 1 = CAN0, 2 = CAN1, 3 = CAN2, … CiA405Base ENABLE BOOL FALSE Enables the function block on rising edge. Aborts operation on falling edge. CiA405Base TIMEOUT UDINT 0 Timeout in ms; 0 means no timeout CiA405Base Output CONFIRM BOOL FALSE TRUE : function block finished without error CiA405Base ERROR CANOPEN_KERNEL_ERROR CANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_NO_ERROR Error code: see CANOPEN_KERNEL_ERROR for further details CiA405Base Input DEVICE DEVICE NodeID of destination device; 0 means local device (= CANopenManager) CHANNEL USINT 1 SDO channel: 0: use any free channel; 1..n: specific channel INDEX WORD Index of object SUBINDEX BYTE SubIndex of object MODE SDO_MODE SDO_MODE.AUTO specifies the SDO Mode to be used DATA POINTER TO BYTE pointer to data which should be written (data has to be in little endian byte order) DATALENGTH UDINT length of data in bytes Output ERRORINFO SDO_ERROR contains abort code in little endian in case of ERROR is CANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_OTHER_ERROR
obsolete (only for compatibility) ¶ SDO_READ (FunctionBlock) SDO_WRITE (FunctionBlock)
Types ¶ DEVICE (Alias) SDO_ERROR (Alias)
DEVICE (ALIAS) ¶ TYPE DEVICE : USINT (0..127) Defines a NodeID of a device.
SDO_ERROR (ALIAS) ¶ TYPE SDO_ERROR : UDINT Contains a SDO abort code (see CiA 301)
analog monitors ¶ Hysteresis_DINT (FunctionBlock) Hysteresis_LREAL (FunctionBlock) LimitAlarm_DINT (FunctionBlock) LimitAlarm_LREAL (FunctionBlock) sgn (Function)
Hysteresis_DINT (FB) ¶ FUNCTION_BLOCK Hysteresis_DINT This function block will set the output variable to TRUE , if the integral value \(x \in \mathbb{Z}\) is smaller than an integral lower bound \(x_{u} \in \mathbb{Z}\) It will set the Boolean output variable to FALSE , if the input value \(x\) exceeds the integral upper bound \(x_{o} \in \mathbb{Z}\) . If \(x\) lies between the lower and upper bound, the value of the output will rest unchanged by the module. InOut: Scope Name Type Comment Input diValue DINT input value \(x \in \mathbb{Z}\) diLimitPos DINT upper bound \(x_{o} \in \mathbb{Z}\) diLimitNeg DINT lower bound \(x_{u} \in \mathbb{Z}\) Output xOut BOOL FALSE : If \(x > x_{o} \land x_{u} < x_{o}\) TRUE : If \(x < x_{u} \land x_{u} < x_{o}\) “ xOut ” else
Hysteresis_LREAL (FB) ¶ FUNCTION_BLOCK Hysteresis_LREAL This function block will set the output variable to TRUE , if the input value \(x \in \mathbb{R}\) is smaller than a lower bound \(x_{u} \in \mathbb{R}\) . It will set the output variable to FALSE , if the input value \(x\) exceeds the upper bound \(x_{o} \in \mathbb{R}\) . If \(x\) lies between the lower and the upper bound, the value of the output variable will rest unchanged by the module. InOut: Scope Name Type Comment Input lrValue LREAL input value \(x \in \mathbb{R}\) lrLimitPos LREAL upper bound \(x_{o} \in \mathbb{R}\) lrLimitNeg LREAL lower bound \(x_{u} \in \mathbb{R}\) Output xOut BOOL FALSE : If \(x > x_{o} \land x_{u} < x_{o}\) TRUE : If \(x < x_{u} \land x_{u} < x_{o}\) “ xOut ” else
LimitAlarm_DINT (FB) ¶ FUNCTION_BLOCK LimitAlarm_DINT This function block checks whether an integral value \(x \in \mathbb{Z}\) lies between an integral lower bound \(x_{u} \in \mathbb{Z}\) and an integral upper bound \(x_{o} \in \mathbb{Z}\) . The output value will be set according to the result. InOut: Scope Name Type Comment Input diValue DINT value \(x \in \mathbb{Z}\) to be tested diLimitPos DINT upper bound \(x_{o} \in \mathbb{Z}\) diLimitNeg DINT lower bound \(x_{u} \in \mathbb{Z}\) Output xExceedsPos BOOL TRUE : If \(x > x_{o}\) FALSE : Else xExceedsNeg BOOL TRUE : If \(x < x_{u}\) FALSE : Else xInLimits BOOL TRUE : If \(x_{u} \leq x \leq x_{u}\) FALSE : Else, also in the atypical case \(x_{o} < x_{u}\)
LimitAlarm_LREAL (FB) ¶ FUNCTION_BLOCK LimitAlarm_LREAL This function block checks whether the value \(x \in \mathbb{R}\) lies between an lower bound \(x_{u} \in \mathbb{R}\) and an upper bound \(x_{o} \in \mathbb{R}\) . The output value will be set according to the result. InOut: Scope Name Type Comment Input lrValue LREAL value \(x \in \mathbb{R}\) to be tested lrLimitPos LREAL upper bound \(x_{o} \in \mathbb{R}\) lrLimitNeg LREAL lower bound \(x_{u} \in \mathbb{R}\) Output xExceedsPos BOOL TRUE : If \(x > x_{o}\) FALSE : Else xExceedsNeg BOOL TRUE : If \(x < x_{u}\) FALSE : Else xInLimits BOOL TRUE : If \(x_{u} \leq x \leq x_{u}\) FALSE : Else, also in the atypical case \(x_{o} < x_{u}\)