Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
160
Добавлен:
11.10.2020
Размер:
2.81 Mб
Скачать

PLC Configuration...

6.6.8Configuration of CAN modules...

CoDeSys supports a hardware configuration according to CANopen Draft Standard 301. The configuration looks like that described for the hardware dependant configuration.

All EDS (Electronic Data Sheet) respectively DCF (Device Configuration File) files which are stored in the configuration files directory CoDeSys is started, can be integrated, edited and displayed in the configuration. In the EDS file the configuration options of a CAN module are described. If you add a module, which is described in a DCF file, only the IEC addresses can be modified, for the module has already been configured completely in a CAN configurator.

Base parameters of a CAN Master

The Base parameters dialog of a CAN master matches that of the other modules (see chapter 6.6.5, 'Base parameters of an I/O Module').

CAN Parameters of a CAN Master

CAN Parameter Dialog for a CAN-Master

The properties for transmission on the CAN bus can be set directly after the insertion of the module or can be called up with the command ’Extras’ ‘Properties’.

Using the selection option, set the required Baud rate which the transmission should take place at.

One differentiates between synchronous and asynchronous transmission modes (see PDO properties) for PDO’s (Process Data Object). The synchronisation message is sent with a unique number Sync. COB-ID (Communication Object Identifier) in the interval in microseconds which is given by the Communication Cycle Period. The synchronous PDO’s are transmitted directly after the synchronisation message in the time window (Sync. Window Length in microseconds). No synchronisation message will be sent if the fields Comm. Cycle Period and Sync. Window Length contain 0.

activate: Only if this option is activated synchronization messages will be transmitted between master and slaves.

Node-Id: serves to identify the CAN module uniquely and corresponds to the set number on the module itself which is between 1 and 127. The Id must be entered as a decimal number. ( Do not mix up with the 'Node number' !)

The CAN bus will automatically initialised and started when downloading is occurring and when the controller system starts up if the option Automatic start is activated. The CAN bus must be started up in the project if this option is not active.

If the option Support DSP301,V3.01 and DSP306 is activated, then modular CAN Slaves as well as some additional extensions concerning the standards DSP301 V3.01 and DSP306 will be supported.

6-36

CoDeSys V2.3

6 - The Resources

In this case e.g. the stroke of the Heartbeat will be adjustable (Heartbeat Master [ms]:). Working with Heartbeats is an alternative guarding mechanism: In contrast to the Nodeguarding functionality it can be executed by Master- and Slave-Modules. Usually the master will be configured to send heartbeats to the slaves.

Module parameters of a CAN-Master

The module parameters dialog of a CAN master is the same as that for the other modules (see Chapter 6.6.5): The parameters which have been additionally assigned to the master in the configuration file, are displayed here and as a default the values can be edited.

Base parameters of a CAN module

The Base parameters dialog of a DP master matches that of the other modules (see chapter 6.6.5, 'Base parameters of an I/O Module').

IEC addresses by which the PDO’s (Process Data Object) in the project can be addressed are entered for output and input addresses, whereby the direction (input or output) is defined from view of the module.

A marker address must be given at the diagnostic address of the CAN module. It works like described for the CAN master.

The CAN parameters of a CAN module, which is not acting as master (global watching of the bus), are different to those of a CAN master.

Section General:

The Node-Id serves to identify the CAN module uniquely and corresponds to the set number on the module itself which is between 1 and 127. The Id must be entered as a decimal number.

If DCF write is activated, a DCF file will be created after inserting an EDS file in the defined directory for the compiled files whose name is made up of the name of the EDS file and the Node Id which is tacked on the end.

If the option Create all SDO's is activated, then for all objects SDO's will be created (not only for those that have been modified).

If the option Reset node is activated, then the slave will be reset before downloading the configuration.

CAN parameters of a CAN Module

Section Node guard: (alternatively to guarding by the Heartbeat mechanism)

If the option Nodeguarding is activated, a message will be sent to the module according to the interval set by Guard Time in milliseconds. If the module does not then send a message with the given Guard COB-ID (Communication Object Identifier), it will receive the status "timeout". As soon as the number of attempts (Life Time Factor) has been reached, the module will receive the status "not OK". The status of the module will be stored at the diagnosis address. No monitoring of the module will occur if the variables Guard Time and Life Time Factor are not defined (0).

