Parker C3 powerPLmC

Control programmable according to IEC61131-3 with motion functions

Description: C3 powerPLmC-E20
Help verison: C3 powerPLmC-E20 192-120210N1 June 2005

C3 powerPLmC-E20 version: as from V1.1.0

Data required for operation:
  • Programming system CoDeSys as from version V2.3.4.1.
  • C3 powerPLmC_E20 - Target as from V1.0.6
    (can be downloaded as tooltip from the InstallTarget program.)
Designation / Versions of connected servo axes:
  • Compax3 I21Txx as from version V2.3.18.

Commissioning recipe

C3 powerPLmC-E20 system network


Copyright / addresses

____________________________

Copyright © 2005 Parker Hannifin GmbH EME
All rights reserved.

Windows NT®, Windows 2000™, Windows XP™ are trademarks of Microsoft Corporation.

EME - Electromechanical Automation Europe

Germany:

Parker Hannifin GmbH&Co.KG
Electromechanical Automation
PO Box: 77607-1720
Robert-Bosch-Str. 22
D-77656 Offenburg
Tel.: +49 (0)781 509-0
Fax: +49 (0)781 509-98176

ISO-Sign

E-mail: sales.hauser@parker.com

Internet: www.parker-eme.com

England:

Parker Hannifin plc
Electromechanical Automation
Arena Business Centre
Holy Rood Close
Poole, Dorset BH17 7BA UK
Tel.: +44 (0)1202 606300
Fax: +44 (0)1202 606301

E-mail: sales.digiplan@parker.com

Internet: www.parker-eme.com

Italy:

Parker Hannifin S. p. A
Electromechanical Automation
Via Gounod 1
I-20092 Cinisello Balsamo (MI), Italy
Tel.: +39 (0)2660 12459
Fax: +39 (0)2660 12808

E-mail: sales.sbc@parker.com

Internet: www.parker-eme.com

EMN - Electromechanical Automation North America

USA:

Parker Hannifin Corporation
Electromechanical Automation
5500 Business Park Drive
Rohnert Park, CA 94928
Phone #: (800) 358-9068
FAX #: (707) 584-3715

E-mail: CMR_help@parker.com
Internet: www.compumotor.com


Introduction

In this chapter you can read about:

Device assignment

Safety Instructions

Warranty conditions

Conditions of utilization for CE conform operation of the C3 powerPLmC-E2x


Device assignment

This manual applies to the following devices:
  • C3 powerPLmC E20


Safety Instructions

In this chapter you can read about:

General hazards

Safety-conscious working

Special safety instructions


General hazards

General Hazards on Non-Compliance with the Safety Instructions

The device described in this manual is designed in accordance with the latest technology and is safe in operation. Nevertheless, the device can entail certain hazards if used improperly or for purposes other than those explicitly intended.

Electronic, moving and rotating components can

  • constitute a hazard for body and life of the user, and
  • cause material damage

Usage in accordance with intended purpose

The device is designed for operation in electric power drive systems (VDE0160). Motion sequences can be automated with this device. Several motion sequences can be combined by interconnecting several of these devices. Mutual interlocking functions must be incorporated for this purpose.


Safety-conscious working

This device may be operated only by qualified personnel.

Qualified personnel in the sense of these operating instructions consists of:

  • Persons who, by virtue to their training, experience and instruction, and their knowledge of pertinent norms, specifications, accident prevention regulations and operational relationships, have been authorized by the officer responsible for the safety of the system to perform the required task and in the process are capable of recognizing potential hazards and avoiding them (definition of technical personnel according to VDE105 or IEC364),
  • Persons who have a knowledge of first-aid techniques and the local emergency rescue services.
  • Persons who have read and will observe the safety instructions.
  • Those who have read and observe the manual or help (or the sections pertinent to the work to be carried out).

    This applies to all work relating to setting up, commissioning, configuring, programming, modifying the conditions of utilization and operating modes, and to maintenance work.

    This manual and the help information must be available close to the device during the performance of all tasks.


Special safety instructions

  • Check the correct association of the device and its documentation.
  • Never detach electrical connections while voltage is applied to them.
  • Safety devices must be provided to prevent human contact with moving or rotating parts.
  • Make sure that the device is operated only when it is in perfect condition.
  • Implement and activate the stipulated safety functions and devices.
  • Operate the device only with the housing closed.
  • Ensure that motors and any linear drives present are mounted securely.
  • Check that all live terminals are secured against contact. Fatal voltage levels of to 750V occur.
  • Attention when performing a configuration download for master-slave couplings (electronic gearbox, cam)
    Always switch Compax3 to currentless before starting the configuration download Master and Slave axis

  • Before generating a boot project, (program is saved in FLASH), perform a program stop, since uncontrolled movements are possible while a boot project is being generated.
  • Attention!
    During the program test, note the motion sequences of your drive.
    Especially when working with break points, online changes, coercing variables, sequence control or debugging, it is always essential to ensure that only controlled motion sequences take place.
    These functions can change the control sequence of the program and affect behavior related to the program sequence and program execution time!
    Online change and forcing variables directly affects sequence logic.


Warranty conditions

  • The device must not be opened.
  • Do not make any modifications to the device, except for those described in the manual.
  • Make connections to the inputs, outputs and interfaces only in the manner described in the manual.
  • When installing the device, make sure the heat dissipator receives sufficient air.
  • Attach the devices according to the mounting instructions, using the provided fixing holes. We cannot provide any guarantee for any other mounting methods.


Conditions of utilization for CE conform operation of the C3 powerPLmC-E2x

The EC guidelines for electromagnetic compatibility 89/336/EEC and for electrical operating devices for utilization within certain voltage limits 73/23/EEC are fulfilled when the following boundary conditions are observed:

Operation of the devices only in the condition in which they were delivered, i.e. with all housing panels.

The limit values according to DIN EN 55022 class A are only respected, if a 47nF Y-condenser is connected to the PE-connection.

The device is only suitable for industrial use.

Data cable:

Do only use screened cables!

Standards applied:

DIN EN 55022: | Radio disturbance suppression properties for information technology equipment
DIN EN 61000-6-2: | Disturbance immunity for the industrial sector
DIN EN 61000-4-2: | Discharge of static electricity
DIN EN 61000-4-4: | Disturbance immunity against fast transients
DIN EN 61000-4-4: | Disturbance immunity against conducted emissions


C3 powerPLmC: Control via IEC61131-3 and PLCopen

C3 powerPLmC is a control system for combined PLC, motion and visualization tasks.

The power range of commands based IEC61131-3 is available for control tasks. Multi-axis motion tasks are supported by PLCopen function modules.

The program can be subdivided into free-running, cyclic and event-controlled tasks.

Visualization can be implemented via the OPC server, on the PC of the programming system itself or with a bus component (for example Parker Operator Panel).

CANopen combines the bus components with the CANopen master "C3 powerPLmC".

The C3 powerPLmC can be programmed using the "CoDeSys" high-power programming system via the Ethernet interface.

The "CoDeSys" programming system is described in detail in a help system (C:\Programme\3S Software\CoDeSys V2.3\Help\) or in a manual (C:\Programme\3S Software\CoDeSys V 2.3\Documents\) available as a PDF.

Basic configuration is made on a PC using the C3 powerPLmC Manager.
Install the program on your PC and connect the PC to the C3 powerPLmC-E20 via RS232


Step-by-step set-up

Sequence for the setup with C3 powerPLmC:

1. Installation
  • C3 powerPLmC Manager
  • CoDeSys and install new Targets from the Compax3 - CD (delete old Parker-Targets beforehand)
2. Connections
  • PC - C3 powerPLmC-E20 COM1 via RS232 - cable (SSK1 & Gender Changer).
  • PC - C3 powerPLmC-E20 via Ethernet cable.
3. Configure C3 powerPLmC
  • Execute Initialization of the C3 powerPLmC-E20 in the C3 power PLmC Manager.
  • Call up CoDeSys (in the tree under C3 powerPLmC: CoDeSys: Start CoDeSys)
  • In CoDeSys: File new; select target system "CoDeSys for C3 powerPLmC E2x" -> OK
  • Select programming language (for example CFC)
  • Under Online: Set LAN-Address of the C3 powerPLmC communication parameters CoDeSys
5. Create IEC61131-3 program
  • Create IEC61131-3 program
  • Compile the project
  • Online: Log in and start the program with Online: Start.
    The program can be permanently stored in the C3 powerPLmC with Generate Boot Project.


Device description C3 powerPLmC

In this chapter you can read about:

Plug and connector assignment for C3 powerPLmC-E20

Chassis


Plug and connector assignment for C3 powerPLmC-E20

In this chapter you can read about:

Displays and operating elements

LED behavior

Power supply voltage

LAN

COM 1 and COM 2

COM 3 and COM 4

CAN Bus

DP - SLAVE (Profibus)

Plug and connector assignment E20


Displays and operating elements

All LEDs (except USR1...3 - LEDs) show a standard behavior.

Display + operating elements

RST button: User Reset

The RST button triggers a system reset. It can be pressed with the aid of a pointed object.

Real time clock

The real-time clock is buffered by a lithium battery and has a lifetime of about 7 years.

LEDs at the LAN connector

Description:

Yellow LED (DAT): Link

Green LED (LNK): Send or receive package

HEX coding switch

The functions of the two HEX - coding switch can be, except for the "FF" position (initialization), freely defined.

Power on with the switch in "FF" position means that the device switches to the initialization mode. In this case, the IEC61131-3 user program ist not started. The "FF" switch position can therefore also be used to avoid the starting of the program.

Those switches can be operated without the aid of a tool.

Hex coding switch


Switches Switch - L, Switch - H

There are two switches on the C3 powerPLmC: Switch-L(ow) and Switch-H(igh).

Those are contained in the controller configuration. They are considered as byte, switch-L representing the LowNibble[2] and switch-H respresenting the HighNibble[2].

Switches can be considered as inputs which can be used to parameterize programs.

Example:

CASE Switch OF

16#01:

LEDState := 16#04;

16#02:

LEDState := 16#02;

16#03:

LEDState := 16#01;

16#1A, 16#1B, 16#AA, 16#FF:

LEDState := 0;

END_CASE

[2] Nibble: Half of a byte


LED behavior

VCC

  • Voltage supply present.
  • can not be controlled via CoDeSys

RUN

State |
Jitter | No program loaded
Flashing | Program loaded - Stop
On | Program is running
Single pulse | The debug task stands on a breakpoint
Douple pulse | At least one task was stopped by an exception
See CoDeSys Project RUN_LED

CAN1 / CAN2

State |
Off | CANopen Master not defined (controller configuration)
Jitter | CANopen Master not available
Flashing | The CANopen Master is initialized but not started
On | The CANopen Master is initialized and started
Single pulse | An error occurred during the IDENTIFY sequence
Douple pulse | A nodeguarding error has occured

The standard behavior can be switched off.


Control of the LEDs via CoDeSys

In principal, all LEDs (except the VCC-LED) can be controlled via CoDeSys.
The Standard behavior is then no longer valid.

The following graph shows the controller configuration.

Remark
  • Please note that for the user LEDs the USR1 is linked to the 3rd lowest order bit, the USR2 is linked to the 2nd lowest order bit and the USR3 is linked to the lowest order bit!
  • CAN1 is also linked to a higher order bit than CAN2!
Control of the LEDs

Via LEDControl the user can define, which LEDs shall be controlled via CoDeSys. The respective bit must be set to 1.

BitNo | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
LED | - | RUN | CAN1 | CAN2 | DP-S | USR1 | USR2 | USR3

In order to control, for example, all 3 user LEDs, please enter the following line in CoDeSys:

LEDControl := 16#07;

You have also the possibility to access the LEDs separately:

LEDControl.4 := TRUE; (* CAN2 is user-controlled *) (* the other bits keep their status *)

Remark:

The LEDControl bits can also be set or deleted manually during the run time of the program via the control configuration.

LEDStatus (control configuration):

Via LEDStatus the user LEDs are activated (Bit="1") / deactivated (Bit="0").

Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
LED | - | RUN | CAN1 | CAN2 | DP-S | USR1 | USR2 | USR3

Example:

LEDStatus := 16#03; (* only Usr3 and Usr2 are activated *)

Here it is also possible to switch LEDs separately:

LEDStatus.4 := TRUE; (* CAN2 is activated *)

(* The remaining bits keep their status *)

Remark

The LEDStatus bits can also be activated or deactivated manually during the run time of the program via the control configuration.

Remark
  • All LEDs not controlled via CoDeSys by the user, show their standard behavior.
  • The USR-LEDs no not have a standard behavior.
  • The VCC LED cannot be controlled.
Caution

If the desired behavior does not occur, you have to verify the following:

  • Are the ControlBits set correctly?
    ControlBit = 1 -> CoDeSys(user)
  • Is the mode set?
    (if mode = LED_OFF, the lamp is always extinct!)
  • Is the desired LED activated via LEDStatus?
    • A pulse behavior extends normally over several cycles (phases). Therefore you have to respect when monitoring the LED statuses that LEDStatus is not set again in each cycle (this would reset the status always to phase 1 of the status sequence and therefore be no progress at all).
    • A changed status is only written at the end of a cycle!


Power supply voltage

Power, 3-pol, male (WAGO 734-133)

PIN | Signal | Level | Function
1 | VCC | +20VDC ... +30VDC | Supply voltage input
2 | PE |  | Grounding connection, connected to housing galvanically
3 | GND | 0V | Basis
Caution!
The following connections must be made at the 24V supply.

2 suppressor capacitors 47nF are furnished with the device.


