Herunterladen Inhalt Inhalt Diese Seite drucken

Notes On Programming; Programming Functions - IFM Electronic Ecomot 100 Handbuch

Datenspeicher/-logger für canopen-netzwerke
Vorschau ausblenden Andere Handbücher für Ecomot 100:
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

CAN
CR3101
MEM

10. Notes on programming

General
CANmem can be used either as CANopen or CAN Layer 2 unit. In the CAN Layer
2 mode no CANopen master is required (CANmen automatically switches to the
"OPERATIONAL" mode).
If CANmem is used as CANopen slave, it must be initialised by the R360 master
using the CANopen start functions "COP_MSTR_BOOTUP" and
"COP_MSTR_MAIN" and set to the state "OPERATIONAL".
As soon as a set identifier transmits data on the bus, the status LEDs "CAN" and
"Card Access" flash. The device is recording.
Please note that the structure of the CAN data in the application or in the con-
troller must be identical to the card structure.
To store a data record with 4 components of the type unsigned 16 for example,
the CAN object on the bus or in the controller program must have the following
structure:
CAN ID
LSB/MSB 1st value (WORD), LSB/MSB 2nd value (WORD),
LSB/MSB 3rd value (WORD), LSB/MSB 4th value (WORD).

Programming functions

To integrate the data memory into the application program ifm provides several
IEC function blocks. These function blocks can be found in the library "CAN-
mem_1.lib" of the ifm programming software CoDeSys.
Information concerning this library is given in the example programs and the li-
brary descriptions under CoDeSys.
If no configuration data are transferred to CANmem, the device uses the default
values set at the factory.
Before start-up change the CANmem node ID set at the factory, if necessary and
check the baud rate of the master and module. If the baud rates are not identi-
cal, set them accordingly. Default values:
Reading memory card data via a PDO
Via a PDO mode the memory card data can also be read from a controller. When
using ifm R360 controllers an IEC library is available for this operating mode
(CANmem_x.lib).
If no library is used the specified entries must be made in the object directory
20F5 (see page 40).
In that case the PDO handling must be taken into account in the user program,
as shown in the following.
48
Node ID
= 0x20 (= 32)
Baud rate = 0x03 (= 125 Kbits/s)

Werbung

Kapitel

Inhaltsverzeichnis
loading

Inhaltsverzeichnis