SDO_READ
SDOREAD is a function or service in the CANopen protocol that is used for reading data from a remote node (device) in a CANopen network. It allows one CANopen node (called the client) to request data from another CANopen node (called the server). The SDOREAD function is typically used for accessing objects (such as variables or parameters) that are stored in the Object Dictionary of the remote node.
INPUTS
INTERFACE_ID: This input represents the identifier of the interface used in the CANopen network. In CANopen protocol, systems that use multiple interfaces can specify which interface to operate on using the INTERFACE_ID input.
NODE_ID: This input represents the identifier of the target node (server) from which the data will be read. In a CANopen network, each device (sensor, actuator, controller, etc.) has a unique identifier, and the NODEID input determines which node the SDOREAD command will be sent to.
INDEX: This input represents the index of the object in the Object Dictionary of the target node that contains the data to be read. The Object Dictionary is a standardized data structure used in CANopen to organize and store objects (such as variables, parameters, or configuration data) in a device.
SUB_INDEX: This input represents the sub-index of the object in the Object Dictionary of the target node, if applicable. Some objects in the Object Dictionary may have sub-indices to further specify a specific part or element of the object.
TIME_INTERVAL: This input represents a time-related parameter and can be used for waiting or timing purposes for a specific duration. For example, if the SDOREAD command needs to be sent after a certain time interval, the TIMEINTERVAL input can be used to specify that time interval.
EVENT_INPUT: This input represents the status of an object or an event. For example, in case of detecting an error condition or when an event occurs, the EVENTINPUT input can be triggered and used to initiate the SDOREAD operation.
Outputs
ERROR: This output represents the error condition of the SDOREAD function. For example, in case of a communication error, object not found, or other errors, the ERROR output may become active to indicate the failure of the SDOREAD operation.
STATE: This output represents the current state of the function block. For example, in case of successful completion of the SDO_READ operation, the STATE output may represent a specific state such as “Completed” or “Success”.
DATA: This output represents the data read from the specified object in the Object Dictionary of the target node. The format and size of the data depend on the object being read and its definition in the Object Dictionary.