LAN

The LAN connection corresponds to the TP network connection of a standard PC and is therefore galvanically isolated.

The program download to the control is made via the Ethernet interface.

The Ethernet interface is also used for data access via OPC, FTP for web visualization and the networking of several C3 powerPLmC controllers via network variables.

LAN, (RJ45), female

PIN | Signal | Direction | Level | Function
1 | TX+ | Out | ±0.2V…±5V | Differential pair of transmit lines
2 | TX- | Out
3 | RX+ | In | ±0.2V…±5V | Differential pair of receive lines
6 | RX- | In
4 | - |  |  |
5 |  |  |  |
7 | - | - | - |
8 | - | - | - |


COM 1 and COM 2

These interfaces correspond to the COM interface of a standard PC as far as pin assignment und levels are concerned; please note, however, that only the TXD, RXD and CTS signals are implemented.

There is no potential separation to the COM1 to COM4 connectors.

COM1 and COM2 can be configured and programmed via the "SysLibCom" library in CoDeSys.

COM1 is furthermore used as service interface for the communication with the C3 powerPLmC Manager.

If external devices are connected to COM1 it should be noted that C3 powerPLmC E20 outputs a sequence of debug informations on this inferface after power on.

Pin assignment: COM1 and COM2

COM 1 and COM 2, SUB-D9pol, male (RS232 DTE)
PIN | Signal | Direction | Level | Function
1 | - | - |  |
2 | RXD | In | ±3…±15V | Receive Data
3 | TXD | Out | ±3…±15V | Transmit Data
4 | DTR | Out | +5V | Data Terminal Ready
5 | GND | - | 0V | Basis
6 | - | - |  |
7 | RTS | Out | ±3…±15V | Request To Send
8 | CTS | In | ±3…±15V | Clear To Send
9 | - | - |  |


COM 3 and COM 4

You can switch both interfaces between RS485 - and RS232 operating mode per software. There is no potential separation to the COM1 to COM4 connectors.

The interfaces are reserved for later use and can at present not be accessed from CoDeSys.

Pin assignment: COM 3 and COM 4

COM3 and COM4, SUB-D9pol, male (RS232 Mode)
PIN | Signal | Direction | Level | Function
1 | - | - |  |
2 | RXD | In | ±3…±15V | Receive Data
3 | TXD | Out | ±3…±10V | Transmit Data
4 | DTR | Out | +5V | Data Terminal Ready
5 | GND | - | 0V | Basis
6 | - | - |  |
7 | RTS | Out | ±3…±10V | Request To Send
8 | CTS | In | ±3…±15V | Clear To Send
9 | - | - |  |
COM3 and COM4, SUB-D9pol, male (RS422 / RS485 Mode)
PIN | Signal | Direction | Level | Function
1 | - | - |  |
2 | -RXD | In | ±0.2V…±5V (differential) | Receive Data (differential pair of signal lines)
8 | +RXD
7 | +TXD | Out | ±0.2V…±5V (differential) | Transmit Data (differential pair of signal lines)
3 | -TXD
4 | DrvEN | Out | 0V | Transmit signal for repeater
5 | GND | - | 0V | Basis
6 | - | - |  |
9 | +Vb | Out | +5V | Operating voltage for terminal network
COM 3 and COM 4 pinning cross reference
PIN | RS232 Mode | RS422 / RS485 Mode
1 | - | -
2 | RXD | -RXD
3 | TXD | -TXD
4 | DTR | DrvEN
5 | GND | GND
6 | - | -
7 | RTS | +TXD
8 | CTS | +RXD
9 | - | +Vb


CAN Bus

CAN 1-1 and CAN 2-1, SUB-D9pol, male

CAN 1-2 and CAN 2-2, SUB-D9pol, female

PIN | Signal | Direction | Level | Function
1 | - | - | - | Reserved (Pin open)
2 | CANL | In/Out | ±0.2V…±5V | Differential pair of signal lines
7 | CANH | In/Out
3 | CAN GND | - | 0V | Reference 0V
4 | - | - | - | Reserved (Pin open)
5 | CAN Shield | - | PE | CAN Shield (PE)
6 | CAN GND | - | 0V | Reference 0V jumpered with Pin3
8 | - | - | - | Reserved (Pin open)
9 | CAN V+ | In | +5V | External supply voltage for CAN- transceiver and optocoupler (Pin open)

Both channels are potentially isolated via optocoupler.


DP - SLAVE (Profibus)

This is a Profibus connection which can be used to access the C3 powerPLmC as Slave (DP-S).

The bus connection is potentially isolated via optocoupler.

DP - SLAVE (Profibus)

DP - SLAVE, SUB-D9pol, female (PROFIBUS Slave)
PIN | Signal | Direction | Level | Function
1 | PE | - |  | Protective earth
2 | - | - | - |
3 | RXD / TXD-P | In/Out | ±0.2V…±5V | Differential pair of signal lines (mandatory signal)
8 | RXD / TXD-N | In/Out
4 | CNTR-P | Out | TTL | Ready to Send (repeater control signal)
5 | Profibus GND |  | 0V | Reference (mandatory signal)
6 | +VB | Out | +5V | Supply for connection network
7 | - | - | - |
9 | - | - | - |


Chassis

Parameter | Unit
Installation | DIN EN 50022
Standard |
Width of rail | 35mm Supporting rail according to DIN EN 50022
Dimensions |
Width | 124mm
Height | 105mm
Depth Housing incl. connections Housing without connections Housing above supporting rail | 62mm 59mm 54mm
Other |
Protection type | IP20
Mass | 0.6kg


C3 powerPLmC E20 control functions

In this chapter you can read about:

Profibus - Address with C3 powerPLmC E20

LAN - setting of the PCs

E20 - Initialization with the C3 powerPLmC Manager

Programming based on IEC61131-3


Profibus - Address with C3 powerPLmC E20

The setting of the Profibus address of the C3 powerPLmC E20 is made in CoDeSys in the controller configuration.

Additional Profibus - configuration.


LAN - setting of the PCs

During configuration of the PC a distinction is made between the direct connection PC - C3 powerPLmC (Cross Over) and the connection via a network.

Connection via a network.

The settings for the net available on the PC should only be adapted if necessary with prior consultation of the network administrator.

Direct connection PC - C3 powerPLmC (Cross Over)
Step 1

Open network connection with "Settings/system control/Network and remote connections.

Step 2

Establish new LAN connection and open with properties

The part displayed in red (framed) shows the setting of the C3 powerPLmC!

Determination of the LAN parameters of a PC in the network

Enter command IPCONFIG in DOS environment...


E20 - Initialization with the C3 powerPLmC Manager

In this chapter you can read about:

Installation

Prerequisites

Main window

Set Ethernet Parameters

Real time clock

Update Firmware

Device Info


Installation

The C3 power PLmC Manager can be installed directly from the C3 power PLmC CD. Click on the appropriate hyperlink or start the installation program "C3 powerPLmC Manager ... .exe" and follow the instructions.

PC minimum requirements

For successful installation, your PC must meet the following minimum requirements:

  • Windows NT 4.0 (Intel) with Service Pack 6, Windows 2000 (Service Pack 4 recommended) or Windows XP.
  • Administrator authorisation* on the system
  • Microsoft Internet Explorer 4.01 (SP2) or higher
  • Pentium-PC (600 MHz or faster is recommended)
  • 128 MB RAM (256 MB recommended)
  • Super VGA-Monitor (with a resolution of at least 800 x 600, setting: small fonts)
  • Required HD capacity
    • CD installation: 200MB before installation, 50MB after completion of the installation


Prerequisites

Connection PC - C3 powerPLmC E20

A RS232 connection PC <-> COM1 of the C3 powerPLmC-E20 (COM-1) is necessary

In order to use the RS232 cable SSK1, you need a gender changer. This is included in the delivery

Select the desired PC COM intrface in the C3 powerPLmC Manager in the Menu "Options: COM Port (RS232).

Initialization mode of the C3 powerPLmC E20

Set initialization mode:

  • both hex switches in "F" position and then
  • new start (Reset button or 24VDC Power off/on) of the C3 powerPLmC-E20

    No PLC program is active in initialization mode!

Leave initialization mode

After a new start (Reset button or 24VDC Power off/on) with changed hex switches, the initialization mode is left.


Main window

1: manual opening/closing of the COM port.

The COM port is automatically opened by the program, if required.
This function can be used to close the port automatically, if another program is to access the port temporally.

2: Selection of the desired language of the program in the Menu Options -> select language)

3: Status of the COM port.

  • Green = COM port open
  • Red = COM port closed


Set Ethernet Parameters

In this chapter you can read about:

One-to-one connection via cross over cable

Network (LAN) - connection
Set connection type
  • direct one-to-one connection via cross over cable
    Direct one-to-one connection between PC and C3 powerPlmC E20 via an Ethernet cross over cable
  • Connection via a network (LAN)
    Connection of the C3 powerPLmC E20 to an existing network (LAN)


One-to-one connection via cross over cable

There are two possibilities:

  • manual entry of IP address and network mask
  • Determine settings automatically
    The tool will suggest an IP address, which is compatible with the IP address of your PC.
    For this, there must exist an Ethernet connection between C3 powerPLmC and the respective network connector of the PC.

    If there are several network cards installed on the PC, a selection dialog is displayed:

    Click on "terminate" in order to store the settings in the device.


Network (LAN) - connection

IP address:

Unambiguous address of the C3 powerPLmC in the network.

For a cross-over connection (=direct connection between PC and C3 powerPLmC without network), a free IP address (class3) must be used (example):

192.168.xxx.yyy with xxx=1 and yyy=11

Netmask: 255.255.255.0

The cross over connection must be established with a cross over cable; this is available under the designation SSK28.

Netmask (Subnet Mask)

Specify the numeric range of the local network.

Local network addresses are derived by " ANDing" the IP address and the Netmask.

Host name:

Symbolic name which can be used instead of the IP address; this requires, however, a DNS (Domain Name Service)

- is not yet supported -

Gateway IP:

The computer that creates the connection to an additional network.

Entry is only required with a corresponding application and is not required for a direct connection via cross over.

DNS:

Address of the Domain Name Service (only when using a host name)

- is not yet supported -

Click on "terminate" in order to store the settings in the device.


Real time clock

There are two possibilities:

  • Set date and time of day to current values.
    This means that date and time of day of the C3 powerPLmC-E20 are automatically accepted according to the values on the PC if you click on "terminate"
  • Set date and time of day manually.


Update Firmware

In order to execute a firmware ulpdate, an Ethernet connection between C3 powerPLmC and Pc as well as a serial connection between COM1 and the C3 powerPLmC and the PC must exist.

The firmware must be available as so-called "Firmware Package" (not to be confounded with the Compax3 Firmware package).

  • Select the desired C3 powerPLmC firmware package by clicking on the "..." Button. Then the version number of the firmware package is displayed.
  • With "continue" you are asked to select the network interface card which is used for the connection with C3 powerPLmC.
  • Close all PC programs before you start the firmware update by acknowledging the following warning.
  • The firmware update is not to be interrupted until the message "update completed" is displayed.


Device Info

Here you can read out the serial number, firmware version and the MAC address.


Programming based on IEC61131-3

In this chapter you can read about:

Requirements

Restrictions on CoDeSys functions

System layout

CoDeSys / C3 powerPLmC target system (Target Package)

Configure Ethernet interface CoDeSys - C3 powerPLmC

PLC configuration

Task configuration

Libraries

Motion control via function modules

C3 powerPLmC as CAN Master

Application examples
Safety Instructions:
  • Before generating a boot project, (program is saved in FLASH), perform a program stop, since uncontrolled movements are possible while a boot project is being generated.
  • Attention!
    During the program test, note the motion sequences of your drive.
    Especially when working with break points, online changes, coercing variables, sequence control or debugging, it is always essential to ensure that only controlled motion sequences take place.
    These functions can change the control sequence of the program and affect behavior related to the program sequence and program execution time!
    Online change and forcing variables directly affects sequence logic.


Requirements

  • Installation of the CoDeSys programming tool.
  • Installation of necessary Target Packages (target systems):
    • Bring up the "InstallTarget" program (program group "3S Software": "CoDeSys V2.3")
    • From “Open”, select the target file; file name: "C3 powerPLmC E2x.tnf".
    • The selected target can be installed with "Install".


Restrictions on CoDeSys functions

With C3 powerPLmC as the target system, the following functions and thus the following sections of the CoDeSys description are not valid:

  • "Parameter Manager" (subsection of "Resources") and
  • "Appendix I: Target settings"
  • The function "Online: Sequence control" is not available.


System layout

Compax3 servo axes can be integrated into the C3 powerPLmC control very easily, in fact almost automatically with CANopen using the "Drive Interface".

The connected Compax3 axes are operated in the CANopen operating mode "slave with C3 powerPLmC as master" (should be set in the device configuration of the corresponding Compax3 in the CANopen wizard window).

The configuration of the Compax3 axes is made via RS232 with the aid of the C3 ServoManager.

Other CANopen stations (such as Parker I/O terminals PIO and parker Operator Panels Pop, for example) are integrated into C3 powerPLmC via a device-specific "*.eds" file.

The "*.eds" file describes all relevant properties of a CANopen bus station and is included with delivery of all CANopen bus stations.


CoDeSys / C3 powerPLmC target system (Target Package)

To create a C3 powerPLmC project, from "File:New" select the target system "CoDeSys for C3 powerPLmC E2x" (for target setting see here).

This sets CoDeSys for C3 powerPLmC.

