CAN open Node control

Block to control a CAN open node


Description

This CAN open node control block sends the message to set the node in the specified state. This state can be selected in the mask. After the state request is send the block sends a RTR message to check if the node is in the set state. When this is the case the done output will become 1.


Remarks


Declaration

Use the CAN config block:


Input

start (port 1)
When the start input is 1, the message is send and the block waits the waiting time for a
response to check if the node is in the right state.
When start is made 0 again, done becomes 0 too.
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


Output
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
Done (port2)
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
State (port3)
The state response from the controller is put on this output.UINT8
  • 4 = 0x04 Stopped
  • 5 = 0x05 Operational
  • 127 = 0x7F Pre-Operational

  • Parameters
    CAN channel
    Select the used channel: 1, 2, 3 or 4.
    Node ID
    The CAN open node ID, can be a number between 1 and 0x3F.
    Be aware when ID of 0 is chosen, this means all the messages send with this ID are for all
    the CAN open nodes on the bus (advise to never use this).
    Go to state
    Select the state to go to.
  • Pre-operational: all settings can be set in this state, no PDO messages will be send right now.
  • Operational: the node is started now, many settings are locked in this state and PDO messages will be send.
  • Stop: the node is stopped, no communication is possible only state messages will be received by the CAN open node.
  • Reset: the node is completely reset and behaves like it is rebooted the node automatically goes into pre-operational state.
  • Reset Communication: is a reset of the communication functions. Objects 0x1000 - 0x1FFF are reset to their power-on defaults.
    Response waiting time
    The maximum time the block has to wait for a acknowledge response 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.