Section Heartbeat Settings: (alternatively to Nodeguarding)

If the option Activate Heartbeat Producer is activated, the module will send heartbeats according to the interval defined in Heartbeat Producer Time: given in ms.

If the option Activate Heartbeat Consumer is activated, then the module will listen to heartbeats which are sent by the master. As soon as no more heartbeats are received, the module will switch off the I/Os.

CoDeSys V2.3

6-37

PLC Configuration...

CAN parameters Dialog for a CAN Module

Section Emergency Telegram:

A module sends an emergency message, with a unique COB-Id., when there is an internal error. These messages, which vary from module to module, are stored in the diagnosis address.

The entries "FileInfo" and "DeviceInfo" of the EDS or DCF file from the corresponding module manufacturer are hidden behind the Info button.

CAN Modules Selection for Modular Slaves

In the left column (Available modules) you find all modules which are available for the slave. Mark the desired modules and by using the buttons Add and Remove create a selection in the right column (Selected Modules). The PDOand SDO selection will be updated automatically.

PDO mapping of a CAN module

The tabs Receive PDO mapping and Send PDO mapping in the configuration dialog for a CAN module allow the "mapping" of the module, which is described in the EDS file, to be changed.

All of the "mapable" objects in the EDS file are located on the left side and can be added in the right side to the PDO's (Process Data Object) (">>" button) or removed again (Remove button). The StandardDataTypes can be inserted to create empty spaces in the PDO.

6-38

CoDeSys V2.3

6 - The Resources

Configuration of a CAN module, PDO-Mapping

The button Insert Element can be used to create further PDO's and to add appropriate objects to them. The allocation of inputs or outputs to the IEC addresses can be achieved over the inserted PDO's. The settings which have been made in the controller system configuration will become visible when one leaves the dialog. The individual objects can be afforded symbolic names there.

The standard set properties of the PDO's can be edited using Properties.

PDO Properties dialog

Each PDO message requires a unique COB-Id (Communication Object Identifier).

The field appears in grey and cannot be edited if an option is not be supported by the module or if the value cannot be changed.

The Inhibit Time is the minimum time between two messages from this PDO. This is to prevent PDO's which are sent when the value is changed from being sent too often.

The CMS Priority Group cannot be changed and describes the relative importance of the PDOs during the CAN transmission. Values from 0 to 7 are displayed, whereby 0 is the highest.

Transmission Type offers you a selection of possible transmission modes for this module: acyclic - synchronous: the PDO will be transmitted synchronously but not periodically.

cyclic – synchronous: the PDO will be transmitted synchronously, whereby the Number of Sync's gives the number of synchronisation messages, which lie between two transmissions of this PDO.

CoDeSys V2.3

6-39

PLC Configuration...

synchronous – RTR only: the PDO will be updated after each synchronisation message but not sent. It is only sent when there is an explicit request to do so (Remote Transmission Request)

asynchronous – RTR only: the PDO will only be updated and transmitted when there is an explicit request to do so (Remote Transmission Request)

asynchronous – device profile specific and asynchronous - manufacturer specific: the PDO will only be transmitted when specific events occur.

Number of Syncs: If cyclic transmission has been set, enter here the number of synchronisation messages (see 'Com. Cycle period' in the CAN parameter dialog) which should be sent between two transmissions of the PDO.

Event-Time: If an corresponding transmission type is set, enter here in milliseconds (ms) the interval between two transmissions.

Service Data Objects

Here you find a list of all objects in the EDS or DCF file which are in the area of the Index 0x2000 to 0x9FFF and which are marked as writable.

Dialog for configuration of the Service Data Objects (SDO)

The properties Index, Name, Value, Type and Default are displayed for every object. The value can be changed. Mark the value and press the <Space bar>. After making the change confirm the new value with <Enter> or reject it with the <Escape> key.

The set values are transmitted in the form of SDO's (Service Data Object) to the CAN modules at the initialisation of the CAN bus.

Note: All incompatible data types between CANopen and IEC-61131 will be replaced in CoDeSys by the next larger IEC-61131 data type.

6-40

CoDeSys V2.3

Соседние файлы в папке 759-333