The values set by default can be taken over directly.

However, adjustment is possible at all times (under "Resources: Target settings").

If an old target is required, this is available under "CoDeSys for C3 powerPLmC".

Notes on memory layout:

If the error message 3803 ("Memory for global variables exhausted") is displayed during compilation, this means that the reserved data memory for the internal variables, modules and axis data structures used in the program is not sufficient. The global data memory (Global: 2nd value from the top) can be increased incrementally to correct this.

The respective hexadecimal values give the memory reservation in kilobytes, i.e. for example 16#20000 for global = 132 kByte of global program data memory reserved.

if the error message 3612 ("maximum number of modules exceeded") is displayed during compilation, the number of modules in the project exceeds the maximum number configured. The value "maximum number of modules" can be increased to correct this.

Target system settings memory layout

Next, select the module type (the default is program module PLC_PRG) and the desired programming language (for more information, see the description in CoDeSys help).


Target system setting sequence

Target system settings


Configure Ethernet interface CoDeSys - C3 powerPLmC

The connection between the programming system andC3 powerPLmC is made via Ethernet.

Connection: Network card PC - C3 powerPLmC X24 with SSK28

On the PC – page, set the IP – address in CoDeSys with the “Online: Communication parameters” menu as follows:

Sequence

The IP – address set in this manner is the address of the target system. The Gateway – function must be set to ‘local‘ and the Motorola – byte order to YES.

Note for C1xTxx devices:

The settings for Ethernet are made on the Compax3 side with the C3 ServoManager (in the tree left C3 powerPLmC: LAN setting).

Note for E2x devices:

On the device side, the settings for Ethernet are made via the C3 powerPLmC Manager .


Sequence of the Ethernet (LAN) setting

Note:

  • The address can be opened to edit by double clicking.
  • "Motorola byteorder" can be opened by double clicking and modified by double clicking.

    Ethernet Config sequence


PLC configuration

In this chapter you can read about:

CANopenMaster configuration

Integrate Compax3

Integrate PIOs

Pop Monitoring and control

Integrate any CANopen Slaves

Profibus: C3 powerPLmC as Profibus Slave

The entries in the configuration tree:

  • Ethernet and
  • VirtualServer

    are not assigned.


CANopenMaster configuration

Basic parameters

The basic parameters are set automatically.

They must not be changed.

Note on C3 powerPLmC E2x (standalone):

Assignment of the CAN busses:

upper Master: CAN1-1 / CAN1-2

lower Master: CAN2-1 / CAN2-2

If one of the two CAN busses is not used as CANopen Master, but only for the CAN data transfer on layer 2, the respective CANopen Master module can be replaced by the "CAN (Raw), Layer2" module with the aid of the context menu.

CAN parameters

Baud rate:

The baud rate must match the baud rate of the CANopen station.

The baud rate of Compax3 is set in the C3 ServoManager under configuration.

Sync telegram:

The next 3 input values will set the sync telegram.

This is not supported in the current version!

Please deactivate the Sync Telegram!

NodeID:
Note o the C3 powerPLmC C1xTxx:

The CANMaster (C3 powerPLmC) has NodeID ="1" (the same NodeID as the Compax3 into which the C3 powerPLmC is integrated).

Automatic Start

This option must be deactivated, if working which the C3 Drive Interface, as in this case the CANopen Master is started directly by the Drive Interface.

Module parameters

These parameters are used to adjust to the number of PDOs there are in the CAN bus.

The rule for this is:

  • There must be 1 RxObject for each Receive PDO (can be set under Receive PDO Mapping).
  • There must be 1 TxObject for each Transmit PDO (can be set under Transmit PDO Mapping).
  • There must be 5 RxObjects and 5 TxObjects available per Compax3 device used.

    Set these parameters according to your application.

The additional parameters (format objects and error objects) must not be adjusted!

If no sufficient number of Rxobjects was reserved, it is possible that process data received are lost in the case of a high bus load!


Integrate Compax3

Compax3 is integrated into the C3 powerPLmC via Drive Interface.

Note on C3 powerPLmC-E20 (standalone): The DriveInterface works always with CAN bus 1 (CAN 1-1 / CAN 1-2)

Note: The Drive Interface must be activated in the program (see below).

Function of the Drive Interface

The Drive Interface is responsible for the following tasks:

  • The configuration of the individual axes on the CANopen – Bus (PDO mapping and initialization of the bus).
  • Configures the interface between the PLCopen function modules and Compax3.
  • Performs implicit function calls in the runtime system to make input – and output data to and from the individual axes available cyclically or when it is changed to the C3 powerPLmC process image and thus to the function modules.
  • Adjusts the numeric format of the module parameters to Compax3 – objects and specifies standardization.

    This reduces the configuration of a multi-axis system with Compax3 on the C3 powerPLmC to the following steps:

  • Within the control configuration of the C3 powerPLmC there is an entry "Compax3_Config".
  • Under Compax3_Config, note of type "Compax3_Group" should be inserted (right click and append Compax3_Group). This represents a group of axes.
    The designation "Compax3_Group" can be renamed, in which case naming conventions for IEC61131-3 variables must be observed.

Caution! Only one Compax3 group is possible!

  • The actual Compax3 devices are also inserted under the Compax3 group. (right mouse button, insert sub-element: Compax3...); ("virtual Master": this operating mode is not yet available; if you have a corresponding application, please contact us.)
  • The axis names can be freely chosen, for exable X_Axis and must correspond to the name conventions for IEC61131-3 variables. Each axis is referenced later in the program via the name assigned here.
  • When nodes are inserted within these configuration points, the required data structures are generated automatically.

    sequence

Settings for the Compax3_Group
Agreeing on a task call

All programs that work with a Compax3_Group must be assigned to a single task!

By default, the name of this task is specified by “DriveTask”, but it can also be changed.

As an option you can, in the "LimitBusload" Checkbox, limit the maximum number of acyclic object accesses via the "C3_ReadObject2 and "C3_WriteObject" modules per task cycle in order to reduce bus load and cycle time

Settings for the axes
NodeID

The only setting for CANopen is the specification of the address for the respective axis. Addresses must be unique.

Note o the C3 powerPLmC C1xTxx!

Address 1 is reserved for the Comapx3 into which the C3 powerPLmC is integrated.

Cache parameters

A cache can be used as a fast buffer for drive parameters in order to reduce data transfer to the axes and thus shorten response times. Parameter data already transmitted must not, or only in part, be re-transmitted, which helps to increase the reaction time and to reduce the bus load.

This can entirely or at least partially eliminate transferring parameter data that has already been used.

Please note that the Drive Interface for the Cache parameter requires the lines 17 to 32 of the Compax3 recipe array (C3Array.Colxy_row17 to C3Array.Colxy_Row32) if you use T30 / T40 devices. Those may not be used in the program and not be overwritten!

Cyclic User Data Channel

cyclic data channel for the exchange of data between the programs in the C3 powerPLmC and a Compax3 T30/T40 axis.

Dynamic Range

The resolution and the range of the actual axis position as read with the module "MC_ReadActualPosition" can be set.

Node guarding:

Here you cn activate and set the Node Guarding for the Compax3 axis.

An evaluation of the node guarding sequence in the IEC61131-3 program van be made via the CiA405_Get_State module.

Note:

No input values are required under basic parameters. The value for the node number is determined automatically (does not correspond to the NodeID).

Activate Drive Interface

The Drive Interface must be activated by calling the following programs in the main program:

At the start of the program:

DriveExecuteStart (ADR(Name of the Compax3 - group))

At the end of the program:

DriveExecuteEnd (ADR(Name of the Compax3 - group))


Access to Compax3 objects

The described objects can be used in the program.

Intellisense – functions permit to enter operands: If a dot “.” is entered in the program instead of a designator, a dropdown box with all local and global variables will then appear.

When a Compax3 object group is entered, for example C3, followed by a dot, a list of available references to objects of this group appears.

Access to object C3 powerPLmC

Caution!

These are not the Compax3 objects themselves, but rather address references to them.

Access to the Compax3 objects of the individual axes is with the modules C3_ReadObject and C3_WriteObject.


Drive Interface Compax3

Drive Interface Compax3


Compax3 slave axes

In this chapter you can read about:

T11 Technology function

Technology function T30 & T40

Cyclic data channel for C3T30 and C3T40

The Compax3 slave axes are operated via the CAN bus on the C3 powerPLmC, therefore the CAN option is necessary in all axes.

Designation of the Compax3 slave axes: C3I21Txx (I21 describes the CAN Option).

The follwoing Compax3 technology functions (Txx) can be used:

  • T11: Positioning
  • T30: Motion control programmable according to IEC61131-3 or
  • T40: Electronic cam programmable according to IEC61131-3


T11 Technology function

Previous Topic

Next Topic

T11 Technology function

A Compax3 slave axis C3I21T11 operated on a C3 powerPLmC must be set to the operating mode "C3 powerPLmC as master2 in the CANopen configuration.

The Compax3 slave axis C3I21T11 is programmed in the C3 powerPLmC control.


Technology function T30 & T40

Previous Topic

Next Topic

Technology function T30 & T40

A Compax3 slave axis C3I21T11 and C2I21T40 operated on a C3 powerPLmC must be set to the operating mode "Slave with C3 powerPLmC as master" in the CANopen configuration.

The Compax3 slave axis C3I21T30 and C2I21T40 can be programmed in the C3 powerPLmC control or on the slave axis. Application examples for the slave axis are program parts which need a fast detection, such as C3_Tochprobe or cam applications which can be implemented with the T40 technology function.

Communication C3 powerPLmC - Compax3 slave axis (T30, T40)

For the communication between C3 powerPLmC (Master) and Compax3 slave axis the interface module "PLmC_Interface" must always be called up in the IEC program of the slave axis.

For the exchange of data between master and slave a cyclic data channel is available.


Interface to C3 powerPLmC

In this chapter you can read about:

Interface module "PLmC_Interface"

Example: C3 powerPLmC Program & Compax3 Program


Interface module "PLmC_Interface"

Previous Topic

Next Topic

Interface module "PLmC_Interface"

The interface between a central IEC61131-3 user program on C3 powerPLmC and a local IEC61131-3 user program on a Compax3 servo axis T30 or T40 is created with the program module "PLmC_interface".

It is necessary to call up cyclically the "PLmC_interface2 module at each Compax3 servo axis (T30, T40), which is operated as a slave on a C3 powerPLmC.

The module can be found in the "C3_PLmC_interface.lib" library, which must be integrated manually via the library manager, if required.

FB name

PLmC_Interface

Interface module for the control of C3 powerPLmC
VAR_OUTPUT

O0

BOOL

Status of the digital output O0 on the C3 powerPLmC side

O1

BOOL

Status of the digital output O1 on the C3 powerPLmC side

O2

BOOL

Status of the digital output O2 on the C3 powerPLmC side

O3

BOOL

Status of the digital output O3 on the C3 powerPLmC side

LocalEnable

BOOL

Enable for the local IEC61131-3 program

LocalEnable switches to FALSE for one cycle, if a command for this axis is activated on the C3 powerPLmC.
This helps to avoid that the axis will receive different commands at a time.

Event1 ... Event8

reserved

EventParameter

reserved
Note:
  • The execution of all local motion functions should be coupled with the LocalEnable output.
  • Via the outputs O0...O3, the outputs set by C3 powerPLmC can be set out via the physical outputs with the aid of C3_Output.

Recipe array line 17... 32 assigned

Please note that the last 16 lines of the recipe array (C3Array.ColXX_Row17 to C3Array.ColXX_Row32) are reserved for the communucation with C3 powerPLmC.


Example: C3 powerPLmC Program & Compax3 Program

Previous Topic

Next Topic

Example: C3 powerPLmC Program & Compax3 Program

Task:

  • Implementation of a mark synchronization in a Compaxa3 servo axis.
  • Control of the program via the C3 powerPLmC via a user-defined control word / status word.
Main program on Compax3 (module PLC_PRG)
Cyclic call-up of the interface to powerPLmC in the PLC_PRG module

In CFC:

In ST:

Local Compax3 Program in the LocalProgram module

Program on C3 powerPLmC


Cyclic data channel for C3T30 and C3T40

Previous Topic

Next Topic

Cyclic data channel for C3T30 and C3T40

An additional communication channel (besides the one established by the Drive Interface which is not freely assignable) can be established between the programs of the C3 powerPLmC and a Compax3 axis via a freely usable cyclic data channel.

To do this, the assignment of the channel is defined on the side of the C3 powerPLmC in the controller configuration for the respective axis. The assignment is always bidirectional.

The following options are available for the communication between the two programs.

2x INT:

Assignment of the cyclic channel with 2 INT variables
Mapping to Compax3 objects
C3.PLmCToC3_INT1 / C3.PLmCToC3_INT2 | from PLmC to Compax3
C3.C3ToPLmC_INT1 / C3.C3ToPLmC_INT2 | from Compax3 to PLmC
Mapping to power PLmC variables
"Axis name".PLmCToC3_INT1 | from PLmC to Compax3
"Axis name".PLmCToC3_INT2 | from PLmC to Compax3
"Axis name".C3ToPLmC_INT1 | from Compax3 to PLmC
"Axis name".C3ToPLmC_INT2 | from Compax3 to PLmC

1x DINT:

Assignment of the cyclic channel with one DINT variable
Mapping to Compax3 objects
C3.PLmCToC3_DINT | from PLmC to Compax3
C3.C3ToPLmC_DINT | from Compax3 to PLmC
Mapping to power PLmC variables
Axis name".PLmCToC3_DINT | from PLmC to Compax3
"Axis name".C3ToPLmC_DINT | from Compax3 to PLmC

