Transcript CoDeSys

CoDeSys
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
1
Target Settings
Choose you hardware.
Only the CPU
There is some changes
in the 750-841 targets.
For hardware which
support network
functionality or
visuaization you can
enable it here.
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
2
The programming environment
Navigation in WAGO-I/O-PRO
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
3
Making a small program
PLC_PRG defines
the primary
program. This
name will
automatically
appear when you
start a new project.
The program
PLC_PRG will start
PLC is sett into run.
Choose a programming
language for PLC_PRG
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
4
Task configuration
PLC_PRG is as default sett
as a freewheeling task.
In larger projects the task
configuration makes the plc
run more reliable and
smooth.
Right click and choose append Task
Choose Task configuration
Click the Resourses tab
Right click
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
5
Choosing a programming language
Instruction List (IL)
Ladder Diagram (LD)
Function Block Diagram (FBD)
Sequential Function Chart (SFC)
Structured Text (ST)
Continuous Function Chart (CFC)
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
6
The Programming Languages
IL
LD
FBD
ST
CFC
LD 17
ST lint (* Kommentar *)
GE 5
JMPC next
LD idword
EQ istruct.sdword
STN test
SFC
IF value < 7 THEN
WHILE value < 8 DO
value:=value+1;
END_WHILE;
END_IF;
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
7
PLC Configuration
Configure your IO
modules in PLC
Configuration
Choose PLC configuration
Click the Resourses tab
Right click and append Sub element to
start Wago’s IO Configurator
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
8
Data sheet on PDF
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
9
Import from I/O check
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
10
Assign variable names to IO
Double click ”AT”
and type in
Variable name
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
11
How to use the variables in the Program
Select & F2
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
12
Making programs
Give the program a name
Right click
Click
Select a programming
language
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
13
Making a function block
Give the Function block a name
Right Click
Click
Select
Function Block
Choose the programming
language you which to use
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
14
How to call a Program, Function block & Function
Choose block
FB from library
Own FB
Mark the text
and press F2
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
15
Libraries
Right Click
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
16
Libraries
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
17
Libraries on the internet
Industrial Automation
Libraries
Downloads
Program Examples
Industrial Automation
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
Building Automation
18
Web visualization
Hatch of Web visualization
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
Visualization tab
19
Making a visualization
”PLC_visu” defines the start page.
The neme vil not appair automaticly.
Have to be typed in manualy.
Right Click
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
20
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
21
Sub pages
Right Click and Configure
Input
Hatch of
Curcer in the window an press F2
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
22
Example
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
23
Field bus
Right click to add
variables to field bus
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
Assigning IO directly
to field bus
24
Communication Parameters
Double click, type
in IP address of
CPU
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
Click here
before OK
25
Export
You can export the
complete project,
configurations and
programs
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
26
Import
You can Import the
complete project,
configurations and
programs
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
27
How to Flash your project
Online>>Login
From here you can
start an stop the PLC.
Store the project to the flash memory in
the PLC. The complete project can be
downloaded from the PLC afterwards
This makes a bootable code. This
is required if the PLC should start
after power off
© WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007
28