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

ADS NetID of the CAN interface

Port number

0x1000hex + NodeId (slave number)

IDXGRP

SDO Index

IDXOFFS

SDO Subindex

LEN

Length of SDO data (1...4)

Setting individual CANopen nodes to pre-operational or operational state

The ADSWRTCTL block can be used to set individual CANopen nodes to pre-operational or operational state.

Input parameters

Description

NETID

ADS NetID of the CAN interface

Port number

0x1000hex + NodeId (slave number)

ADSSTATE

ADSSTATE_RUN

DEVSTATE

0 - Pre / 1 - Operational

LEN

0

SRCADDR

0

Restarting the CAN interface

The ADSWRTCTL block can be used to stop and restart the SSB. It should be stopped first before restarting it.

Input parameters

Description

NETID

ADS NetID of the CAN interface

Port number

200dec

ADSSTATE

ADSSTATE_STOP, ADSSTATE_RUN

DEVSTATE

0

LEN

0

SRCADDR

0