1x REAL:

Assignment of the cyclic channel with one REAL variable
Mapping to Compax3 objects
C3.PLmCToC3_REAL | from PLmC to Compax3
C3.C3ToPLmC_REAL | from Compax3 to PLmC
Mapping to power PLmC variables
"Axis name".PLmCToC3_REAL | from PLmC to Compax3
"Axis name".C3ToPLmC_REAL | from Compax3 to PLmC

Note:

The use of INT or DINT variables is especially suitable for implementing a user-defined control word / status word between C3 powerPLmC IEC61131-3 program and Compax3 IEC61131-3 program.

Configuration of the data channel

Note:

If the cyclic data channel is not required, it can also be assigned to the actuel position of the axis. It is then made available to the "MC_ReadActualPosition" module. Therefore the value must not be continually read via the acyclic channel if the module is used; this reduces the bus load and the IEC cycle time.


Integrate PIOs

The Parker Input & Output terminals (PIOs) are integrated into C3 powerPLmC via CANopen. A CANopen bus coupler (PIO-337: CANopen standard or PIO-347: CANopen ECO) forms the interface from the terminals to the CANopen bus.

Input and output terminals can be operated simultaneously on a CANopen bus coupler.

Bus couplers each contain storage space for the input and output area (input process image and output process image). All input terminals on the bus coupler are stored in the input process image of the bus coupler, while all output terminals are in its output process image.

The maximum size of the process image depends on the bus coupler:

PIO-337: CANopen standard: 512 bytes each

PIO-347: CANopen ECO: 32 bytes each

The process image data must now be transferred to the control (C3 powerPLmC) via the CANopen bus. This is done via process data objects (PDOs). The PDOs are assigned by a process of "Mapping", separately for the input and output process image:

PDO-Mapping receive: C3 powerPLmC -> PIO (output terminals)

PDO-Mapping transmit: PIO -> C3 powerPLmC (input terminals)


Setting the PIOs

The following settings are required at the bus coupler:

  • Baud rate
  • Node address (Node ID)


Setting the PIO baud rate

Previous Topic

Next Topic

Setting the PIO baud rate

The bus coupler supports 9 different baud rates. The setting is made via the DIP switch.

Via set module ID = 0 (all DIP switches off)

and following power on, t he bus coupler is set to configuration mode. In this state, the currently set baud rate is displayed via the upper LED group (STOP, RUN, Tx-, Rx-Overflow), while

  • STOP = switch 1,
  • RUN = switch 2,
  • Tx-Overflow = switch 3 and
  • Rx-Overflow = switch 4 .

    The currently set baud rate is displayed by slow blinking of the corresponding LEDs. Now the new baud rate can be set with the DIP switch by setting the desired DIP switches to "ON".

    The set configuration is memorized by setting DIP8 to "ON".

    After the saving, the new baud rate is displayed via a permanent illlumination of the respective LEDs. Exception: the baud rate of 1MBaud, which is displayed by flashing / illumination of all 4 LEDs.

Example:

125 kB : Tx-Overflow LED flashes / is illuminated
250 kB : STOP and RUN LED flash / are illuminated

Example: Saving the baud rate 125 kB

An exchange of data via CAN is not possible in this state.

Switch | Function | 1 MBit | 800 kB | 500 kB | 250 kB | 125 kB | 100 kB | 50 kB | 20 kB | 10 kB | displayed by the LEDs
1 (LSB) | Baud rate | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | STOP
2 | Baud rate | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | RUN
3 | Baud rate | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | Tx-Overflow
4 (MSB) | Baud rate | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | Rx-Overflow
5 |  |  |  |  |  |  |  |  |  |  |
6 |  |  |  |  |  |  |  |  |  |  |
7 |  |  |  |  |  |  |  |  |  |  |
8 | Acceptance | ´off´ -> ´on´ : Acceptance of the set configuration

Switch off the operating voltage after the completion of the baud rate settings / baud rate verification, as the set DIP value is only used as module ID for the calculation of the IDs after Power On. When the device is switched off, the desired module Id (=1 in delivered status) can now be set on the DIP switch.

Factory setting of baud rate: 125kB


Set PIO node address (module ID)

Previous Topic

Next Topic

Set PIO node address (module ID)

The module Id is used for the calculation of the default COB IDs (e.g. default PDOs 1...4, 1. server SDO, etc.)

Fig. 3 6: Setting the address

The binary values of the individual switches rises in the direction of the switch number
Module Id 1 => DIP1 = ON
Module ID 8 => DIP4 = ON etc.

Module IDs: 2...127, Address 1 is reserved for the Compax3 servo axis with the C3 powerPLmC.


Integration of an CANopen bus coupler:
show sequence

In CoDeSys under resources: PLC configuration the configuration tree of the of C3 powerPLmC with all interfaces is displayed in the center window .

A CANopen PIO can be appended to the CANopenMaster with an eds file:
Set cursor on CANopenMaster and open the menu with the right mouse button, then select the appropriate EDS file via "Append sub-element".

The CANopen bus coupler is created in the tree. The configuration dialogs appear on the right.

Basic parameters: are set correctly automatically. They must not be changed.

CAN parameters: The value of the NodeID is important. Generally it corresponds to the address of the CANopen bus coupler.

PDO-Mapping receive: C3 powerPLmC -> PIO (R-PDOs)

The PDOs that transfer data from the C3 powerPLmC to the PIOs are defined here.

The process image of the CANopen bus coupler is in the left window. In the right window, the PDO assignment is displayed. The PDOs that are displayed are not assigned.


PDO Mapping

Previous Topic

Next Topic

PDO Mapping

Start again with F5


Process image

The process image offers digital outputs and analog 2-byte values. The assignment depends on the arrangement and the terminal types on the CAN bus coupler. The rule for this is:

The digital output terminals (digital outputs) are stored sequentially starting from the left (fieldbus coupler). For example the 8th output from the left is in byte "Output 15...8" (for more details, see the example).

The analog output terminals (2-byte analog output) are also stored sequentially beginning from the left (fieldbus coupler). For example, the 3rd output from the left is in the byte "3.2byte analog output" (for more details, see also the example).


Assign PDOs

The process image data can be assigned in any way (maximum 8-bytes per PDO) to the individual PDOs.

Additional PDOs (CANopen ECO max. 5; CANopen standard max. 32) can be added and unnecessary PDOs can be deleted.


Enable analog terminals

The analog terminals must be activated by writing an object in the bus coupler.

To do this, the value must be set to 0x01 on the "Service Data Objects" registry page under Index 0x6423 ("Analogue Input Global Interrupt Enable").

During the next start of the CANopen Bus (Project: clear all, Online: log in; Online: Start) the value is transmitted to the bus coupler.


Define symbolic names

show sequence

The values assigned to the PDOs are now entered in the configuration tree.

Double clicking on "AT" gives you the individual values of symbolic names. These are created automatically as variables.

Symbolic names can be defined for bytes, individual bits or for 2-byte values.


Define symbolic names (sequence)

Previous Topic

Next Topic

Define symbolic names (sequence)

Sequence define symbolic names (start again with F5)


Access to values

show sequence

Access within the program then takes place via symbolic variables that are available for selection after you enter a dot ".".

The variables can also be brought up with input help (F2) under system variables.

PDO-Mapping transmit: PIO -> C3 powerPLmC (T-PDOs)

The PDOs that transfer data from the PIOs to the C3 powerPLmC are defined here.

The process is the same as for "Receive PDO Mapping"


Variable access in the program

Previous Topic

Next Topic

Variable access in the program

Start again with F5


Example of Receive PDO Mapping (PIO -> C3 powerPLmC)


Pop Monitoring and control

The settings for a Pop are made with the PopDesigner.

Step1: Select driver for the CAN

Step2: Set node address and baude rate

Function modules are available for the programmation of Pop applications with the C3 powerPLmC!
The communication with Pop is described in a separate application manuel.


Integrate any CANopen Slaves

Any CANopen modules can be integrated with the aid of the module-specific EDS file.

You will generally find help on configuring the module in the module description.


Profibus: C3 powerPLmC as Profibus Slave

In this chapter you can read about:

GSD file for the bus configuration

Process data channel

Eine C3 powerPLmC C13 bzw. E2x enthält eine Profibus - Option, die es ermöglicht die C3 powerPLmC als Profibus - Slave zu betreiben.

Nachdem die Profibus - Adresse eingestellt wurde, erfolgt die weitere Konfiguration am Profibus - Master mit der GSD - Datei, welche sämtliche Profibus - relevanten Daten enthält.


GSD file for the bus configuration

In order to integrate the C3 powerPLmC into the bus configurator of the Profibus master, the so-called device master data file (GSD) is required.

The GSD file for C13 and E20 is: "PAR_C313.GSD(can be found on the CD)

