CAN open Node SDO write
Block to send a CAN open SDO write
Description
This CAN open SDO write block sends an SDO write message to the CAN open node.
After this message is send the block waits for a response message for acknowledge of the write action.
Remarks
- Always use a CAN open node control block at the beginning to set the node to pre-operational.
- For most SDO write messages the CAN open node has to be in per-operational state.
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 selected in the mask is put on this output, this output should be the input
for the SDO write and read blocks.UINT8
start (port 2)
When the start input is 1, the message is send and the block waits the waiting time for a
response to check if the right object is written.
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 acknowledge. INT8
Data (port1)
The data wich has to be written on the specified index and sub index the value of the data
is specified in the CAN open node data sheet.Data type specified in parameters
Output
- Done (port1)
- The done port becomes 1 when the acknowledge message is received.
- When the waiting time is passed and no acknowledge message is received done will
- become -1. INT8
- Error(port1)
- 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.
- Data type
- The data type of the data to write at the set index an sub-index, this data type is specified
in the data sheet of the CAN open node.
- 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.