Plc programming – Lenze ETC Motion Control User Manual

Page 400

Advertising
background image

PLC programming

Library
CANopen functions

8

8.8
8.8.5

l

400

EDSTCXN EN 2.0

8.8.5.2

CopXDefineDS403 (only ETCxM)

FUNCTION CopXDefineDS403: BOOL

(* Defines the global database for a CANopen
control element in accordance with DS403 for
1/2 CAN Bus *)

VAR_INPUT

CanNum_b

: BYTE

NodeID_b

: BYTE

DataBase_p

: DINT;

Len_w

: WORD;

Datatypes_s

: STRING(255);

ReadDataObject

: WORD;

WriteDataObject : WORD;

END_VAR

CanNum_b:

Number of the CAN Bus (1 or 2)

NodeID_b:

Node number of the control element

DataBase_p:

Address of the global database with the input/output data of the
control element

Len_w:

Size of the global database in Byte, max. 1020 Byte

Datatypes_s:

Descriptor string for defining the data types in the global database

ReadDataObject:

Object number for reading the "Local database"

WriteDataObject:

Object number for describing the "Local database"

The functionality of this function is identical to the function
CopDefineDS403(). It contains an additional parameter CanNum_b, which
defines the number of the respective CAN Bus.

8.8.5.3

CopGetNodeState (only ETCxM)

FUNCTION CopGetNodeState: BOOL

VAR_INPUT

NodeID_b

: BYTE;

* CANopen ID of the module *)

END_VAR

NodeID_b:

Node number of the CANopen node

The return value TRUE signals that the corresponding CANopen module is
present at the 1st CAN Bus and in an "operational" state. Otherwise FALSE
will be returned. This detection only works if node guarding has been
enabled for the corresponding CANopen device.

Declaration

Parameters

Description

Declaration

Parameters

Description

Advertising