In the GSD file a series of possible PPO modules for a different number of process data words of 2 bytes each (2 words (PZD[2] to 8 words (PZD[8]) are already configured.

Furthermore there are modules with an additional 4 or 6 word PKW channel which can be used for implementing an additional acyclic parameter channel in the user program.

Via a universal module you can generate additional kinds of PPO modules


Process data channel

122 words max. (244 bytes) can be transferred on the process data channel in both directions by C3 powerPLmC.

C3 power PLmC accepts all possible combinations and lengths.

Configuration of the process data channel

Both on the C3 powerPLmc side and on the side of the Profibus master the same configuration, i.e. assignment of the process data channel must be made.

The assignment of the process data channel on C3 powerPLmC side is made in the controller configuration.

The incoming process data are named "I-DPOutput" in the controller configuration.

The process data to be sent are named "Q - DPInput"

For process data in the format of the different IEC61131-3 data types there are so-called channels which can be entered as sub elements. /e,g, WordChannel for WORD, IntChannel for INT, DWordChannel for DWORD or RealChannel for REAL).

Each channel entered can be mapped on a global program variable. (same proceeding as with the CANopen configurator).


Task configuration

The Task inserted for the Compax3 group must be entered with the same name used in the Compax3_Group and must be of the "cyclic" type (under properties - interval, the cycle time can be configured. e.g. T#10ms for 10 ms).

A program module (e.g. PLC_PRG) must be linked to this task as an entry point, where the function DriveExecuteStart is called up at the beginning of the execution and the function DriveExecuteEnd is called up at the end of the execution. .

Additional program calls take place in PLC_PRG.

All functions accessing a Compax3 must be listed in this task.

Functions outside of Compax3 – devices, for example input – and output – add-ons, can be executed in additional tasks.

Sequence

Task interval:

When specifying the task interval (cycle time), note that system-internal tasks (communication tasks) must also run during this time in addition to the programs that are created (IEC tasks).

Note: The Trace function increases the time for communication tasks.

Task priorities

Each Task can be assigned an execution priority. (0 = highest priority, 31 = lowest priority). A high-priority task can interrupt low-priority tasks.

The task priorities 0 and 1 are reserved for system functions and should therefore not be assigned.

Caution!

Free-running tasks must be given priority 31 for additional tasks even to be processed!


Task configuration sequence

Sequence task config.


Libraries

In this chapter you can read about:

Standard libraries

Internal libraries


Standard libraries

Access to function modules is possible through input help (F2). These are created in libraries.

The following should be noted for module access:

The following are client libraries:
  • C3_PLCopenPLmC.lib: PLCopen function module.
  • C3_FunctionsPLmC.lib: C3_ .. Function modules (C3_Input, C3_Output, C3_WriteObject, R3_ReadObject).
  • C3_ObjectDirPLmC.lib: (references to Compax3 objects)
  • PLmC_CAN.lib
  • Pop_Interface.lib
  • C3_Errorlib.lib
  • Standard.lib: Standard function modules of the IEC61131-3.
  • Util.lib:
  • SysLibCom (C3 powerPLmC E20 for COM1 and COM2)
  • SysLibFile
  • SysLibRtc
  • SysLibSem
  • SysLibSocket
  • SysLibStr
  • SysTaskInfo
The following libraries assume detailed knowledge, but are generally not required:
  • SysLibTime.lib
  • SysLibCallback.lib
  • SysLibTasks.lib
  • SysLibMem.lib
  • SysLibTaskInfo.lib
  • SysLibSem.lib

Please note:

Some of the libraries must be integrated via the library manager before they can be used.


Functions and function modules of the "Standard.lib" library
Bistable function modules
  • RS

RS Flip Flop
  • SR

SR Flip Flop
  • SEMA

Software Semaphore
Numerator
  • CTD, CTU, CTUD

Counter modules
String functions
  • CONCAT, DELETE, FIND, INSERT, LEFT, LEN, MID, REPLACE, RIGHT
Timer
  • TOF

Switch-off delay
  • TON

Switch-on delay
  • TP

Pulse timer
  • RTC

Output of the continual time of day incl. date from a defined start value
Trigger
  • R_TRIG

Trigger on rising edge
  • F_TRIG

Trigger on falling edge


Functions and function modules of the "Util.lib" library (controller, signal generators, mathematical functions...)
Analog value monitoring
  • HYSTERESIS

  • LIMITALARM

Monitoring of a signal in order to keep to a lower and upper limit value
BCD conversion
  • BCD_TO_INT

Convert BCD value to integer
  • INT_TO_BCD

Convert integer to BCD value
Bit/Byte Functions
  • EXTRACT

returns Bit N to a transferred DWORD variable
  • PUTBIT

sets Bit N of a transferred DWORD variable to the transferred value
  • PACK

convert 8 bits (BOOL) to BYTE
  • UNPACK

convert BYTE to 8 bits (BOOL)
Controller
  • PD

PD Controller
  • PID

PID Controller
  • PID

PID Controller for a fixed cycle time
Function manipulation
  • CHARCURE

in order to map values to a partially linear function
  • RAMP_INT

Limit rising or falling of a fed in signal of the INT type
  • RAMP_REAL

Limit rising or falling of a fed in signal of the REAL type
Mathematical functions
  • DERIVATIVE

Differentiator
  • INTEGRAL

Integrator
  • STATISTICS_INT

Determine minimum, maximum and average value (i.e. expected value) of the signal of the INT type fed in
  • STATISTICS_REAL

Determine minimum, maximum and average value (i.e. expected value) of the signal of the INT type fed in
  • VARIANCE

Determine statistic variance of an input signal of the REAL type
Signal generators
BLINK | Generation of a digital rectangular signal with defined HI and LOW phase
GEN | Generation of periodic output signals (Sine, Cosine, Rectangle, Triangle, Saw-Tooth)


Functions for file handling "SysLibFile"

File system: in the main memory (RAM)

  • SysFileOpen

Open file for reading or writing
  • SysFileClose

Close file
  • SysFileCopy

Copy file from A to B
  • SysFileDelete

Delete file
  • SysFileRead

Reading data from a file, increases offset automatically
  • SysFileWrite

Writing data into a file, increases offset automatically
  • SysFileEOF

In order to determine if the current offset is placed at the end of the file
  • SysFileGetPos

Provides the currently set offset of the file
  • SysFileSetPos

Sets the offset of the file to a determined value
  • SysFileGetSize

Provides the size of a file
  • SysFileGetTime

Provides time of creation, the last access and the last modification
  • SysFileRename

Re-naming a file


Handling of the real-time clock (RTC) "SysLibRtc"
  • SysRtcGetTime

Provides the current time and the current date (Type DAT_TIMW / DT)
  • SysRtcSetTime

Sets the real-time clock to the transferred values
  • SysRtcCheckBattery

Checks the status of the battery of the real-time clock
  • SysRtcGetHourMode

Determine, if the clock runs in the 12 or 24h format (always 24h with C3 powerPLmC)


Task synchronization via operatiing system semaphores "SysLibSem"
  • SysSemCreate

Creating a semaphore
  • SysSemDelete

Deleting a semaphore
  • SysSemEnter

Entering a protected area
  • SysSemLeave

Leaving a protected area
  • SysSemTry

In order to verify if a semaphore is already assinged to another task


Functions for accessing Ethernet networks on TCP / UDP level with the aid of sockets "SysLibSocket"
General:
  • SysSockAccept
  • SysSockBind
  • SysSockClose
  • SysSockConnect
  • SysSockCreate
  • SysSockGetHostByName
  • SysSockGetHostName
  • SysSockGetOption
  • SysSockHtonl
  • SysSockHtons
  • SysSockInetAddr
  • SysSockInetNtoa
  • SysSockIoctl
  • SysSockListen
  • SysSockNtohl
  • SysSockNtohs
  • SysSockSelect
  • SysSockSetIPAddress
  • SysSockSetOption
  • SysSockShutdown
TCP specific:
  • SysSockRecv
  • SysSockSend
UDP specific:
  • SysSockRecvFrom
  • SysSockSendTo


Additional string functions "SysLibStr"
Comparison of 2 strings:
  • SysStrCmp
  • SysStrCmpI
  • SysStrCmpN
  • SysStrCmpNI
Additionally:
  • SysStrCpy

Copying strings
  • SysStrLen

Determine the length of a string


Measuring task cycle time and jitter "Sys TaskInfo"

Task info


Internal libraries
The modules of the following libraries are not intended for the user. They contain internal system functions:
  • C3_DriveBasic.lib
  • C3_VirtualMaster.lib
  • DSPLib.lib
  • PPCLib.lib
  • DSPLib-2.lib
  • PPCLib-2.lib


Motion control via function modules

In this chapter you can read about:

Status diagram based on PLCopen

Library constants

General rules / timing

Control functions

Reading values

Motion functions (standard)

Error handling

Process image


Status diagram based on PLCopen

This status diagram applies to each connected Compax3.

The states of each individual device are affected by the C3 powerPLmC program and can be determined with the "MC_ReadStatus" module.


Library constants

The following global constants are declared in the PLCopen function module library:

For the selection of the master signal source:
AXIS_REF_Physical | C3_AXIS_Ref | for +/-10V analog input, step / direction input 5V or Encoder A/B input 5V (depending on the configuration of the physical source under signal source)
Axis_REF_HEDA | C3_AXIS_Ref | HEDA
General constants
MC_Direction_Positive | INT | For supply of the Direction input of the MC_MoveVelocity module (for positive rotational direction)
MC_Direction_Negative | INT | For supply of the Direction input of the MC_MoveVelocity module (for negative rotational direction)
MC_Direction_Current | INT | For supply of the Direction input of the MC_MoveVelocity module (retaining the last rotational direction to be selected)
Direction_Memory | INT (Variable) | The MC_MoveVelocity modules instances store the last direction parameter in this variable. This variable can only be used by Motion Control modules and must not be overwritten!


General rules / timing
General rules

Status of the outputs

  • The outputs "Done", "InVelocity", "Error", "ErrorID" and "CommandAborted" reset with the falling edge of the "Execute" input.
  • If the "Execute" input goes back to FALSE again before the module action (for example positioning) has been completed ("pulse to Execute"), the corresponding outputs (for example "Done") will still be set for exactly ONE cycle upon termination.
  • The outputs "Done" and "Error" are never simultaneously TRUE.
  • If the instance of a function module receives a new "Execute" signal before the function ends, the module will not show any response (no "Done" and no "Command Aborted") in reference to the previous action.

Input parameters

  • Parameters are accepted with the rising edge of the "Execute" signal.
  • To be able to accept modified parameters, the module must be triggered again with an "Execute" signal.

Missing input parameters

  • If an input parameter is missing, the previous value of this instance will be used in accordance with IEC61131-3.
  • The default value is used the first time a call is made.

Position and distance

  • "Position" is a value that is defined for a reference system, i.e. a specific position value is a fixed location in the reference system.
  • "Distance" is the difference between 2 positions.

Sign

  • "Velocity", "Acceleration", "Deceleration" and "Jerk" are always positive variables.
  • "Position" and "Distance" may be positive or negative.

Error handling

  • All function modules have an "Error" output that can be activated by a module during a module sequence.
  • The ErrorID (error number) can be read by an axis error with the "MC_ReadAxisError" module.

Behavior of the "Done" - output

The "Done" output is set if the function module has been successfully executed.

If one positioning process is interrupted by a second before it is complete, the first function module will not set "Done".

Behavior of the "CommandAborted" output

"CommandAborted" is set if a positioning process is interrupted by a second positioning process, by "MC_Stop" or MC_Power.

The reset behavior of "CommandAborted" is the same as "Done".

If "CommandAborted" occurs, the other outputs will be reset.

Value range of the movement parameters

Please note that the limits are specified in revolutions.

To convert to the configured unit, multiply the min/max values by the "travel distance per motor revolution".

Linear motors

With a configured linear motor, all revolution data must be replaced by pitch.

To convert to the configured unit, the min/max values must be multiplied by the pitch length (see the technical data for the motor).


Control functions

In this chapter you can read about:

Energizing the power output stage (MC_Power)

Stop (MC_Stop)


Energizing the power output stage (MC_Power)

FB name

MC_Power

Supplies current to the power output stage
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Enable

BOOL

Activates the module; as long as Enable=True, the power output stage will be energized.
VAR_OUTPUT

Status

BOOL

Status of the power output stage (TRUE= axis energized, FALSE= axis de-energized)

Error

BOOL

Error while de-energizing power output stage

Notes:

  • If the input parameter "Enable" = TRUE, all enables of the axis will be set.
  • All enables will be reset if the input parameter
    "Enable" = FALSE, the axis decelerates with the configured error ramp to (rotational) speed = 0.
  • The controller is enabled with the MC_Power function module.
  • During automatic commutation, the output "Status" is not set to TRUE for energizing, but rather not until after automatic commutation has been successfully completed.


Stop (MC_Stop)

FB name

MC_Stop

Stops the current movement

VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Execute

BOOL

Stops the movement

Deceleration

DINT

Value of deceleration (always positive) [units/s²] <Value range>

Jerk

DINT

Value of deceleration jerk [units/s³] (always positive) <Value range>
VAR_OUTPUT

Done

BOOL

Stop move

Error

BOOL

Error while stopping positioning

Note: As long as the "Execute" input is set, the axis remains in the "Stopping" status (as long the axis is energized) and is unable to execute any additional movement commands!

If the axis is switched to a de-energized state by setting the Enable signal of the "MC_Power" module to FALSE, the Stopping state will then be exited.

If the enable signal of the "MC_Power" module is set to TRUE again, the axis goes back to the "Stopping" state again if the Execute input of the "MC_Stop" module is still TRUE.

The following illustration shows an example of how the MC_Stop module interrupts and stops a movement that is in progress.

If a positioning module is interrupted by the MC_Stop module, it reports "Command Aborted" and can no longer be executed as long as the MC_Stop – module is active. If the MC_Stop module is inactive (no "Execute" signal), the function module can be executed again.

Timing Diagram:

Note:

If a positioning is to follow immediately after the stop, this can take place with the falling edge of the done output at the earliest:

Example:


Reading values

In this chapter you can read about:

Reading the current position (MC_ReadActualPosition)

Read Compax3 objects (C3_ReadObject)

Write Compax3 objects (C3_WriteObject)

Reading the device status (MC_ReadStatus)


Reading the current position (MC_ReadActualPosition)

FB name

MC_ReadActualPosition

Reading the current axis position
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Enable

BOOL

Activates the module, continuous reading of the axis position as long as Enable=TRUE
VAR_OUTPUT

Done

BOOL

Position value available

Error

BOOL

Error while reading the position

Position

REAL

Axis position

Note: -

You can read the current position of the axis with this module.
As long as the input parameter "Enable" = TRUE, the current parameter value will be supplied to the output parameter "Position"cyclically.

The status of the input parameter must be present for at least one module call.

The following illustration shows the behavior of parameters in the MC_ReadActualPosition function module.

Note!
Continuous use (enable static on TRUE) of this module can increase the bus load and the cycle time of the DriveTask, if the communiction does not take place via the cyclic but via the acyclic data channel.


Read Compax3 objects (C3_ReadObject)

FB name

C3_ReadObject

Reading obejct in the connected Compax3
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names

Object

C3OBJECT

Object name of the Compax3 object to be read
VAR_INPUT

Execute

BOOL

Starts the read process with rising edge
VAR_OUTPUT

Done

BOOL

Compax3 object was read successfully.

Error

BOOL

Error while attempting to read the object

  • Communication timeout
  • Transmission error
  • Object read queue of the axis is full (to many object read accesses are still being processed)

Value_BOOL

BOOL

Value of the Compax3 object if it is of the specified format.

Value_INT

INT

Value of the Compax3 object if it is of the specified format.

Value_DINT

DINT

Value of the Compax3 object if it is of the specified format.

Value_WORD

WORD

Value of the Compax3 object if it is of the specified format.

Value_DWORD

DWORD

Value of the Compax3 object if it is of the specified format.

Value_REAL

REAL

Value of the Compax3 object if it is of the specified format.

Value_TIME

TIME

Value of the Compax3 object if it is of the specified format.

Note: -

After the object has been successfully read (Done=TRUE), the module makes the value of the object available on the Value_xyz output corresponding to the data type of the reference on the object input!

Example: For Object=C3.StatusPosition_Actual (Format: REAL), the value to be read is made available on the Value_REAL output.


Write Compax3 objects (C3_WriteObject)

FB name

C3_WriteObject

Writing obejct in the connected Compax3
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names

Object

C3OBJECT

Object name of the Compax3 object to be written
VAR_INPUT

Execute

BOOL

Starts the write process with rising edge

Value_BOOL

BOOL

Value of the Compax3 object if it is of the specified format.

Value_INT

INT

Value of the Compax3 object if it is of the specified format.

Value_DINT

DINT

Value of the Compax3 object if it is of the specified format.

Value_WORD

WORD

Value of the Compax3 object if it is of the specified format.

Value_DWORD

DWORD

Value of the Compax3 object if it is of the specified format.

Value_REAL

REAL

Value of the Compax3 object if it is of the specified format.

Value_TIME

TIME

Value of the Compax3 object if it is of the specified format.
VAR_OUTPUT

Done

BOOL

Compax3 object was written successfully.

Error

BOOL

Error while attempting to write the object

  • Communication timeout
  • Transmission error
  • Object write queue of the axis is full (too many object write accesses are still being processed)

Note: -

If the edge is rising, the module retrieves the value to be written precisely from the Value_xyz input corresponding to the data type of the object to be written!

Example: For (Format: BOOL), the value to be written is used by the Value_BOOL input.

Note the following:

The object to be written must have read/write access.

Acceptance of the object (valid after:) must be observed. For "valid after: VP", the value is not accepted until after a "VP". “TRUE” must be written to the Compax3 Object "C3.ValidParameter_Global" for this purpose.


Reading the device status (MC_ReadStatus)

FB name

MC_ReadStatus

Specifies the current status according to the PLCopen status machine
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Enable

BOOL

Activates the module; continuous outputs of output parameters as long as Enable=TRUE
VAR_OUTPUT

Done

BOOL

Status values available

Error

BOOL

Error while executing module

Errorstop

BOOL

Error stop function. The motor brakes as specified by the stop ramp and is de-energized;

Stopping

BOOL

The motor is stopped;

Standstill

BOOL

The motor is stopped;

DiscreteMotion

BOOL

Individual movement;

ContinuousMotion

BOOL

Continuous positioning;

Homing

BOOL

Machine home is approached;

SynchronizedMotion

BOOL

Synchronous motion

Note: See also in the status diagram.


Motion functions (standard)

In this chapter you can read about:

Dynamic positioning

Absolute positioning (MC_MoveAbsolute)

Relative positioning (MC_MoveRelative)

Additive positioning (MC_MoveAdditive)

Continuous positioning (MC_MoveVelocity)

Homing (MC_Home)

Electronic gearbox (MC_GearIn)


Dynamic positioning

Dynamic positioning processes can be performed with the modules MC_MoveAbsolute, MC_MoveRelative and MC_MoveAdditive. The speed can be altered dynamically with MC_MoveVelocity.

In the state: ”Discrete Motion”

If another, second positioning process is activated in the "Discrete Motion" state, the 1st positioning process will be interrupted. The transition to the new destination occurs dynamically, i.e. without any intervening stop.

Note the following in this regard:
  • The new position / distance and the speed are taken over by the second positioning process.
  • The values for acceleration, deceleration and jerks are not taken over. The values of the original positioning process apply.
In "Continuous Motion" state

If a positioning process (MC_MoveAbsolute, MC_MoveRelative or MC_MoveAdditive) or a MC_MoveVelocity is activated in the "Continuous Motion" state, the active function module will then be interrupted. All input variables of the new positioning process will then be taken over.


Absolute positioning (MC_MoveAbsolute)

FB name

MC_MoveAbsolute

Absolute positioning to a specified position.
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Execute

BOOL

Starts the sequences of the module with positive edge

Position

REAL

Absolute target position of the movement to be executed (configured unit [units] ) (positive and negative direction) <Value range>

MoveVelocity

REAL

Value of maximum speed (always positive) (not necessarily reached) [units/s] <Value range>

Acceleration

DINT

Value of acceleration (always positive) [units/s²] <Value range>

Deceleration

DINT

Value of deceleration (always positive) [units/s²] <Value range>

Jerk

DINT

Value of the acceleration jerk [Units/s³] (always positive) <Value range>

JerkDecel

DINT

Value of deceleration jerk [units/s³] (always positive) <Value range>
VAR_OUTPUT

Done

BOOL

Specified setpoint position on the setpoint generator output is reached

CommandAborted

BOOL

Positioning aborted

Error

BOOL

Error while executing module

Note: -

If a SuperImposed movement is started during an absolute movement, the absolute position is not accessed, but the absolute position plus the position entered in the SuperImposed.

The same applies if a SuperImposed movement is already being executed and an absolute movement is started, then the absolute position is not accessed but the sum of both values.

After the SuperImposed movement has been finished, the absolute position is accessed with the next absolute movement.

The following illustration shows two examples of the combination of two MC_MoveAbsolute – modules.

  • The left part (a) of the time diagram shows a case in which the second function module (FB) is executed after the first function module..
    When the first function module has reached Position 60, the "Done" output gives the execution command to the second function module, which then moves to Position 100.
  • The right part (b) of the diagram shows a case in which the second function module is activated while the first function module is being executed. The first function module is automatically interrupted..
    The second function module moves directly to position 100 whether or not position 60 of the first function module has already been reached.

Jerk
The jerk (marked with ”4” in the drawing below) describes the change in acceleration (derivation of the acceleration)

The maximum change in acceleration is limited via the jerk limitation.

A motion process generally starts from a standstill, accelerates constantly at the specified acceleration to then move at the selected speed to the target position. The drive is brought to a stop before the target position with the delay that has been set in such a manner as to come to a complete stop at the target position. To reach the set acceleration and deceleration, the drive must change the acceleration (from 0 to the set value or from the set value to 0).

This change in speed is limited by the maximum jerk.

Without jerk according to VDI2143

According to VDI2143 the jerk is defined (other than here) as the jump in acceleration (infinite value of the jerk function).

This means that positionings with Compax3 are without jerk according to VDI2143, as the value of the jerk funciton is limited.

Motion sequence

1: Position

2: Speed

3: Acceleration

4: Jerk

Changes in acceleration (jerks) often have negative effects on the mechanical systems involved. There is a danger that mechanical resonance points will be excited or that impacts will be caused by existing mechanical slack points.

You can reduce these problems to a minimum by specifying the maximum jerk.


Relative positioning (MC_MoveRelative)

FB name

MC_MoveRelative

Relative positioning by a specified distance.
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Execute

BOOL

Starts the sequences of the module with positive edge

Distance

REAL

Relative distance of the movement to be executed (configured unit [units] ) <Value range>

MoveVelocity

REAL

Value of maximum speed (always positive)
(not necessarily reached) [units/s] <Value range>

Acceleration

DINT

Value of acceleration (always positive) [units/s²] <Value range>

Deceleration

DINT

Value of deceleration (always positive) [units/s²] <Value range>

Jerk

DINT

Value of the acceleration jerk [Units/s³] (always positive) <Value range>

JerkDecel

DINT

Value of deceleration jerk [units/s³] (always positive) <Value range>
VAR_OUTPUT

Done

BOOL

Specified setpoint distance on the setpoint generator output is reached

CommandAborted

BOOL

Positioning aborted

Error

BOOL

Error while executing module

Note:

In the case of dynamic positioning (module is called during a positioning process) the specified position is added to the current actual position.

The following illustration shows two examples of the combination of two MC_MoveRelative – modules.

  • The left part (a) of the time diagram shows a case in which the second function module is executed after the first function module..
    If the first function module has reached 60 units, the "Done" output gives the execution command to the second function module, which then moves an addition 40 units.
  • The right part (b) of the diagram shows a case in which the second function module is activated while the first function module is being executed. Because the second module is started during the execution of the first function module, the first function module is automatically interrupted.
    The second function module immediately moves an additional 40 units whether or not the 60 units of the first function were already reached.


Additive positioning (MC_MoveAdditive)

FB name

MC_MoveAdditive

Adds a relative distance to the target position of a positioning process in progress.
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Execute

BOOL

Starts the sequences of the module with positive edge

Distance

REAL

Relative distance <Value range>

MoveVelocity

REAL

Value of maximum speed (always positive) (not necessarily reached) [units/s] <Value range>

Acceleration

DINT

Value of acceleration (always positive) [units/s²] <Value range>

Deceleration

DINT

Value of deceleration (always positive) [units/s²] <Value range>

Jerk

DINT

Value of the acceleration jerk [Units/s³] (always positive) <Value range>

JerkDecel

DINT

Value of deceleration jerk [units/s³] (always positive) <Value range>
VAR_OUTPUT

Done

BOOL

Specified distance has been reached

CommandAborted

BOOL

Positioning aborted

Error

BOOL

Error during positioning

Note:

In the case of dynamic positioning (module is called during a positioning process) the specified position is added to the current target position.

The following illustration shows two examples of the combination of a MC_MoveAbsolute and an MC_MoveAddititve – module.

  • The left part (a) of the time diagram shows a case in which the second function module is executed after the first function module.
    After the first function module has traveled to Position 60, the "Done" output gives the execution command to the second FB, which then moves on another 40 units
  • The right part (b) of the diagram shows a case in which the second function module is activated while the first FB is being executed. Because the second module is started during the execution of the first FB, the first FB is automatically interrupted.
    The second function module adds the missing units that are still lacking for the first module and the moves an additional 40 units with the new predefined settings.


Continuous positioning (MC_MoveVelocity)

FB name

MC_MoveVelocity

Continuous controlled positioning with adjustable speed
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names

VAR_INPUT

Execute

BOOL

Starts the sequences of the module with positive edge

MoveVelocity

REAL

Value of maximum speed (always positive) (not necessarily reached) [units/s] <Value range>

Acceleration

DINT

Value of the acceleration and deceleration (always positive) [Units/s²] <Value range>

Direction

INT

Selection: positive direction, negative direction, current direction; library constants
VAR_OUTPUT

InVelocity

BOOL

Specified target speed on the setpoint output is reached

CommandAborted

BOOL

Execution interrupted

Error

BOOL

Error during positioning
Note:
  • To be able to stop the drive, the function module must be interrupted by another positioning function module or positioning must be stopped by calling the MC_Stop function module.
  • A positioning to the end limit follows.

Example

The following illustration shows two examples of the combination of two MC_MoveVelocity – modules.

  • The left part (a) of the time diagram shows a case in which the second function module is executed after the first function module.
    After the first function module has accelerated to a speed of 3000, the "InVelocity" output, AND-linked with the "Next" signal gives the execution command to the second FB, which then slows to a speed of 2000.
  • The right part (b) of the diagram shows a case in which the second FB is activated while the first function module is being executed. Because the second module is started during the execution of the first FB, the first FB is automatically interrupted.
    During the acceleration of the first module, the second module slows again similarly to a speed of 2000 without the speed of the first module having been reached.


Homing (MC_Home)

FB name

MC_Home

Predefined search for the machine reference point
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Execute

BOOL

Starts the sequences of the module with positive edge

Position

REAL

Position on the reference point (configured unit [units] ) = Machine zero Offset
VAR_OUTPUT

Done

BOOL

Referencing process completed

CommandAborted

BOOL

Referencing process aborted

Error

BOOL

Error while searching for machine reference point

Note:

This module gives the command to search for the machine reference point; not for "zero" position. The type of search function (machine reference mode) can be adjusted with the configuration or with the object "HOMING_mode" (Object 1130.4).

Objects that are connected with the machine reference point:

  • C3Plus.HOMING_speed (Object 1130.3)
  • C3Plus.HOMING_accel (Object 1130.1)
  • C3Plus.HOMING_mode (Object 1130.4)
  • C3Plus.HOMING_edge_sensor_distance (Object 1130.7)

Machine reference offset

Machine zero offset

1: MaschinezeroOffset

The machine reference offset is used to determine the actual reference point for positioning.

The rule for this is: Zero point = Machine zero + Machine zero offset

Note: If the machine zero proximity switch is at the positive end of the travel range, the machine zero offset must be = 0 or negative.

A change in the machine reference offset does not take effect until the next machine reference run.
Please note:
During homing run the software end limits are not monitored.


Electronic gearbox (MC_GearIn)

FB name

MC_GearIn

Controlled speed and position synchronicity with adjustable transmission ratio
VAR_IN_OUT

Master

INT

Constant for the master signal source

Configuration of the signal source

Slave

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Execute

BOOL

Starts the sequences of the module with positive edge

RatioNumerator

REAL

Transmission ratio of numerator

RatioDenominator

INT

Transmission ratio of denominator

Acceleration

DINT

Value of acceleration / deceleration (always positive) until the synchronism is reached [Units/s²]<Value range>
VAR_OUTPUT

InGear

BOOL

Synchronicity achieved

CommandAborted

BOOL

Command aborted

Error

BOOL

Error while executing module
Note:
  • The transmission ratio can be changed at any time with a positive edge on Execute. InGear is reset until synchronicity is achieved again.
  • For example, if speed synchronicity is not achieved because of limiting effects, the position difference that arises will be made up.
  • Acceleration / deceleration to the set transmission ratio takes place without a jerk limit.
  • If the master and slave units do not correspond, this fact must be considered for the transmission ratio.
  • Example

Structure of the "electronic cam" function

Structure image gearing

Note:

  • Direction -1 / +1: with direction reversal (under configuration of signal sources) factor -1 is applied.
  • The C3 powerPLmC controls the electronic gearbox which runs in the slave axis.


Error handling

In this chapter you can read about:

Acknowledging errors (MC_Reset)

Reading axis errors (MC_ReadAxisError)

Conversion C3ErrorID -> String (C3_GetErrorDescription)


Acknowledging errors (MC_Reset)

FB name

MC_Reset

Acknowledges errors (transition from "Errorstop" status to "Standstill" status).
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Execute

BOOL

Activates the module if there is a positive edge
VAR_OUTPUT

Done

BOOL

Error successfully acknowledged, axis is in the "Standstill" state again

Error

BOOL

Acknowledge failed /not possible

ErrorID

WORD

Error description, according to error history

Note: After the error is successfully acknowledged, the power must be supplied to the power output stage again by a rising edge on the enable input of the MC_Power power module.


Reading axis errors (MC_ReadAxisError)

FB name

MC_ReadAxisError

This function module displays axis errors.
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

Enable

BOOL

Activates the module
VAR_OUTPUT

Done

BOOL

Output values available

Error

BOOL

Compax3 in error state

ErrorID

WORD

Current error description

Note: -


Conversion C3ErrorID -> String (C3_GetErrorDescription)

FB name

C3_GetErrorDescription

Conversion of a Compax3 error number into a string (e.g. for visualization)
VAR_INPUT

Enable

BOOL

Activating the module

ErrorID

DWORD

The error number to be converted into a string

Language

C3Language

Language of the output string

Permitted parameters are:

"German" for German

"English" for English
VAR_OUTPUT

Description

String (16)

STRING with 16 characters containing the textual description of ErrorID

If no adequate description for an error can be found, the text "NOT FOUND" is displayed.

If ErrorID = 0, the text "OK" is displayed
Note:

This module is not automatically loaded. They can be found in the "C3_ErrorLib.lib" library which can be loaded in the library management: right mouse button in the library window.

Example:

If Enable=TRUE and ErrorID=29456

-> Output Description =

"Drehzahl zu hoch", if Language = German

"Speed too high", if Language = English

Program example:


Process image

In this chapter you can read about:

Reading digital inputs (C3_INPUT)

Write digital outputs (C3_OUTPUT)


Reading digital inputs (C3_INPUT)

FB name

C3_INPUT

Is used for reading in the digital inputs.
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_INPUT

I0 ... I7

BOOL

Displays the status of the respective input.

Notes: the module should always be brought up at the beginning of the processing cycle.

Reading the Compax3 inputs


Write digital outputs (C3_OUTPUT)

FB name

C3_OUTPUT

Is used for setting the digital outputs.
VAR_IN_OUT

Axis

C3_AXIS_REF

Symbolic axis names
VAR_OUTPUT

O0 ... O3

BOOL

Displays the status of the respective output.

Notes: the module should always be brought up at the end of the processing cycle.

Reading the Compax3 outputs


C3 powerPLmC as CAN Master

In this chapter you can read about:

CAN modules (Layer 2)

CAN CiA405 modules

The following CAN modules are available for communication with any integrated CAN station (CAN slave).

Layer 2 - modules: for any CAN station

CiA405 - modules: exclusively for CAN stations supporting CANopen

Note:

The CAN modules are not loaded automatically. They can be found in the "PLmC_CAN.lib" library which can be loaded in the library management: right mouse button in the library window.

No Compax3 modules!

These modules may not be used for Compax3 axes integrated via the "Drive Interface", as the communication there takes always place via the Drive Interface.

Exception Node guarding:

The CiA405_Get_State module for the realization of the node guarding function can also be used for a Compax3 integrated via the drive interface.


CAN modules (Layer 2)

In this chapter you can read about:

Transmit messages via the CAN bus (CAN_Transmit)

Enable in order to receive CAN data (CAN_ReceiveEnable)

Receive messages via the CAN bus (CAN_Receive)

Enable in order to receive CAN data from the system buffer (CANQ_ReceiveEnable)

CANQ_Receive

CAN Diagnosis Functions (CAN_Diagnostic)


Transmit messages via the CAN bus (CAN_Transmit)

FB name

CAN_Transmit

This module can be used to transmit messages via the CAN bus.
VAR_INPUT

Enable

BOOL

With Enable = TRUE, data will be sent via the bus upon each calling up of the module.

Bus

CAN_BUS

E20: CAN_BUS1 oder CAN_BUS2

C10/C13: CAN_BUS1

ID

WORD

11 bit CAN identifier of the message to be transmitted.

RTR

BOOL

If RTR = TRUE, a Remote Transmission Request is sent for the message (data and data length are not important in this case). If RTR = FALSE, the data are transmitted.

Data

ARRAY [1..8] of BYTE

8 byte array in which the data to be transmitted must be made available

DataLength

USINT

Length of the data, i.e. the number of the data bytes in the data array to be transmitted (the data must be left-aligned in the array).

VAR_OUTPUT

Done

BOOL

Data transferred successfully.

Error

BOOL

Error when transmitting the data
(there may be not enough CAN resources available verify number of the Tx objects in the controller configuration!)


Enable in order to receive CAN data (CAN_ReceiveEnable)

FB name

CAN_ReceiveEnable

Enable in order to receive CAN data

VAR_INPUT

Enable

BOOL

Activation of the module, i.e. enable of the reception of one or several CAN messages.
As soon as the enable input is reset to FALSE, the enable is cancelled.

Bus

CAN_BUS

E20: CAN_BUS1 oder CAN_BUS2

C10/C13: CAN_BUS1

Start_ID

WORD

First identifier to be enabled

End_ID

WORD

Last identifier to be enabled
(in order to enable a single identifier, set Start_ID = End_ID!)

Event

CAN_EVENT

Via this input you can define that the reception of an identifier will release a system event, which may trigger a task.

Valid system events are CAN_01 to CAn_30.
No event = CAN_NOEVENT (default values)
VAR_OUTPUT

Enabled

BOOL

The module has successfully enabled the queried identifiers.
Note:

Before a CAN message can be received with CAN_Receive, the reception must be enabled with this module.
Each instance can enable a single message or a defined range of messages.
In order to enable several ranges, several instances of the function module must be used.


Data type: CAN_EVENT

Previous Topic

Next Topic

Data type: CAN_EVENT

The "CAN_EVENT" data type is used for triggering a system event upon the receipt of a defined telegram identifier. The respective parameter is available in the "CAN-ReceiveEnable" and "CANQ_ReceiveEnable" modules. It is therefore possible to start an event task upon the receipt of a defined CAN/CANopen telegram (e.g. for an especially fast rection or event-controlled processing)

  • CAN_01
  • .....
  • CAN_30
  • CAN_NOEVENT
Generation of a task which is triggered by the "CAN_02" system event:


Receive messages via the CAN bus (CAN_Receive)

FB name

CAN_Receive

This module can be used to receive messages via the CAN bus.
VAR_INPUT

Enable

BOOL

Activation of the module, i.e. enable of data reception

Bus

CAN_BUS

E20: CAN_BUS1 oder CAN_BUS2

C10/C13: CAN_BUS1

ID

WORD

11 bit CAN identifier of the message to be received
VAR_OUTPUT

ReceiveCount

DWORD

Counter for the number of received messages. The counter is incremented by one with each newly received message. If the counter reaches the value 2^32, it will be reset to 0.

Data

ARRAY [1..8] of BYTE

8 byte array, where the last received data are available

DataLength

USINT

Length of the data received. (can be between 0 and 8 bytes). The data are always available left-aligned in the data array.

Example: If DataLength = 4, the data are available in Data[1] to Data[4]
Note:

Via this module you can receive messages via the CAN bus.
The reception of a message with a defined identifier must be enabled beforehand via the CAN_ReceiveEnable module.


Enable in order to receive CAN data from the system buffer (CANQ_ReceiveEnable)

FB name

CANQ_ReceiveEnable

Enable in order to receive CAN data and to redirect them to a queue.
VAR_INPUT

Enable

BOOL

Activation of the module, i.e. enable of the reception of a CAN message for buffered reception.
As soon as the enable input has been reset to FALSE, the enable is cancelled.

Bus

CAN_BUS

E20: CAN_BUS1 oder CAN_BUS2

C10/C13: CAN_BUS1

ID

WORD

Identifier to be enabled

Event

CAN_EVENT

Via this input you can define that the reception of an identifier will release a system event, which may trigger a task.
Valid system events are CAN_01 to CAn_30.
No event = CAN_NOEVENT (default value)
VAR_OUTPUT

Enabled

BOOL

The module has successfully enabled the queried identifier.

Error

BOOL

An error occurred when enabling the identifier

QueueHandle

DWORD

If the identifier is enabled successfully, a system buffer is reserved and a QueueHandle (identification number) is set back to this buffer.
This QueueHandle must then be transferred to the respective instance of CANQ_Receive
Note:

Before a CAN message can be recerived with CANQ_Receive, the reception with this module must be enabled.
Each instance can enable individual messages.
In order to enable several messages, several instances of the function module must be used.


CANQ_Receive

FB name

CANQ_Receive

Module for receiving a CAN-message redirected to a queue.
The reception of the message must have been enabled with CANQ_ReceiveEnable beforehand.

VAR_INPUT

QueueHandle

DWORD

QueueHandle generated by the CANQ_ReceiveEnable module (identification number)
VAR_OUTPUT

NewData

BOOL

There are data in the receive buffer

Data

ARRAY [1..8] of BYTE

8 byte array, where the received data are available

DataLength

USINT

Length of the data received. (can be between 0 and 8 bytes).
The data are always available left-aligned in the data array.

Example: If DataLength = 4, the data are available in Data[1] to Data[4]
Note:

Normally the CAN_Receive module should be used to receive data.
If, however, several messages with the same identifier might arrive within a PLC cycle and no message is to be lost, the CANQ_Receive module can be used instead. Thus all messages received are stored internally in a system buffer.
You must however ensure that enough receive objects (nRxObjects) are reserved in the controller configuration of the respective CAN master.
The module is typically called up repeatedly within a cycle until NewData = FALSE, i.e. all newly received telegrams are processed.

Example:


CAN Diagnosis Functions (CAN_Diagnostic)

FB name

CAN_Diagnostic

This module can be used for diagnostic purposes.
VAR_INPUT

Enable

BOOL

Activating the module.

Bus

CAN_BUS

E20: CAN_BUS1 oder CAN_BUS2

C10/C13: CAN_BUS1
VAR_OUTPUT

ErrorCounter

DWORD

Error counter

DataLostCounter

DWORD

Data loss counter

ArbitrationLostCounter

DWORD

Number of delays of bus access (caused by higher priority telegrams).

TxCounter

DWORD

Number of messages transmitted.

RxCounter

DWORD

Number of messages received.

SyncCounter

DWORD

Number of SYNC messages.


CAN CiA405 modules

In this chapter you can read about:

SDO modules

CiA405_Get_State

CiA405_NMT

CiA405_Recv_EMCY_Dev


Previous Topic

Next Topic

SDO modules


CiA405_SDO_Read4

Previous Topic

Next Topic

CiA405_SDO_Read4

FB name

CiA405_SDO_Read4

VAR_INPUT

Device

CIA405_DEVICE

Index

WORD

Index of the CANopen communication object

SubIndex

BYTE

Subindex of the CANopen communication object

Enable

BOOL

Activates the module
VAR_OUTPUT

Data

ARRAY [1.0.4] of BYTE

Data read

DataLength

USINT

Data length

Confirm

BOOL

CANopen communication object read

Error

CIA405_CANOPEN_KERNEL_ERROR

ErrorInfo

CIA405_SDO_ERROR

Note:

Only one SDO module may be active for a CANopen node (station). Another SDO module can only be activated with Confirm = TRUE. This applies for all SDO modules.

After a module has terminated its sequence with confirm = TRUE, the module must be called up again with Enable = FALSE, in order to release internally assigned system ressources!

Additional CIA405_SDO_Read modules with the same layout and function but with a larger data width are:
  • CIA405_SDO_READ7: Data: ARRAY [1.0.7] of BYTE
  • CIA405_SDO_READ14: Data: ARRAY [1.0.14] of BYTE
  • CIA405_SDO_READ21: Data: ARRAY [1.0.21] of BYTE
  • CIA405_SDO_READ28: Data: ARRAY [1.0.28] of BYTE
Timing:

1: Module activated

2: Command executed

3: if Enable = FALSE, then aklso confirm=FALSE (4)


CiA405_SDO_Error (Abort Code): UDINT

Previous Topic

Next Topic

CiA405_SDO_Error (Abort Code): UDINT

In the case of an incorrect SDO transmission, the error cause is returned via the "abort code".

Abort Code | Description
0x0503 0000 | ” Toggle Bit” was not alternated
0x0504 0000 | SDO protocol ”time out”
0x0504 0001 | Client/server command designator invalid or unknown
0x0504 0002 | Unknown block size (block mode only)
0x0504 0003 | Unknown block number (block mode only)
0x0504 0004 | CRC error (block mode only)
0x0504 0005 | Outside of memory
0x0601 0000 | Access to this object is not supported
0x0601 0001 | Attempted read access to a write only object
0x0601 0002 | Attempted write access to a read only object
0x0602 0000 | The object does not exist in the object directory
0x0604 0041 | The object cannot be ”mapped” in a PDO
0x0604 0042 | The size and number of the ”mapped” objects exceeds the maximum PDO length
0x0604 0043 | General parameter incompatibility
0x0604 0047 | General incompatibility in the device
0x0606 0000 | Access infringement due to a hardware error
0x0607 0010 | Data type does not fit, length of the service parameter does not fit
0x0607 0012 | Data type does not fit, length of the service parameter too large
0x0607 0013 | Data type does not fit, length of the service parameter too small
0x0609 0011 | Subindex does not exist
0x0609 0030 | Outside parameter value range (only for write access operations)
0x0609 0031 | Parameter value too large
0x0609 0032 | Parameter value too small
0x0609 0036 | Maximum value smaller than minimum value
0x0800 0000 | General error
0x0800 0020 | Date cannot be transmitted or saved
0x0800 0021 | Date cannot be transmitted or saved due to local device management
0x0800 0022 | Date cannot be transmitted or stored due to device status
0x0800 0023 | Dynamic generation of the object directory is impossible or no object directory exists (the object directory is created from a file and an error occurs due to a defective file)


Data type: CIA405_CANOPEN_KERNEL_ERROR : WORD

Previous Topic

Next Topic

Data type: CIA405_CANOPEN_KERNEL_ERROR : WORD

Internal error of the CANopen stack. The following errors are possible:

(* 0 | = | No Error *)
(* 1 | = | Other error - see further error registers *)
(* 2 | = | Data overflow - e.g. buffer is too small for received SDO *)
(* 3 | = | Time out *)
(* 4 | = | SDO does not exist *)
(* 5 | = | Could not send request on SDO *)
(* 16#10 | = | CAN Bus off *)
(* 16#11 | = | CAN Error Passive *)
(* 16#12 | = | Could not create format object *)
(* 16#13 | = | NodeID not found*)
(* 16#14 | = | CAN Net not found *)
(* 16#15 | = | Could not read Device type (object 0x1000) *)
(* 16#16 | = | Error while reading device type : Unexpected response *)
(* 16#17 | = | Could not send reset node telegram *)
(* 16#18 | = | Could not send start node telegram *)
(* 16#19 | = | Could not send stop node telegram *)
(* 16#1A | = | EMCY identifier of node to be guarded must not be 0 *)
(* 16#1B | = | Could not send RTR for transmit PDOs *)
(* 16#1F | = | Unknown CANopen Kernel error *)


Data type: CIA405_DEVICE : BYTE (0..127)

Previous Topic

Next Topic

Data type: CIA405_DEVICE : BYTE (0..127)

CANopen node address (Node ID)

Timing:

1: Module activated

2: Command executed

3: if Enable = FALSE, then aklso confirm=FALSE (4)


CiA405_SDO_Write4

Previous Topic

Next Topic

CiA405_SDO_Write4

FB name

CiA405_SDO_Write4

VAR_INPUT

Device

CIA405_DEVICE

Index

WORD

Index of the CANopen communication object

SubIndex

BYTE

Subindex of the CANopen communication object

Enable

BOOL

Activates the module

Data

ARRAY [1.0.4] of BYTE

Data to be sent

DataLength

USINT

VAR_OUTPUT

Confirm

BOOL

CANopen object changed

Error

CIA405_CANOPEN_KERNEL_ERROR

ErrorInfo

CIA405_SDO_ERROR

Note:

Only one SDO module may be active for a CANopen node (station). Another SDO module can only be activated with Confirm = TRUE. This applies for all SDO modules.

After a module has terminated its sequence with confirm = TRUE, the module must be called up again with Enable = FALSE, in order to release internally assigned system ressources!

Additional CIA405_SDO_Write modules with the same layout and function but with a larger data width are:
  • CIA405_SDO_WRITE7: Data: ARRAY [1.0.7] of BYTE
  • CIA405_SDO_WRITE14: Data: ARRAY [1.0.14] of BYTE
  • CIA405_SDO_WRITE21: Data: ARRAY [1.0.21] of BYTE
  • CIA405_SDO_WRITE28: Data: ARRAY [1.0.28] of BYTE
Timing:

1: Module activated

2: Command executed

3: if Enable = FALSE, then aklso confirm=FALSE (4)


Conversion function for CiA405-SDO-Read4 & CiA405-SDO-Write4

Previous Topic

Next Topic

Conversion function for CiA405-SDO-Read4 & CiA405-SDO-Write4

For an easier handling of the CIA405-SDO_READ4 and CIA405_SDO_WRITE4 modules there is a series of conversion functions available in order to execute an automatic conversion of the parameters in a byte array (when writing via SDO) or a conversion of a byte array in a parameter (when reading via SDO).

The following functions are implemented:
Conversion of received data:
  • BYTEARRAY_TO_INTEGER16
  • BYTEARRAY_TO_INTEGER32
  • BYTEARRAY_TO_INTEGER8
  • BYTEARRAY_TO_REAL32
  • BYTEARRAY_TO_UNSIGNED16
  • BYTEARRAY_TO_UNSIGNED32
  • BYTEARRAY_TO_UNSIGNED8
Conversion of data to be sent:
  • INTEGER16_TO_BYTEARRAY
  • INTEGER32_TO_BYTEARRAY
  • INTEGER8_TO_BYTEARRAY
  • REAL32_TO_BYTEARRAY
  • UNSIGNED16_TO_BYTEARRAY
  • UNSIGNED32_TO_BYTEARRAY
  • UNSIGNED8_TO_BYTEARRAY


CiA405_Get_State

The CiA405_Get_State module for the realization of the node guarding function can also be used for a Compax3 integrated via the drive interface.

FB name

CiA405_Get_State

Query of the CANopen status
VAR_INPUT

Device

CIA405_DEVICE

Enable

BOOL

Activates the module
VAR_OUTPUT

Confirm

BOOL

Updated status available at the state output

State

CIA405_STATE

If a node is no longer available at the bus (nodeguarding error), the output State will take on the value NOT_AVAIL.
Note:


Data type: CIA405_STATE

Previous Topic

Next Topic

Data type: CIA405_STATE
Implemented states:
  • RESET_COMM,
  • PRE_OPERATIONAL,
  • STOPPED,
  • OPERATIONAL,
  • UNKNOWN,
  • NOT_AVAIL


Node guarding

Previous Topic

Next Topic

Node guarding

Example:

Life Time Factor = 2 => Life Time = 2 * Guard Time

The master sends a request to the CAnopen device to be monitored periodically with the Guard Time (typical value e.g. 500msec). The device will thereupon answer with its current CANopen communication status (operational, preoperational,...). This status can be queried via the state output of the function module CiA405_Get_State.

If the CANopen master does not receive an answer from the device (e.g. due to a bus system failure) during the Life Time, a so-called node guarding event is generated, which can be queried by changing the state output to the value "NOT_AVAIL".

While the plant is in operation, the failed device can be reactivated for the bus with the CIA405_NMT module via the NMT command "RESET_NODE" after correction of the error; a complete mapping is being automatically executed.

Compax3 devices integrated via the Drive Interface can only be reactivated for the bus by a new start of the controller.


CiA405_NMT

FB name

CiA405_NMT

Changing the CANopen status via NMT
VAR_INPUT

Device

CIA405_DEVICE

Address "0" is used to address all CANopen nodes (Broadcast).

State

CIA405_TRANSITION_STATE

Enable

BOOL

Activates the module
VAR_OUTPUT

Confirm

BOOL

NMT - command transferred
(bei RESET_NODE: new mapping executed)

Error

CIA405_CANOPEN_KERNEL_ERROR

Note:
If the NMT command "ResetNode" is executed, the mapping configured in the CANopen Master is additionally transmitted after the reset of the node.


Data type: CiA405_TRANSITION_STATE

Previous Topic

Next Topic

Data type: CiA405_TRANSITION_STATE
I mplemented transitions:
  • START_REMOTE_NODE,
  • ENTER_PRE_OPERATIONAL,
  • RESET_NODE and new Mapping


CiA405_Recv_EMCY_Dev

FB name

CiA405_Recv_EMCY_Dev

Verifies if a certain device has sent an Emergency object.
VAR_INPUT

Device

CIA405_DEVICE

Enable

BOOL

Activates the module
VAR_OUTPUT

Confirm

BOOL

no error

Error

CIA405_CANOPEN_KERNEL_ERROR

ErrorInfo

CIA405_EMCY_ERROR

Note:

Timing Diagram


Data type: CIA405_EMCY_ERROR

Previous Topic

Next Topic

Data type: CIA405_EMCY_ERROR

Contents of an emergency error telegram.

Contents of the data structure:

TYPE CIA405_EMCY_ERROR :

STRUCT

EMCY_ERROR_CODE : WORD;

ERROR_REGISTER : BYTE;

ERROR_FIELD : ARRAY[1..5] OF BYTE;

END_STRUCT

END_TYPE


Application examples

Two drives are controlled from the C3 powerPLmC. These consist of the components:

  • X_Axis: Compax3 with C3 powerPLmC, designation C10T11.
  • Y_Axis: Compax3 with CAN – interface, designation I21T11.

    The following functions must be performed:

  • After the power supply is turned on, current is supplied to the axes and they can be moved.
  • After that, the machine zero point is approached.
  • Once it is reached, the axes are ready for operation.
  • Each axis moves to two absolute positions one after the other, independently of the state of the other axes.
  • The subsequent positioning process is started when both axes have reached their previous destination.
  • After this is completed, the cycle is repeated.
  • In the event of a malfunction, it can be reset with a QUIT – input on the corresponding axis.
  • The actual position of the axes is displayed. However, it is only read each 15th time instead of in each cycle to reduce the bus load.

You will find the example with a description of the program on the CD (project: "Beispiel_01.pro")!

Further application examples can be found on the C3 powerPLmC CD:
Application | Description | CD directory under applications
PLmCAppl_A0005 | OPC Client / Server | OPCServerClient
PLmCAppl_A0007 | POP_Interface | PLmC with POP
PLmCAppl_A0008 | CoDeSys Project – Templates for PlmC with Compax3, PIOs, Pop | ProjectTemplates
PLmCAppl_A0009 | Time functions. Real-time clock of the PLmC | TimeFunctions
PLmCAppl_A0010 | Treating files Writing and reading files from the IEC program | HandlingFiles


Accessories

In this chapter you can read about:

RS232 cable

Profibus plug BUS08/01

CAN - plug BUS10/01

PIO: External Inputs/Outputs


RS232 cable

SSK1/..

You will find the length code in the accessories order code.

Gender Changer

In order to use the RS232 cable SSK1, you need a gender changer. This is included in the delivery


Profibus plug BUS08/01

We offer a Profibus plug and special cable as meterware for Profibus wiring:

  • Profibus cable: SSL02/.. not prefabricated (color according to DESINA).
  • Profibus plug: BUS8/01 with 2 cable inputs (for one incoming A1, B1 and one continuing Profibus cable- A2, B2 -) and screw terminals as well as a switch for activating the terminal resistor.
    The terminal resistor must be activated on the first and on the last station (= switch setting ON).


CAN - plug BUS10/01

We offer a CAN plug and special cable in any length to order for the CAN-bus wiring:

  • CAN cable: SSL02/.. not prefabricated (colour according to DESINA).
  • CAN plug: BUS10/01 with 2 cable inputs and screw terminals as well as a switch for activating the terminal resistor.
    The terminal resistor must be activated on the first and on the last station (=switch setting ON).

    Note for integrated C3 powerPLmC (Compax3 interface designation "C1x")
    • the CAN bus of the C3 powerPLmC does already contain a terminal resistor.
    • Therefore it applies with the C3 powerPLmC:
      Put switch to OFF
      wire C3 powerPLmC always at the end of the CAN bus!

CAN wiring


PIO: Inputs/Outputs

Additional external digital and analog inputs and outputs can be integrated via CANopen.

For this purpose we offer the Parker I/O system (PIO).

PIO offers the convenience of exceptionally simple installation. The individual modules can be installed and removed without any tools.

Available modules:
Order Code decentralized input terminals
PIO 2DI 24V DC 3.0ms | 2-channel digital input terminal | P | I | O | 4 | 0 | 0
PIO 4DI 24V DC 3.0ms | 4-channel digital input terminal | P | I | O | 4 | 0 | 2
PIO 8DI 24V DC 3.0ms | 8-channel digital input terminal | P | I | O | 4 | 3 | 0
PIO 2AI DC ± 10V differential input | 2 channel analog input terminal (± 10V differential input) | P | I | O | 4 | 5 | 6
PIO 4AI 0 - 10V DC S.E. | 4 channel analog input terminal (0-10V signal voltage) | P | I | O | 4 | 6 | 8
PIO 2AI 0 - 20mA differential input | 2 channel analog input terminal (0 - 20mA differential input) | P | I | O | 4 | 8 | 0

Order Code decentralized output terminals
PIO 2DO 24V DC 0.5A | 2 channel digital output terminal (output voltage 0.5A) | P | I | O | 5 | 0 | 1
PIO 4DO 24V DC 0.5A | 4 channel digital output terminal (output voltage 0.5A) | P | I | O | 5 | 0 | 4
PIO 8DO 24V DC 0.5A | 8 channel digital output terminal (output voltage 0.5A) | P | I | O | 5 | 3 | 0
PIO 2AO 0 - 10V DC | 2 channel analog output terminal (0-10V signal voltage) | P | I | O | 5 | 5 | 0
PIO 2AO 0 - 20mA | 2 channel analog output terminal (0-20mA signal voltage) | P | I | O | 5 | 5 | 2
PIO 2AO DC ± 10V | 2 channel analog output terminal (± 10V Signalspannung) | P | I | O | 5 | 5 | 6

Order Code CANopen Fieldbus Coupler
CANopen Standard | max. vectorial sum current for bus terminals 1650mA at 5V | P | I | O | 3 | 3 | 7
CANopen ECO | max. vectorial sum current for bus terminals 650mA at 5V | P | I | O | 3 | 4 | 7

For additional information please refer to our catalog.


Previous Topic

Next Topic

Technical Data


General information

Platform | 32Bit RISC Processor 200MHz
Boot FLASH | 1 Mbyte
Program memory FLASH | 4MByte
Working memory SDRAM | 16MByte
Data memory non volatile | 32kByte NVRAM
Real time clock | Yes, battery backed.
Operating system | Real time multitasking
Utilities | 24V DC


Controller features

User control program

compiled

Processing time

100ms for 1000AWL – lines

Task – kinds

Real time tasks:

  • Coasting
  • Cyclical
  • Event-controlled, internal events
  • Event-controlled, external events

Minimal cycle time

1ms

Online Programm Change

yes

Watchdog Timer

yes

Data exchange in distributed systems (network variables)

yes


Programming

Programming system | CoDeSyS for Automation Alliance
Programming languages | AWL, SFC, FBP, ST, LD, CFC
Command dimension | IEC61131-3
PLCopen - Modules | yes
Debug, Single Step, Watch function | yes
Write, read, force variables | yes
Import PLC programs | Siemens Import
Program administration | File – System, FTP
Program interface | Fast Ethernet


Visualization

Locally on the programming system | yes
Web - Server | yes
OPC server | yes


Interfaces

LAN

Ethernet

  • 10 / 100MBit/s

Serial interfaces

2x RS232

  • 115200 baud

    2x RS232 / RS485

  • 115200Baud / 4MBaud

CAN

2x CAN Bus Master

  • 1MHz

Profibus

Profibus DP Slave

  • DP versions: DPV0/DPV1
  • Baud rate: up to 12MHz
  • Profibus ID: C313
  • Device master file: PAR_C313.GSD
  • Process data channel up to 122 words

Digital inputs/outputs option

External terminals (PIO)

Analogue inputs/outputs option

External terminals (PIO)