2 how to create a project with canopen, 1 creating a new project and target selection, 2 create the plc application – Lenze PLC Designer PLC Designer (R2-x) CANopen for Runtime Systems User Manual

Page 8: 3 including the required libraries, How to create a project with canopen

Advertising
background image

L-force | PLC Designer - CANopen for Runtime Systems

CANopen-Master library

DMS 2.0 EN 05/2009 TD29

7

2.2.2 How to create a project with CANopen

The creation of a new project with CANopen will be described step by step in the following. It is
assumed that the »PLC Designer« programming system is installed and that also the target- and
EDS-files have been installed resp. copied correctly.

Note: A description of the dialogs and menu commands of the CAN PLC Configurator is available in
the »PLC Designer« user documentation (User Manual, Online Help) .

2.2.2.1 Creating a new project and target selection
After having started »PLC Designer« choose => File | New

In the Target Settings dialog select the desired target system.

Then in tab General activate option Support CANopen configuration. If this option is not available in
the dialog and no CAN Master can be inserted in the PLC Configuration, this means that the target
does not support CANopen.

2.2.2.2 Create the PLC application
After having closed the target settings dialog by OK, »PLC Designer« automatically opens a dialog for
adding the main POU PLC_PRG. After having selected the programming language (ST, LD, FBD…)
and closed the dialog with OK you can start programming an application.

2.2.2.3 Including the required libraries
The needed libraries 3S_CanOpenManager.LIB and 3S_CANDRV.LIB and one or several of the
libraries 3S_CanOpenNetVar/Master/Device.lib must be included in the project. For this purpose use
command Window | Library Manager and then for each of the libraries Insert | Additional Library…
from the context menu of the library manager or from the menu bar.

Note:
When you insert one of the libraries 3S_CanOpenNetVar/Master/Device.lib, all libraries referenced by
this library will be included automatically.

Including the libraries is an important step. By the presence of the libraries »PLC Designer« can
recognize that a CANopen project is done, for which then special implicit program parts will be created
automatically.
A description on the »PLC Designer« CAN configurator you find in the »PLC Designer« online help.
See there how to configure a CANopen-Master and slaves.

After having included the CANopen libraries in the project, you must insert a CANopen-Master or -
Device before you can compile the project without any errors.

Advertising