6 remanent variables, 7 object directory (parameter manager), Remanent variables – Lenze ETC Motion Control User Manual

Page 350: Object directory (parameter manager), Plc programming

Advertising
background image

PLC programming

Project planning
Remanent variables

8

8.4
8.4.6

l

350

EDSTCXN EN 2.0

8.4.5.2

Addressing data blocks

The data blocks (DB0 − DB15) are addressed via the area prefix "M".

Access type

Syntax

Comment

In bits

%MX x.y.z

x: number of the data block
y: word in the data block ( 0 ... 255 )
z: bit in the word ( 0 ... 15 )

In bytes

%MB x.y.z

x: number of the data block
y: word in the data block ( 0 ... 255 )
z: left (higher value) or right (lower value) byte
of the word (left = 1, right = 0)

In words

%MW x.y

x: number of the data block
y: word in the data block ( 0 ... 255 )

In double words

%MD x.y

x: number of the data block
y: double word in the data block ( 0 ... 127 )

(

Stop!

Double word access: Because of the internal data organisation
there is normally no point in a double word access, because high
and low words would be transposed (see example).

8.4.6

Remanent variables

With the key word "RETAIN" remanent data can be defined for the variable
declaration in CoDeSys (see CoDeSys documentation). A total of 12 kB are
available for remanent data.

8.4.7

Object directory (parameter manager)

It is possible in CoDeSys to create a so−called CANopen object directory which
can be read and written to by a CANopen device (e.g. CANopen control
terminal).

To enable the transfer of an object directory via the CAN Bus the object
directory must be announced to the control via the function
"InitServerSdo()" (see library "ServerSdo.lib").

)

Note!

When inserting the library "ServerSdo.lib" into the library
management of CoDeSys additional libraries (SysExtensions.lib,
SysLibCallback.lib, Netvarcan_Lib.lib) will be inserted
automatically.

An object directory can be created via the object directory editor of CoDeSys.
To be able to use the object directory editor the support for object directories
and network variables must be enabled in CoDeSys under
TargetSystemSettings −> Network functionality (see figure below).

Define the index or subindex range for SDO parameters and variables and
enter "CAN" as the name of supported network interfaces.

Advertising