Sie sind auf Seite 1von 28

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
LD 17
ST lint (* Kommentar *)
GE 5
JMPC next
LD idword
EQ istruct.sdword
STN test

SFC ST CFC
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 Wagos 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

Select
Click 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 Building Automation

WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007 18


Web visualization

Hatch of Web visualization


Visualization tab

WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007 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

Assigning IO directly
Right click to add
to field bus
variables to field bus

WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007 24


Communication Parameters

Double click, type


in IP address of Click here
CPU before OK
WAGO Kontakttechnik GmbH & Co. KG S&T BAC 16.01.2007 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

From here you can


Online>>Login 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

Das könnte Ihnen auch gefallen