CAN open Node SDO read
Block to send a CAN open SDO read message
Description
This CAN open SDO read block sends the message to read the data of the set index and sub-index, and
then put this data on the data output port. When no error occurs the done port becomes 1.
Remarks
- Always first use a CAN open node control block to set the node to pre-operational otherwise the rest wont function.
Declaration
Use the CAN config block:
- To set the baudrate for the selected CAN channel.
- To enable the specific CAN channel.
Input
Node ID (port1)
The node ID input should be connected to the node control node ID output.UINT8
start (port 2)
When the start input is 1, the message is send and the block waits the waiting time for a
response message with the right data.
When start is made 0 again, all the outputs becomes 0.
After start has been 0 and it is made 1 the message will be send again, and the block will
again wait for the response. INT8
Output
- Done (port1)
- The done port becomes 1 when the data message is received.
- When the waiting time is passed and no respond message is received done will
- become -1. INT8
- Data (port2)
- The received data from the CAN open node is put on this port.UINT32
- Error(port3)
- When an error occurs the error message will be put on this output.
- When the waiting time is passed the error code is 0x11111111 the other error codes are
CAN open or node specific and can be found in the data sheet of the specific node.UINT32
Parameters
- CAN channel
- Select the used channel: 1, 2, 3 or 4.
- Index
- The CAN open index of the object to read, this is normally specified in the node data sheet in a Hex value.
- Sub-index
- The CAN open sub-index of the object to read, this is also specified in the node data sheet.
- Response waiting time
- The maximum time the block has to wait for a response message in milliseconds.
- Sample time
- Sample time of the block. The Sample time (in seconds) defines
the rate at which the block is visited by the real-time scheduler of
the target. The value of the Sample time has to be an integer multiple
of the base sample time of the model.