WizPLC 3.0 - CoDeSys Getting Started

WizPLC 3.0 - CoDeSys Getting Started
Axeda Supervisor™
The complete InternetInternet-based solution for control and information
Wizcon 9.1
9.1
WizPLC 3.0 CoDeSys
Getting Started
October 2005
Axeda Systems Inc.
21 Oxford Road
Mansfield, MA 02048
USA
tel +1 (508) 337-9200
fax +1 (508) 337-9201
Axeda Systems SAS
Axeda Systems Ltd
Parc Technologique de Lyon
The Gate Hotel, Scotland Gate
12 allée Irène Joliot-Curie
Northumberland
F-69791 Saint-Priest Cedex
NE62 5SS
France
UK
tel +33 (0)4 72 47 98 98
tel +44 (0)845 606-6120
fax +33 (0)4 72 47 98 99
fax +44 (0)845 606-6121
www.wizcon.com
http://support.wizcon.com
Axeda Systems BV
Concordiaweg 149-151
Postbus 351
NL-4200 AJ Gorinchem
Nederland
tel +31 (0)183 646 303
fax +31 (0)183 621 601
WizPLC 3.0 CoDeSys
Getting Started
Getting Started
with WizPLC 3.0 CoDeSys
1.
2.
3.
4.
5.
6.
7.
About this document .............................................................................................................................3
How to use Wizcon tags in your WizPLC program?.............................................................................3
Launching CoDeSys Studio..................................................................................................................6
Launching WizPLC Runtime.................................................................................................................6
What has changed since version 2.21?................................................................................................7
Tips and tricks.......................................................................................................................................8
Going further with WizPLC .................................................................................................................11
_________________________________________________________________________
Axeda Supervisor
2 / 11
Getting Started
1.
WizPLC 3.0 CoDeSys
About this document
Version
1.0
1.1
1.122
1.123
1.2
1.3
Date
15/10/2004
04/01/2005
31/05/2005
01/06/2005
03/06/2005
17/10/2005
Description
Initial version
Modified to be used as Quick Guide
English/clarification and other minor corrections
Reference correction and screen shot amendments
Layout changes
Final layout and updates
The goal of this document is to help you get started with WizPLC 3.0. It will be useful both to experienced
users of earlier versions of WizPLC and to new users of the product.
CoDeSys is a complete development environment for PLC programming. It complies with the IEC 611313 standard. WizPLC is the integration between CoDeSys System and Axeda Supervisor. The WizPLC
Runtime is a real PLC running on the Win32 platform. You can develop your PLC program in CoDeSys
and download it to the WizPLC Runtime. WizPLC allows you to directly access Wizcon tags in your PLC
program.
In this document, we assume that you are comfortable with the MS Windows environment, with PLC
programming and with Wizcon. Please refer to the Wizcon Quick Guide and/or User Manual if you have
no experience with Wizcon.
If you are an experienced user of the previous version WizPLC 2.21, please note that WizPLC has been
redesigned. Even though the main concept has not changed, some new features have been added,
while others have been removed. Please read this document carefully to get an overview of WizPLC 3.0.
This document focuses on integration between CoDeSys System and Axeda Supervisor / Wizcon.
Please refer to the CoDeSys Online Help to start with PLC programming with CoDeSys.
2.
How to use Wizcon tags in your WizPLC program?
It is possible to have direct access to Wizcon tags in your WizPLC program. You must first define which
tags you wish to access and then export them to the CoDeSys Studio as global variables. You must then
write your PLC program and download it to the WizPLC Runtime. In runtime mode, the value of each
variable is synchronized with the value of the corresponding Wizcon tag.
For increased performance, WizPLC 3.0 allows you to select the Wizcon tags that you want to use in your
PLC program.
Before being able to use Wizcon tags in your WizPLC 3.0 program, you must define which tags you want
to access. There are two ways to do this:
2.1.
Wizcon tag export window
This tool is the easiest way to export Wizcon tags to WizPLC. It also allows access to both Wizcon
Network tags and System tags.
_________________________________________________________________________
3 / 11
Axeda Supervisor
WizPLC 3.0 CoDeSys
Getting Started
The ‘Station’ combo box allows you to select a Wizcon station. By default, the local station is selected.
No station means local station.
The ‘WizPLC variables’ list view (right pane) displays the current WizPLC configuration, i.e. which
Wizcon tags are currently available in WizPLC.
The ‘Wizcon tags’ list view (left pane) displays all the tags on the selected Wizcon station. If no station
is selected, it displays the local tags. You can select one or several tags in this list view.
Note: The list doesn’t contain tags which are already in the WizPLC configuration.
To add a tag to the WizPLC configuration, you must select it in the ‘Wizcon tags’ list view, then set its
properties and click on the ‘Add’ button.
You can also add several tags in ‘One click’ by selecting several tags (keep your keyboard’s Shift key
depressed), set the properties and click on the ‘Add’ button. All selected tags will be added with the
properties. Please note that WizPLC variable name and I/O address properties will be set with their
default values (tag name and no I/O address) in Multi-selection mode.
To remove a tag from the WizPLC configuration, you must select the tag in ‘WizPLC variables’ list view
and click on the ‘Remove’ button. Multi-selection can also be used to remove several tags.
The tag properties are:
• WizPLC variable name: It is possible to map a Wizcon tag to a CoDeSys variable with a
different name. This can be useful if the Wizcon tag name is not IEC 61131-3 compliant. The
default value is the Wizcon tag name (recommended value).
• Has an I/O address: The tag can be mapped to an I/O (connection point with any hardware
connected to the field bus). CoDeSys allows access to an I/O through a Hilscher card. The I/O
_________________________________________________________________________
Axeda Supervisor
4 / 11
Getting Started
•
•
•
•
•
WizPLC 3.0 CoDeSys
address must be IEC61131-3 compliant. Please also note that I/O must be configured in
CoDeSys to map a logic address to a real I/O on the field bus. Please refer to the CoDeSys
documentation to get more information.
Data update: Wizcon cyclically reads the variable value in the WizPLC Runtime. These fields
allow you to configure the polling rate.
No PLC sampling: Wizcon will never get the value from the PLC. Use this option carefully,
when you don’t want to check the value inside the PLC because it has no sense (WIZSYS_TIME
tag for example)
Retain: If this option is checked, the value of the WizPLC variable will be persistent between two
WizPLC sessions (only for bootable projects).
Read-Only: This option means the value of a WizPLC variable cannot be modified by Wizcon.
Variable is initialized by Wizcon: This option means that the WizPLC variable will be set by
Wizcon at start-up. This option cannot be set if the Read-Only or Retain options are checked.
Once the user has modified the WizPLC configuration, he can save it by pressing the ‘OK’ button. If he
presses the ‘Cancel’ button, the changes will not be taken into account.
The exported variables will now be available in your WizPLC program.
2.2.
WizPLC tab in the Wizcon tag definition window
Configuration of WizPLC can also be done directly in the tag definition window. A new WizPLC tab has
been added to this window.
To export a Wizcon tag, the “Export as a WizPLC variable” check box must be checked. Then you have
to define the variable’s parameters. By default, the variable name is the same as the tag name. Please
refer to section 2.1 for a full explanation of how this mechanism works.
If the “Export as a WizPLC variable” checkbox is unchecked, all the controls are disabled.
_________________________________________________________________________
5 / 11
Axeda Supervisor
WizPLC 3.0 CoDeSys
3.
Getting Started
Launching CoDeSys Studio
The Wizcon toolbar allows you to launch WizPLC with the help of the WizPLC button:
It launches the following window:
If you answer ‘Yes’, the tag export tool (see section 2.1) is displayed. If you answer ‘No’, this step is
skipped. If you check ‘Don’t ask again’, this dialog box will no longer be displayed. This option is defined
in the WizTune.dat configuration file by setting WIZPLC_SHOW_EXPORT_TAG key (Value is ‘YES’ or
‘NO’). (please refer to the Wizcon User Guide for more details about WizTune.dat)
Then select the CoDeSys project you want to open:
You can choose to open an existing project or create a new one. You must specify the project’s full path.
Click the “…” button to browse and select the file. Clicking OK will launch CoDeSys Studio and will
define the default settings for Runtime.
Please note that even if you want to create a new project, the project file must exist (create an empty file
with the appropriate name). This makes it possible to define default settings of the project to enable data
exchange between Wizcon and WizPLC.
4.
Launching WizPLC Runtime
The Wizcon toolbar allows you to launch WizPLC Runtime, by clicking this button:
The following window is displayed:
_________________________________________________________________________
Axeda Supervisor
6 / 11
Getting Started
WizPLC 3.0 CoDeSys
You must download its program from CoDeSys Studio (Login). You can start/stop the program execution.
You can also reset the PLC. Please note that if the ‘Variable is initialized by Wizcon’ option is defined for
a variable, its value will reset and Wizcon will reinitialize the value.
Shutdown ends the program execution and closes the window.
5.
What has changed since version 2.21?
The goal of this chapter is to provide an overview of the main changes in WizPLC 3.0 since WizPLC 2.21.
The goal is not to have an exhaustive list but to help WizPLC 2.21 users to use the new version.
5.1.
You can choose the Wizcon tag you wish to access
You can improve the data exchange task performance by selecting the Wizcon tag you want to use in
your WizPLC program and defining the data exchange settings for each tag. Please refer to 2. How to
use Wizcon tags in your WizPLC program? for more information.
5.2.
WizPLC 3.0 is based on the latest version CoDeSys
You can use all the new features of CoDeSys. Axeda is now member of the CoDeSys Automation
Alliance. WizPLC will benefit from all future enhancements of CoDeSys and will support other targets.
Please refer to the CoDeSys documentation for more information.
5.3.
It is no longer possible to create a Wizcon tag from CoDeSys
As a consequence of using the standard version of CoDeSys, it is no longer possible to create a Wizcon
tag from within CoDeSys. Wizcon is the correct place to declare your tags. This provides a consistent
approach to application development.
5.4.
Starting WizPLC Runtime
In WizPLC 2.21, the runtime was automatically started after login. For security reasons, in WizPLC 3.0,
login will fail if the runtime is not started and you will get a communication error message. Please launch
the WizPLC Runtime (from the Wizcon toolbar for example) before logging into it.
_________________________________________________________________________
7 / 11
Axeda Supervisor
WizPLC 3.0 CoDeSys
5.5.
Getting Started
WizPLC system tag support
WizPLC system tags are not available in WizPLC 3.0. Even if the tag exists, the value is not set by the
system. You can simulate it easily by using the SysLibIECTask library.
The impacted system tags are: WIZSYS_WIZPLCCYCLES, WIZSYS_WIZPLCCYCLETIME,
WIZSYS_WIZPLCMAXTIME, WIZSYS_WIZPLCRTRUNNING, WIZSYS_WIZPLCSTATE
5.6.
I/O card support
Hilscher card support is now based on the 3S driver. This improves Hilscher card integration with the
WizPLC Runtime.
Applicom cards are currently not supported.
6.
Tips and tricks
6.1.
Updating the list of Wizcon tags
Each time you modify a tag, the list of exported Wizcon tags is modified. To see these modifications in
CoDeSys, you must force the file import. It is done automatically before any project build. You can force
it by pressing F11 on your keyboard.
6.2.
Communication errors
If a PLC program and a Wizcon application don’t match, i.e. the WizPLC program references variables
that do not exist in the Wizcon application, the following message will be shown:
If you click ‘Yes’, it will retry to launch the data exchange task. Fix your problem (by loading the proper
PLC program) before trying again.
If you click ‘No’, there will be no data exchange between Wizcon and CoDeSys until you shutdown the
WizPLC Runtime. The following error message will appear:
6.3.
Closing WizPLCRT at Wizcon shutdown
It is possible to force WizPLC Runtime to shutdown when Wizcon shuts down by setting
WIZPLCRT_EXIT_ON_WIZCON_SHUTDOWN=YES in Wiztune.dat
Please note that if the WizPLCRT is running, a security dialog box pops up. The user must confirm that
he wants to stop the PLC program. This security dialog box has no influence on the Wizcon shutdown.
_________________________________________________________________________
Axeda Supervisor
8 / 11
Getting Started
WizPLC 3.0 CoDeSys
Troubleshooting: If a communication error occurred and this option is enabled, WizPLC Runtime will be
shutdown. You must disable this option and try to solve the communication problem (bad license, nonmatching program …). You can use the file SofPLCDx.log (in the SoftPLC folder of your application) to
get more information on the communication error.
6.4.
Defining PLC state after loading a bootable project
It is also possible to verify whether the PLC is started or not after a bootable project has been loaded with
the following key in WizPLCRT.ini. This file is located in the WizPLC\bin folder.
[PLC]
AutoOperStart=1
1 means manual start mode.
0 means auto start mode.
6.5.
BCD format
Wizcon tags provide the possibility to use BCD types for Tags. Although the BCD type is not supported
by the IEC-61131-3 standard, it is possible to export BCD type to WizPLC. In WizPLC, BCD tags are
defined as IEC-61131 UINT. The value for a UINT can be from 0 to 65535. But as the maximum value
for a Wizcon BCD tag is 9999, the value of the corresponding WizPLC variable can not be greater than
9999.
Note: The use of BCD tags in WizPLC is allowed but not recommended.
Moreover, having Read-Only BCD tags can lead to unsynchronized values in Wizcon and WizPLC.
6.6.
Wizcon Conversion rule
If a conversion rule is defined for a Wizcon tags, the type of the WizPLC variable will be forced to ‘Float’.
A conversion rule exists when you define a conversion between the measured value and the engineering
value of a Wizcon tag.
6.7.
The WizPLCDx log file
WizPLCDx is the module managing the communication pipe between WizPLC Runtime and Wizcon. It is
possible to view traces of the events in the SoftPLCDx.log file. The log level can be defined in
WizPlcDx.ini file. This file is located in the SoftPLC folder of your application.
[LogFile]
Level=INF
Overwrite=1
DeclLogEnabled=1
Level can be: ERR, WRN, INF. It defines the level of the trace filter.
Overwrite defines whether the previous log file is deleted or not when a new session is started (1 is
recommended).
DeclLogEnabled will activate logging declaration traces in a specific file.
6.8.
WizPLC Runtime Reset
In CoDeSys, you have three different kinds of Reset.
1- Reset all non-Retained variables and stop the program
2- Reset all variables and stop the program
3- Reset all variables and erase the loaded program.
The WizPLC Runtime reset button corresponds to the first option.
_________________________________________________________________________
9 / 11
Axeda Supervisor
WizPLC 3.0 CoDeSys
6.9.
Getting Started
You can use libraries in your PLC program
By default, only standard libraries are inserted but you can add any library you wish. WizPLC is provided
with several libraries to perform different tasks (control Wizcon, get fieldbus state, use PID controller,
access COM ports etc). Please review the WizPLC documentation for an overview of features provided.
_________________________________________________________________________
Axeda Supervisor
10 / 11
Getting Started
WizPLC 3.0 CoDeSys
Libraries are located on your hard drive in the following locations:
…\CoDeSys V2.3\Library
…\WizPLC\bin
… \CoDeSys V2.3\Targets\3S\Lib_PLCWinNT
Standard libraries
Wizcon dedicated libraries
WizPLC Runtime specific libraries
6.10. Copying a Wizcon application
If you copy an existing Wizcon application to a different location, the Wizcon object of your CoDeSys
project will still be linked to the previous location. In this case, you must manually change the location in
the object properties window.
7.
Going further with WizPLC
It is not possible to summarize all the possibilities of WizPLC in a few pages. For more information,
please refer to the CoDeSys User Manual and Online Help.
Enjoy PLC Programming with WizPLC 3.0 CoDeSys and Axeda Supervisor / Wizcon!
_________________________________________________________________________
11 / 11
Axeda Supervisor
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement