SDO communication from the PLC
ADS blocks are used for SDO communication from the PLC. These blocks can be used for sending SDO telegrams and receiving the response of the slave (ADSWRITE/ADSREAD).
Input parameters | Description |
---|---|
NETID | Local NetId of the BX or leave empty, e.g. with '' |
Port number | 0x1000hex + NodeId (slave number) |
IDXGRP | SDO Index |
IDXOFFS | SDO Subindex |
LEN | Length of SDO data (1...4) |
Download BX (sample file)
Setting individual or all nodes to pre-operational or operational state
The ADSWRTCTL function block can be used for setting individual CANopen nodes or all slaves to pre-operational or operational state.
Input parameters |
Description |
---|---|
NETID |
Local NetId of the BX or leave empty, e.g. with '' |
Port number |
0x1000hex + NodeId (slave number) / 153dec (all nodes) |
ADSSTATE |
ADSSTATE_RUN |
DEVSTATE |
1 - Pre / 0 - Operational |
LEN |
0 |
SRCADDR |
0 |
Download BX (sample file)
op_pre_operational.prx
Restarting the SSB interface
The ADSWRTCTL function block can be used to stop and restart the SSB. It should be stopped first before restarting it.
Input parameters |
Description |
---|---|
NETID |
Local NetId of the BX or leave empty, e.g. with '' |
Port number |
153dec |
ADSSTATE |
ADSSTATE_STOP, ADSSTATE_RUN |
DEVSTATE |
0 |
LEN |
0 |
SRCADDR |
0 |
or
Input parameters |
Description (from software version 1.16 for all BX controllers) |
---|---|
NETID |
Local NetId of the BX or leave empty, e.g. with '' |
Port number |
300dec |
ADSSTATE |
ADSSTATE_RESET |
DEVSTATE |
0 |
LEN |
4 |
SRCADDR |
ADR on a DWORD variable with the ID of the SSB device (the ID can be obtained from the System Manager file and is typically a value between 1 and 3). |