beautypg.com

5 canopen functions, Canopen functions, Plc programming – Lenze ETC Motion Control User Manual

Page 398

background image

PLC programming

Library
CANopen functions

8

8.8
8.8.5

l

398

EDSTCXN EN 2.0

8.8.5

CANopen functions

8.8.5.1

CopDefineDS403

FUNCTION CopDefineDS403: BOOL

VAR_INPUT

(* Defines the global database for a CanOpen control element in
accordance with DS403 *)

NodeID

: BYTE;

DataBase

: DINT;

DataSize

: WORD;

Datatypes

: STRING(255);

ReadDataObject

: WORD;

WriteDataObject : WORD;

END_VAR

NodeID

Node number of the control element

DataBase

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

DataSize

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

Datatypes

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"

This function supplies the runtime system with a data range of the PLC for
the data exchange with a CANopen control element. This data range is best
created in the PLC as a data structure or an array and initialised with the data
to be displayed. After calling this function this global database is copied once
completely into the local database of the corresponding node. Afterwards
only the modifications of the display data will be transferred by the control
system.

ReadDataObject and WriteDataObject are the object numbers of the object
directory of the CANopen display which must be used by the runtime system
to read from and write to the local database.

The descriptor string has the following format:

...

Number is a decimal number and defines the data quantity for the following
type.

Declaration

Parameters

Description