Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

IindraLogic Prog 04 2007 e

Download as pdf or txt
Download as pdf or txt
You are on page 1of 333

Industrial Hydraulics

Electric Drives and Controls

Linear Motion Assembly Technologies

Pneumatics

Service Automation

Mobile Hydraulics

Training manual

Indralogic Basic Revision 04 / 2007

didactic from Rexroth. Systematic Success

Indralogic Basic
Revision 04 / 2007

Impressum Publisher: Bosch Rexroth AG Service Automation didactic Author: Helmut Kleinhans BRC / SAL2

Impressum Herausgeber: Bosch Rexroth AG Service Automation didactic

Nachdruck, Vervielfltigung und bersetzung, auch auszugsweise, nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe gestattet. Wir bernehmen keine Haftung fr die bereinstimmung des Inhalts mit den jeweils geltenden gesetzlichen Vorschriften. Reproduction, copying, or translation of this publication, wholly or in part, only with our previous written permission and with source credit. We assume no responsibility for agreement of the contents with local laws and regulations. Bosch Rexroth AG is exempt from liability, and reserves the right to make changes at any time.

Table of Contents

Chapter 1 > Network installation


Setup of the Network Neighborhood in Windows 2000 Setup of the Network Neighborhood in Windows 2000 Setup of the Network Neighbourhood in Windows 2000 Setup of the Network Neighborhood in Windows 2000 Setup of the Network Neighborhood in Windows 2000 Setup of the Network Neighbourhood in Windows XP Setup of the Network Neighbourhood in Windows XP Setup of the Network Neighbourhood in Windows XP Setup of the Network Neighbourhood in Windows XP Setup of the Network Neighbourhood in Windows XP Functional overview Hardware stucture of IndraControl L40 Features Mechanical structure Connectionss and interfaces Current and voltage supply I/O connections First time installation L40 IPAddress setup Firmware Hardware version & Status display L40 Setup of L40 serial RS232 interface Display of L40 Project status Deletion of complete L40 ProgramMemory 1 2 3 4 5 6 7 8 9 10 11 12 12 13 13 14 15 16 17 18 19 20

Chapter 2 > Basic setup IndraWorks / IndraLogic


Language and Basic settings for IndraWorks Generation of a new IndraWorks Project Generation of a new IndraWorks Project (continuation) Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC) Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC) Definition of communication channel for VPP/BTVPanel (SoftwarePLC) Definition of communication channel for VPP/BTVPanel (SoftwarePLC) Completion of communication setup / creation of the new project Communication with a L40 / VEPxx (Hardware PLC) Communication with a VPP / BTV Panel (Software PLC) IndraWorks / Indralogic directory structure IndraWorks / IndraLogic Basic settings 1 2 3 4 5 6 7 8 9 10 11 12

Table of Contents

II

Chapter 3 > IndraWorks I/O Configuration


Setup of I/O Start address of OnBoard I/Os Configuration of Rexroth Inline Modules (first InlineModul) Configuration of Rexroth Inline Modules (first InlineModul) Configuration of Rexroth Inline Modules (second InlineModul) Configuration of Rexroth Inline Modules (second InlineModul) Import of additional GSDFiles for ProfibusDP I/OConfiguration Import of additional GSDFiles for ProfibusDP I/OConfiguration Directory structure of GSDFiles Configuration of ProfibusDP I/O Modules Configuration of ProfibusDP I/O Modules Configuration of ProfibusDP I/O Modules Configuration of Function Modules Setup of the ProfibusDP transmission rate Load ProfibusDP Configuration into PLCController Load ProfibusDP Configuration into PLCController Load ProfibusDP Configuration into PLCController 1 2 3 4 5 6 7 7 8 9 10 11 12 13 14 15

Chapter 4 > IndraLogic basic settings


Setting the basic parameters for Indralogic Load & Save Setting the basic parameters for Indralogic Editor Setting the basic parameters for Indralogic Desktop Setting the basic parameters for Indralogic Directories Setting the basic parameters for Indralogic Build Setting the basic parameters for Indralogic Source download IndraLogic Symbol configuration IndraLogic Symbol configuration Target System Basic setup General Target System Basic setup General Project structure Main program PLC_PRG IndraLogic directory structure on harddrive (Development system) IndraLogic directory structure on harddrive (Project data) Files in the Indralogic programming system Display structure IndraLogic Generation of a new Folder Generation of a new Object Elements of Program Organization Units (POU) Elements of Program Organization Units (POU) Programming languages for POUs Elements of a Program Organization Unit (POU) Elements of Program Organization Units (POU) Deklaration section of Program Organisation Units (POU) Characteristics of the POUInterface Formal parameters and Return values of a POU External and internal access to POEVariables 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 19 20 21 22 23 24 25

Table of Contents

III

Chapter 5 > Load Program


Load options and Memory structure Used / Generated files Check and compile complete PLCProgram Check interface setting to PLC (IPAddress) Load PLCProgram into the PLC Generate Boot Project in PLCController 1 2 3 4 5 6

Chapter 6 > Import / Export of Program blocks


Export of Project data Export of Project data Import of exported project data Import of exported project data 1 2 3 4

Chapter 7 > Programming with Logic


Address definition of Inputs, Outputs and Markers Definition of Input, Outputs and Markers Using bit signals in the program Monitoring of BitSignals Standard Data Types in Indralogic Validity of Variables Declaration of Variables Declaration of Constants Global Variables in POUs via VAR_EXTERNAL Online Status display of variables in declaration window Resizing the Online Window Selection of display format in Online mode 1 2 2 3 4 5 6 7 8 9 10 11

Table of Contents

IV

Chapter 8 > Programming in List


Creation of a program in LIST Calling of POUs with and without parameters in LIST Programming of logic operations in LIST (Example 1) Programming of logic operations in LIST (Example 2) Programming of logic operations in LIST (Example 3) Programming of logic operations in LIST (Example 4) Programming of logic operations in LIST (Example 5) Monitor display in LIST (PRGs) Creation of a Function in LIST Definition and Usage of a Function (FUN) Online Status display of Functions Creation of a Function block in LIST Definition and Usage of a Function block (FB) Definition and Usage of a Function block (FB) Online Status display of Function blocks Online Status display of Function blocks 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Chapter 9 > Programming in Ladder


Creation of a program in LDR Input of a program in LDR Alteration of program in LDR Addition of a new OR Element Addition of a new AND element Adding a new LDRNetwork branch Addition of Function blocks in LDR Addition of FBDOperators in LDR Addition of FBDOperators in LDR Call of Programs (PRGs) in LDR Call of Programs (PRGs) in LDR Call of Functions (FUNs) in LDR Call of Function Blocks (FBs) in LDR Conditional calls of PRGs, FUNs and FBs in LDR Online display of POUs written in LDR Additional display options in LDR Comment input in LDR Jump instruction in LDR 1 2 3 3 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Table of Contents

Chapter 10 > Programming in FBD


Creation of a program in FBD Input of a program in FBD Adding of new Logic Elements in FBD Definition / Alteration the logic or function of a BasicFBDElement Deletion of Inputs, Outputs and Elements Adding a new FBDNetwork Direct switchover from FBD to LDR display Monitor display in FBD Input of Comment in FBD Jumps in FBD Call of Programs, Functions and Function blocks in FBD Call of Programs, Functions and Function blocks in FBD Definition and usage of Timers Definition and usage of Timers Monitoring of Timers / Diagram Switch On Delay (TON) Monitoring of Timers / Diagram Switch Off Delay (TOF) Monitoring of Timers / Diagram Pulse function (TP) Monitoring of Timers / Diagram Real Time Clock (RTC) Definition and usage of Counters Definition and usage of Counters Online Status display Up Counter (CTU) Online Status display Down Counter (CTD) Online Status display Up / Down Counter (CTUD) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

Table of Contents

VI

Chapter 11 > Sequence programming


Selection of IEC compliant SFC Input Mode IECStepAction commands Creation of an IECSequence program Adding a new step element Copy / Paste an existing Step in a Sequence module Deletion of an existing StepElement Adding a new Step Action Deletion of a StepAction Programming of a step continuation logic Programming of a step continuation logic (continuation) Programming an ActionLogic Programming an ActionLogic (continuation) Programming a step Entry logic Programming a step Entry logic (continuation) Programming a step Exit logic Programming a step Exit logic (continuation) Deletion of a step Entry or Exit logic StepPropertyVariables StepPrpopertyFlags StepPropertyFlags Programming of StepPropertyFlags Online display of StepPropertyFlags Sample sequence program in LDR Step elements & Parameters Sample sequence program in LDR Continuation logic Sample sequence program in LDR Command output Sample sequence program in LDR Program callup Sequence Branching / Jump Sequence Branching / Jump Sample program sequence Branching / Jump Input of Step comment and Step monitoring time Selection of step comment or Step monitoring time display 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Table of Contents

VII

Chapter 12 > Programming in ST


Logic operations with Structured Text (ST) Logic operations with Structured Text (ST) Calling program modules (PRGs) Definition and usage of Functions (FUN) Function parameter input Online Status display of of Functions Definition and usage of Function Blocks (FB) Definition of an instance for a function block (Memory allocation) Monitoring of Function Blocks Monitoring of Function Blocks Selection of SFC Input Mode (simlified SFC non IEC) Creation of a SFCSequence programm Add a new step element Copy / Paste an existing Step in a Sequence module Deletion of an existing StepElement Programming a step Sample Sequence program ST Step elements & Parameters Sample Sequence program ST Continuation logic Sample Sequence program ST Command output Sample Sequence program ST Module callup Sequence Branching / Jump Sequence Branching / Jump Sample program sequence Branching / Jump Sample program sequence Branching / Jump 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Chapter 13 > Task managment


Applications with Task managemant Time related behavier of Tasks Creation of a new Task Creation of a Task Definition of the Task properties Creation of a Task Definition of a program module Description of properties Cyclic Task Description of properties Free wheeling Task Description of properties Event controlled Task Description of properties External Event controlled Task (Interrupt) Description of properties System events Display of Task Timing Diagram in Online mode 1 2 3 4 5 6 7 8 9 10 11

Chapter 14 > Library managment


Insertion of a new library into the current project Insertion of a new library into the current project 1 2

Table of Contents

VIII

Chapter 15 > Remanence behaviour of variables


Behavier of variables after Power Off / ON and Stop / Run (Remanence) Declaration of remanent variables Usage of remanent variables in POUs Usage of remanent variablen in POUs 1 2 3 4

Chapter 16 > Monitoring


Monitoring the program flow Enter variable list into Watch & Recipe Manager Online display of variable list with Watch and Recipe Manager Read and alter Variables with Recipe Manager Write Variables from Recipe Manager into PLC Activation of the Trace Function Definition of Trace Parameters Definition of Trace Parameters Definition of Trace Parameter Start of a Trace sample recording Start of a Trace sample recording 1 2 3 4 5 6 7 8 9 10 11

Chapter 17 > User specific data structures


Definition of Enumerations Using enumerations in the program Monitoring of enumerations Definition and usage of Structures Using structures in the program Monitoring of structures of userspecific data types Status display in the program Status display in the Ressources 1 1 2 3 3 4 4 4

Table of Contents

IX

Chapter 18 Backup & Restoring an IndraWorks Project


Backup of a complete IndraWorks Project Backup of a complete IndraWorks Project Backup of a complete IndraWorks Project Restoring of an archived IndraWorksProject (ZIPFile) Restoring of an archived IndraWorksProject (ZIPFile) Restoring of an archived IndraWorksProject (ZIPFile) Restoring of an archived IndraWorksProject (ZIPFile) Restoring of an archived IndraWorksProject (ZIPFile) Adaption of the PLCDirectories Importing a Standalone IndraLogic Program (*.PROFile) Importing a Standalone IndraLogic Program (*.PROFile) Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC) Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC) Importing a Standalone IndraLogic Program (*.PROFile) Importing a Standalone IndraLogic Program (*.PROFile) Importing a Standalone IndraLogic Program (*.PROFile) Importing a Standalone IndraLogic Program (*.PROFile) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Chapter 19 Language translation


Generation of the translation file Generation of the translation file Input of the translations into the translation file Input of the translations into the translation file Switchover to another language 1 2 3 4 5

Table of Contents

Chapter 20 Command overview


Identifier, Keywords Identifier, Keywords Numerical literals String-Literals Time literals 1. Duration of time Date and Time Boolean Operators Arithmetical Operators Compare Operators Bit manipulation Type conversion Numeric Functions Numeric Functions Selection Function String Functions String Funktions Standard-Function blocks Flip Flop Elements Flankenerkennung Timer Counter 1 2 3 3 3 4 4 5 6 7 8 9 10 11 12 13 14 14 14 15

Table of Contents

XI

Chapter 21 Exercises
Network structure I/O Bus Configuration Program structure Global Variables Inputs and Outputs Signal list Switch Box (Bit signals) Signal list Switch Box (Byte & Word) Signal Markers Example 1 Example 3 Example 4 Example 5 Example 6 AND before OR Circuit Circuit with bracket Circuit with ORbracket Transportation Slide Signal list machine model Signal list machine model Exercise Programming of a Function Exercise Programming of a Function Exercise Programming of a Function Block Exercise Programming of a Function Block Manual logic Exercise Programming of a Function Block Automatic logic Automatic Sequence Robot Station Automatic Sequence Robot Station Automatic Sequence Robot Station Automatic Sequence Transportation Slide Automatic Sequence Press In Station Automatic Sequence Press In Station 1 2 3 4 5 5 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

Network

CHAP 1

Chapter 1 Network Installation

2004
This manual is the exclusive property of Bosch Rexroth AG, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties.Errors and technical modifications reserved.

TCP/IP Installation Setup of the Network Neighborhood in Windows 2000

CHAP 1

Note ! Before the setup of the Network Neighborhood, the a Networkcard must have been installed 1. Callup the Windows Control Panel and double click on the System icon

TCP/IP Installation Setup of the Network Neighborhood in Windows 2000

CHAP 1

2. Click onto Network Identification and than onto the button Properties

3. Enter Computer name and Workgroup, to which computer should belong to

Note ! The Computer name must be unique in whole the network The Workgroup name must be the same on all computers on the network

Note ! The Workgroup name must be the same on all computers on the network, which should belong to this group

TCP/IP Installation Setup of the Network Neighbourhood in Windows 2000


4. Callup the Windows Control Panel and double click on the Network and Dialup Connections icon

CHAP 1

5. Open the network connection for which you want to set the IPAddress

TCP/IP Installation Setup of the Network Neighborhood in Windows 2000


6. Click onto Properties, to open the TCP/IPProperty window

CHAP 1

7. Select entry Internet Protokol (TCP/IP) and click onto button Properties

TCP/IP Installation Setup of the Network Neighborhood in Windows 2000


8. Enter the IPaddress and the Subnet mask

CHAP 1

Important note ! It is not recommended to make any other alterations or changes in the Network properties window

IPAddress Subnet mask


No entry required in the Default gateway field

TCP/IP Installation Setup of the Network Neighbourhood in Windows XP

CHAP 1

Note ! Before the setup of the Network Neighbourhood, the a Network Card must have been installed 1. Callup the Windows Control Panel via the Start button

2. Double click on the System icon

TCP/IP Installation Setup of the Network Neighbourhood in Windows XP


3. Click onto tab Computer name

CHAP 1

4. Click onto Change

Note ! The Computer name must be unique in whole the network

Note ! The Workgroup name should be the same on all computers belonging to this group

TCP/IP Installation Setup of the Network Neighbourhood in Windows XP


5. Callup the Windows Control Panel and double click on the Network and Dialup Connections icon

CHAP 1

6. Open the Property window by double clicking onto the network connection for which you want to set the IPAddress

TCP/IP Installation Setup of the Network Neighbourhood in Windows XP


7. Click onto Properties, to open the TCP/IPProperty window

CHAP 1

8. Select entry Internet Protokol (TCP/IP) and click onto button Properties

TCP/IP Installation Setup of the Network Neighbourhood in Windows XP


9. Enter the IPaddress and the Subnet mask

CHAP 1

10

IPAdresse Subnet Mask

No entry required in the Default gateway field

Important note ! It is not recommended to make any other alterations or changes in the Network properties window

Hardware L40 & Network Installation

CHAP 1

11

Functional overview
StatusDisplay Ethernet connection for Onboard I/O 8 fast inputs usable as interrupt inputs 8 outputs (0,5 A) power supply terminal

8 characters Programming unit or Operating panel communication to: 4 Buttons New controls e.g. adjustment of the (NetVarUDPLib) or communication parameters or to the old CLxx world (BuepE_Client)

Inline I/O Extension with RexrothInline Modules max. 64 Modules max. 32Byte I and O

Extension interface for Function modules .

RS232interface for COM PROG Programming unit COM SERV small operation panel COM USER Programming unit or serial communication with SysLibCom

Progr. memory 32 MB RAM 64 kB NvRAM Boot project Remanence new File types

Profibus DPV1 max. 8 k I/O Add DPSlaves to I/O configuration Access to VCP panel (IL_VCP_DP) Acyclic Services (V1) DP_Diag via function DP_RDREC, DP_WRREC

Hardware L40 & Network Installation

CHAP 1

12

Hardware stucture of IndraControl L40


IndraControl L40 is a compact control system designed for a medium performance range. It is mounted to a hat rail. The IndraControl L40 may be expanded at the right end with I/O modules of the InlineSystem. The functionality of the IndraControl L40System can be enhanced at the left end with special function modules.

IndraControl L40 uses the proved Real Time operating system VxWorks. The processor is a 266MHz Geode with 32MB DRAM and 64kByte NvRAM.

Features
User memory Remanent memory 32 MB 64 kByte Runtime Programming languages Programming system Programming interface Functions for monitoring Indralogic (according to EC 611313) according to IEC611313: IL, LAD, FBS, ST, SFC, CFC Rexroth IndraWorks Ethernet or RS232 Monitoring, Online Change, Trace, Write (1 cycle) / Simulation, Breakpoint, single step, single cycle Supplied libraries Standard IEC 61313 library TCP/IP + ser. communication, VCP interface, DP_Diagnosis

Number of tasks 16 Task types In/ Outputs Forcing, cyclic, free wheeling, event controlled 8 Bit I (interrupt) + 8 Bit O on board 512 Bit I/O (central) 8 kByte I/O (decentral via ProfibusDP V1) typical 120 s (1000 Instr. of IL)

Cycle time

Hardware L40 & Network Installation

CHAP 1

13

Mechanical structure
The IndraControl L40 is mounted to a standard hat rail according to DIN EN50022. (35mm x 7,5mm) Note: Beside the mounting function, the hat rail also has the function of grounding and is additionally used for heat conduction. This means, that the hat rail must always be connected to a grounding bus. Additional the heat is partial conducted via the hat rail. So it is used in conjunction with the metallic ground plate of the L40 as a cooling element. The power supply voltages and the Onboard in and Outputs are wired via the Inline terminals. Sensors and actors at the Onboard I/Os are connected with a 2wire technique (Sensors with 24V and signal, actors with signal and 0V). The connection terminals for all wires are facing located at the front side of the housing. The bending radius should not exceed 120mm. Because of its low protection category IP20, the IndraControl L40 must be mounted inside of a control cabinet or a similar housing. The prefered mounting position is horizontal. Due to thermic reasons, a vertical mounting is not recommended.

Connectionss and interfaces


Label on housing X3C X7E X7P Interface type Serial interface RS232 Network interface: Ethernet 10Base T / 100Base X DP: PROFIBUS DP Connector type DSubconnector (male), 9poles RJ45connector (female) DSubconnector (female), 9poles

For more informations please see manual: Indracontrol L40 Chapter 7 Connections and interfaces

Hardware L40 & Network Installation

CHAP 1

14

Current and voltage supply


The 24V power supply used to supply power to the L40, has to be equipped with a save circuit isolation according to EN 60742.

supply terminal supply terminal

supply terminal with fuse

The main circuit may be separated from other circuit segments, which are independent of each other. In that case, the main circuit supplies the main voltage for all these segments. Using this option , a separate supply circuit for actor groups can be realized. The maximum current load is 8 A (Sum of main circuit and all segments). If the limit value is reached (current sum of US and UM), a new (additional) power supply terminal must be used. For more informations please see manual: Indracontrol L40 Chapter 7.2 Power supply

Hardware L40 & Network Installation

CHAP 1

15

I/O connections

Master
I

CPU

National Geode SC1100 min. 266 MHz 32 MB DRAM + 64 kByte NvRAM

Node 0

Onboard I/O

1 Byte Input (can be used as interrupt input) 1 Byte Output

Node 1
B

I/O at local Expansion interface

max. 32 Byte I / O via InlineModules

Node 2

Profibus DP I/O

max. 125 DPSlaves max. 12 MBaud max. 244Byte/telegramm max. 8 kByte I / O

. . .

126

Hardware L40 & Network Installation First time installation L40 IPAddress setup

CHAP 1

16

INIT
Enter

RUN
Enter

STOP Ethernet
Enter Display IP Adrress

Ethernet
Enter Display

IP : 10.23.1.27
Enter Input

IP : 10.23.1.27
Display Subnet Mask

AAA : 192
Enter

Subnet : 255.255.0.0
Enter Input

BBB : 168
Enter

AAA : 255
Enter

CCC : 1
Enter

BBB : 255
Enter

DDD : 11
Enter

CCC : 255
Enter

OK : ?
ESC Abort Enter Confirm

DDD : 0
Enter

OK : ?
ESC Abort Enter Confirm

Hardware L40 & Network Installation Firmware Hardware version & Status display L40

CHAP 1

17

INIT
Enter

RUN

STOP

Ethernet
Selection

RS 232
Display

Firmware

Enter

03V03
ESC Abort

Hardware

Enter

CML 40.1NP220NA
ESC Abort

Temp

Enter

+ 44,0C
ESC Abort

OHC CTRL

Enter ESC

1018 h
Abort

OHC FAN

Enter ESC

0h
Abort

Hardware L40 & Network Installation Setup of L40 serial RS232 interface

CHAP 1

18

INIT
Enter

RUN

STOP

Ethernet
Selection

RS 232
Enter

COM SERV
Enter

COM : SERV

Enter

OK : ?
ESC Abort Enter Confirm

COM : USER

Enter

OK : ?
ESC Abort Enter Confirm

COM : PROG

Enter

OK : ?
ESC Abort Enter Confirm

Hardware L40 & Network Installation Display of L40 Project status

CHAP 1

19

RUN PLC:OK
Enter

Outp. ON

Enter

OUTP: ON

OUTP: OFF
ESC Abort Enter Confirm

PLC RUN

Enter

PLC: RUN

PLC: STOP
ESC Abort Enter Confirm

PLC PROJ
Enter

PROJ:L40_Name.pro

PROJDATE : DT#2006081609:30:23

PROJSIZE : 456678 Byte


ESC Abort

Hardware L40 & Network Installation Deletion of complete L40 ProgramMemory

CHAP 1

20

HW WATCH
1. Disconnect L40 from supply voltage . 2. Reconnect L40 to supply voltage

BOOT1.01
ESC

3. Wait until you see this message 4. Press both keys at the same time and keep them pressed

Enter

BOOT1.02 BOOT1.03 BOOT1.04 Bootproj


Enter 5. Wait until you see this message, than release the two keys

delete ?
Enter

OK : ?
Enter Confirm deletion

Bootproj
ESC Exit

INIT
6. Complete L40 program memory has been deleted and PLC Program has to be loaded with IndraLogic

IndraWorks Projects

CHAP 2

Chapter 2 IndraWorks Projects

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

IndraWorks Projects Language and Basic settings for IndraWorks

CHAP 2

Click onto Tools / Options, to set the basic parameters of IndraWorks

Language setting for User Interface

Default directory for IndraWorks projects

Menu parameters

IndraWorks Projects Generation of a new IndraWorks Project

CHAP 2

1. Click onto Drive and Control, to

display the available Target Systems

2. Click onto File and select New / Project

3. Enter the name of the new project, and select the directory, into whicjh you want to store the project

4. Take over the new settings by clicking onto the OK button

IndraWorks Projects Generation of a new IndraWorks Project (continuation)

CHAP 2

5. Select desired Target System with the left mouse


button and keep the left mouse button pressed

6. Drag the selected Target System with the left mouse button still

pressed onto the Project name and release the left mouse button as soon as a line is displayed below the Project name

7. Enter the name of the new IndraWorks project

IndraWorks Projects

CHAP 2

Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC)

8. Select desired firmware version

9. Click onto button Extended to select


BYTE or WORD addressing mode

10. Callup the communication window, in order to enter the

parameters to be used for the connection with the Target System

11. Click onto Gateway, to setup the

parameters for a local Gateway Server

12. Select Local and confirm

by clicking onto the OK button

IndraWorks Projects

CHAP 2

Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC)

13. Click onto New to create a new


communication channel

14. Select communication channel


Tcp/Ip (Level 2 Route)

15. Open the input field for the

IPAddress by double clicking onto localhost

17. Apply new settings by 16. Enter the IPAddress of the L40 controller
to which you want to make a connection and confirm the input by pressing the Enter key

clicking onto the OK button

IndraWorks Projects

CHAP 2

Definition of communication channel for VPP/BTVPanel (SoftwarePLC)

10. Callup the communication window, in order to


enter the parameters to be used for the connection with the Target System

11. Click onto New to create a new


communication channel

12. Select communication channel


Tcp/Ip (Level 2 Route)

IndraWorks Projects

CHAP 2

Definition of communication channel for VPP/BTVPanel (SoftwarePLC)

13. Click onto Gateway, to setup the

parameters for an external GatewayServer

14. Select Tcp/Ip

15. Enter the IPAddress of the

VPP/BTVPanel to which you want to make a connection, and confirm the address by clicking onto the OK button

16. Apply new settings by


clicking onto the OK button

IndraWorks Projects

CHAP 2

Completion of communication setup / creation of the new project


Communication via a local GatewayServer (L40)

Note ! By clicking with the right mouse button onto the icon Logic, the communication window can be called up again by selecting Properties

IndraWorks Projects Communication with a L40 / VEPxx (Hardware PLC) External PC with IndraWorks / Indralogic

CHAP 2

IndraLogic Programming System Target System L40/VEP30 Communication via Gateway with Local (IP 192.168.1.101) Gateway Server Network adapter (e.g. IPAddresse = 192.168.1.50)

L40 / VEP30 Integrated network adapter (e.g. IP 192.168.1.101) Hardware PLC (VxWorks)

IndraWorks Projects

CHAP 2

10

Communication with a VPP / BTV Panel (Software PLC) External PC with IndraWorks / Indralogic Indralogic Programming System Target System VPP/BTV Communication via Gateway with TCP/IP (192.168.1.202) Network adapter (e.g. IPAddress = 192.168.1.50)

VPP / BTV Network adapter (e.g. IP Address = 192.168.1.202 Gateway Server Communication with VxWin Shared Memory Network via local network IPAddress 192.168.0.2 Software PLC

IndraWorks Projects IndraWorks / Indralogic directory structure

CHAP 2

11

IndraWorks Project directory

PLCProgram

Indralogic Project directory Directory with PLCProgram files

IndraWorks Projects IndraWorks / IndraLogic Basic settings

CHAP 2

12

1. Select the icon Logic with the left

mouse button, press the right mouse button and select Properties

2. Activate / Deactivate settings by

clicking with the left mouse button on it

3. Check, if the directory for the I/O Confiiguration (GSD Files) is correct

Default setting : C:\Program files\Rexroth\IndraWorks\IndraLogic\Targets\Config\

IndraWorks I/O Configuration

CHAP 3

Chapter 3 IndraWorks I/O Configuration

Nachdruck, Vervielfltigung und bersetzung, auch auszugsweise, nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe gestattet. Wir bernehmen keine Haftung fr die bereinstimmung des Inhalts mit den jeweils geltenden gesetzlichen Vorschriften. Reproduction, copying, or translation of this publication, wholly or in part, only with our previous written permission and with source credit. We assume no responsibility for agreement of the contents with local laws and regulations Bosch Rexroth AG is exempt from liability, and reserves the right to make changes at any time.

IndraWorks I/O Configuration Setup of I/O Start address of OnBoard I/Os

CHAP 3

The hardware based controllers (L40) have integrated inputs and outputs on the motherboard. The onboard inputs can also be used as interrupt inputs. The default start addresses are I0 and Q0. OnBoard Inputs OnBoard Outputs

1. Open I/O Window by double clicking on the address

2. Adapt Input / Output


Start Address

3. Take over Start Address

by clicking onto the Apply button

4. Check Input / Output addresses

IndraWorks I/O Configuration

CHAP 3

Configuration of Rexroth Inline Modules (first InlineModul)

1. Click onto the button Periphery


and select Rexroth Inline

2. Select the InlineModule which has to be

inserted into the project with the left mouse button, and keep the mouse button pressed

3. Drag the selected Inline Modul with the left mouse


button still pressed onto the icon Inline I/O, and release the left mouse button as soon as two little squares are displayed

IndraWorks I/O Configuration

CHAP 3

Configuration of Rexroth Inline Modules (first InlineModul)

4. Enter the I/O Start address 5. Take over the new address by clicking
onto the Apply button

6. Check, if the new address is correct

(Caution ! Obey Word / Byte addressing mode)

IndraWorks I/O Configuration

CHAP 3

Configuration of Rexroth Inline Modules (second InlineModul)

7. Select the InlineModule which has to be

additionally inserted into the project with the left mouse button, and keep the mouse button pressed

8. Drag the selected Inline Modul with the left mouse

button still pressed onto an existing Inline module, and release the left mouse button as soon as a line is displayed below the selected Inline Module

Important note! The order in the configuration window, must match 100% the order of the installed Inline Modules, otherwise a configuration error is displayed after the program has been loaded into the controller

IndraWorks I/O Configuration

CHAP 3

Configuration of Rexroth Inline Modules (second InlineModul)

9. Enter the I/O Start address

10. Take over the new address by clicking


onto the Apply button

11.

Check, if the new address is correct (Caution ! Obey Word / Byte addressing mode)

IndraWorks I/O Configuration

CHAP 3

Import of additional GSDFiles for ProfibusDP I/OConfiguration

1. Click onto the button Periphery


and select ProfibusDP / I_O

2. Check , if the required ProfibusDP


I/OModule is already existing in the selection list

3. Click with the left mouse button onto icon

ProfibusM, press the right mouse button and select Import GSD files

4. Select the GSDFiles you

want to add to the existing list, and take over the selection by clicking onto the Open button

IndraWorks I/O Configuration

CHAP 3

Import of additional GSDFiles for ProfibusDP I/OConfiguration

5. Check, if all imported GSDFiles


are displayed in the list

Directory structure of GSDFiles

Note ! To remove an installed GSDFile from the list in IndraWorks, the file must be manually deleted from the Config Directory

IndraWorks I/O Configuration Configuration of ProfibusDP I/O Modules

CHAP 3

1. Click onto the button Periphery


and select ProfibusDP / I_O

2. Select the ProfibusDP module which has to

be inserted into the project with the left mouse button, and keep the mouse button pressed

3. Drag the selected ProfibusDP module with the

left mouse button still pressed onto the icon Profibus/M, and release the left mouse button as soon as two little squares are displayed

IndraWorks I/O Configuration Configuration of ProfibusDP I/O Modules

CHAP 3

4. To adapt the ProfibusStation Address, open the inserted module by double clicking on it 5. Enter the station address of the ProfibusDP I/OModule,

5. Take over the station address (Bus address)


by clicking onto the Apply button

Note !

The window with the Station address can be called up again by double clicking onto the corresponding basic module

IndraWorks I/O Configuration Configuration of ProfibusDP I/O Modules

CHAP 3

10

6. Drag the selected Type of the I/OModule

with the left mouse button still pressed onto the icon of the previously inserted Basic module, and release the left mouse button as soon as two little squares are displayed

7. To adapt the I/OStart Address, open the inserted module by double clicking on it

8. Enter the I/O Start address 9. Take over the new address by

clicking onto the Apply button

10. Check, if the Module Type is correct

(Caution ! Obey Word / Byte addressing mode) Note ! The I/OAddress input window can be called up again by double clicking onto the Module Type

IndraWorks I/O Configuration Configuration of Function Modules

CHAP 3

11

1. Click onto the button FM 2. Select the desired FunctionModule, which is

to be inserted into the project with the left mouse button and keep the mouse button pressed

3. Drag the selected FunctionModulewith the

left mouse button still pressed onto the icon Inline I/O, and release the left mouse button as soon as two little squares are displayed

4. To adapt the I/OStart Address, open the inserted module by double clicking on it

5. Enter the I/O Start addresses 6 Take over the new address by
clicking onto the Apply button

IndraWorks I/O Configuration Setup of the ProfibusDP transmission rate

CHAP 3

12

1. Open the Bus parameter window by double clicking onto the Icon Profibus / M

2. Adapt the transmission rate

according to the specification of the used I/OModules

Note ! For the first time installation, it is recommended to set the Transmission rate to 1500MBit. As soon as the ProfibusDP runs in an error free state, the Transmission rate can be increased to the maximum value.

IndraWorks I/OConfiguration Load ProfibusDP Configuration into PLCController

CHAP 3

13

1. Callup IndraLogic by double clicking with


the left mouse button onto the icon Logic

2. Click onto the tab Ressources and open the I/OConfiguration window by double clicking
with the left mouse button onto PLC Configuration (<R> = is managed by IndraWorks)

3. Check, if the I/OConfiguration


was taken over from IndraWorks without errors

IndraWorks I/OConfiguration Load ProfibusDP Configuration into PLCController

CHAP 3

14

4. Select Project / Rebuild all and


compile the Indralogic project

5. Check, if the project was


compiled without erros

IndraWorks I/OConfiguration Load ProfibusDP Configuration into PLCController

CHAP 3

15

6. Select Online / Login and load the

IndraLogic project into the PLCController

7. After loading is completed, start the PLC Program using Online / Run

8. Check the function of the I/OModules

and the status of the connected signals j Signalzustand ist 0 (False) J Signalzustand = 1 (True)

IndraLogic Program structure

CHAP 4

Kapitel 2Chapter 5C Chapter 4 IndraLogic Program structure

Nachdruck, Vervielfltigung und bersetzung, auch auszugsweise, nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe gestattet. Wir bernehmen keine Haftung fr die bereinstimmung des Inhalts mit den jeweils geltenden gesetzlichen Vorschriften. Reproduction, copying, or translation of this publication, wholly or in part, only with our previous written permission and with source credit. We assume no responsibility for agreement of the contents with local laws and regulations Bosch Rexroth AG is exempt from liability, and reserves the right to make changes at any time.

IndraLogic Basic Setup

CHAP 4

Setting the basic parameters for Indralogic Load & Save

1. Click onto Project / Options, to setup the basic parameters

2. Click onto Load & Save, to define the system properties and the memory handling

Create Backup With every Save a backup file with the extension .bak is generated This *.bak file is kept after closing the project. and can be restored when required Auto Save While you are working, the project is saved according to a defined time interval to a temporary file with the extension .asd., which is erased at a normal exit from the program If for any reason IndraLogic is not shut down normally, then the file will not be erased If the project is opened again, you are promted, if you want to open the original file or the auto save file Ask for project info When saving a new project or saving a project under a new name, the project info is automatically called You can visualize the project info with the command Project / Project info and alter it Auto Load At the next start of IndraLogic the last open project is automatically loaded This can also be achieved by entering entering the project in the command line Save before compile The project will be saved before each compilation inta a file with the extension .asd, which behaves like described under option Auto Save Remind of boot project on exit If the project has been modified and downloaded without creating a new Boot project since the last download, a dialog will remind the user before leaving the project, and the Boot project can be newly generated

IndraLogic Basic Setup Setting the basic parameters for Indralogic Editor

CHAP 4

Number of space per Tab (e.g. 2)

Select a fixed font type (e.g. Courier)

Autodeclaration If this option is activted , then after the input of a notyetdeclared variable, the Variable declaration window is called up automatically Autoformat If this option is activated, an automatic formatting is carried out when a line completed the following formatting is carried out Operators and Keywords written in small letters are converted into capitals Tabs are inserted automatically to achive uniformly divided columns List components If this option is activated, Intellisense will be activated with the following functions: if you insert a dot at a position where a identifier should be inserted, then a selection list will opened, offering all global variables which are found in the project If you insert the name of a function block instance, followed by a dot, a selection list of all Declarations as tables Variables are displayed in a table instead of using the usual declaration editor. This table is sorted like a card box, where you find tabs for input variables, output variables local variables and in_out variables. Mark the representation of theactual mark in the graphical Editors can be selected as: dotted rectangle a rectangle with solid lines as a filled rectangle Bit values the representation of the binary datatypes (BYTE, WORD, DWORD) in Monotor can be set to Decimal, Hexadecimal order Binary Surpress monitoring of complex types (array, pointer, VAR_IN_OUT) if this option is activated, complex data typs like Arrays, Pointers, VAR_IN_OUTs are not displayed in the Monitor window, when Online Mode is selected Show POU symbols if this option is activated, icons will be displayed inside of the POUBoxes, if they are stored as bitmaps in the Library directory (POUName TON = Symbol name TON.bmp)

IndraLogic Basic Setup Setting the basic parameters for Indralogic Desktop

CHAP 4

language selection for the User Interface, program code is not changed (Code is always in English)
Note !

Language selection is only possible under Windows NT, Windows 2000 und Windows XP mglich Toolbar a toolbar with buttons for faster selection of menu commands is dispalyed below the menu bar Status bar a status bar at the lower edge of the main windowis displayed Online in Security mode: In Online mode with the commands Run, Stop, Reset Toggle Breakpoint, Single cycle, Write values, Force values and Release force, a dialog box appears with the confirmation request whether the command should really be executed This option is saved with the project Query communication parameters before login as soon as the command Online Login is executed, a communication parameter dialog will be displayed To go into online mode, this dialog must be confirmed by clicking onto the OK button Do not save communication parameters in project The settings of the communication parameters dialog (Online Communication Parameters) Printer borders In every editor window, the limits of the currently set print range are marked with red dashed lines Their size depends on the following: paper size orientation F4 ignores warnings After compilation, when F4 is pressed in a message window, the focus jumps only to lines with error messages, warning messages are ignored MDIrepresentation with active MDIOption multiple windows can be opened with deactivated MDIOption only one window can be opened in Full Screen Mode

IndraLogic Basic Setup

CHAP 4

Setting the basic parameters for Indralogic Directories

Directory selection
in the Project and General sections of this window the default directories can be entered these directories are used to search for Libraries or Control configuration files or to save the compiled program file and the Source upload files Compiled files are of the type .map and .list, the Symbol files however are stored directly into the project directory for the Library and Configuration files several directories can be entered, separated by a semicolon ; Note ! Do not use empty spaces and special characters except for _ in the directory names. Validity of inputs Entries made in the Project section are stored into the Project file Entries made in the Generall section are stored into the .ini file of Indralogic and they are valid for all projects In the section Target the default names of the directories for Libraries and Configuration files are taken from the Target system settings (e.g from the Target configuration file) These fields are blocked for editing, entries however can be selected and copied Note ! The search order is defined as follows first the directories entered in the Project sections are searched next search path is taken from the Target section finally the directories entered n the General section are searched Important note ! If two files with the same name are found, the one in the directory that is searched first will be used

IndraLogic Basic Setup Setting the basic parameters for Indralogic Build

CHAP 4

Note! If the Number of Data segments is not sufficent enough for the current project, the compiler will output an error message

Debugging Additional to the program code, debugging code is created, resulting in a considerably larger file The debugging code is needed in order to make use of the debugging functions offered by IndraLogic (e.g. breakpoints) When this option is switched off, project processing becomes faster and the size of the code decreases. The option is stored with the project. Replace constatnts The value of each constant is loaded directly, in Online mode the constants are displayed in green Forcing, writing and monitoring of a constant is then no longer possible If the option is deactivated, the value is loaded into a storage location via variable access (this does in fact allow writing the variable value, but implies longer processing time). Nested comments Comments can be placed within other comments Example:

(* a:=inst.out; (* to be checked *) b:=b+1; *)

the comment that begins with the first bracket is not closed by the bracket following checked, but only by the last bracket Create binary file of the application A binary image of the generated code (boot project) is created in the project directory during compilation (File name: Project_name.bin) Number of data Enter here how many storage segments are to be reserved for your project data in the controller. (This space is required so that an Online Change can still be carried out when new variables are added) Note ! All entries in the Build Options dialog are stored into the project file

IndraLogic Basic Setup

CHAP 4

Setting the basic parameters for Indralogic Source download

Note ! Source download requires time, when loading a program. If source is not required in PLC dont download it, to speed up load process.

The option Sourcecode only exclusively affects the Indralogic file (file extension .pro) The option All files also includes files such as the associated library files, visualization bitmaps, configuration files, etc. The option Implicit at load allows the selected file range to be automatically loaded into the controller system on the command Online / Login. The option Notice at load offers a dialog, when the command Online / Login is selected, with the question Do you want to write the source code into the controller system? Pressing Yes will automatically load the selected range of files into the controller system, or you can alternatively click onto No, and the source code is not loaded into the controller. The option Implicit an create boot project allows the selcted file range to be automatically loaded into the controller system on the command Online / Create boot project The option On demand loads the source code only, if Online / Sourcecode download is selected in the Online menu

Download Source code from the controller

IndraLogic Basic Setup IndraLogic Symbol configuration

CHAP 4

Function The settings made here, are used to configure the handling of the Symbol file Projectname.sym or as a BinaryFile of the name Projectname.sdb. The Symbol file is required for the data exchange with the controller, and is used by the OPC or GateWay DDE Server. Settings If the option Dump symbol entries is activated, all project variables will be stored automatically into the Symbol file during the compiler run (Projectname.SYM) If the option Dump XML Symbol table is activated, all project variables will be additionally stored into a XMLVersion of the Symbol file (Projectname.SYM_XML) both files will be stored into the project directory Configuration of the Symbol file entries with the button Configure symbol file If the option Symbol configuration from INIFile is activated in the Target settings, the symbol file entries will be generated using the IndraLogic.ini file or from another *.INI file which is defined in the Indralogic.ini file (in this case, the object attributes cannot be edited) If option Symbol configuration from INIFile is not activated in the Target settings, the symbol file entries will be generated according to the selection made with Configure symbol file

IndraLogic Basic Setup IndraLogic Symbol configuration

CHAP 4

Select all objects from which the variables have to be stored into the Symbol file

The following options are available: Export varibales of objects All variables of the selected objects are taken over into the Symbol file Export data entries for structures and arrays of an object entries for the access to the main variable are generated Export structure components each structure variable is generated as an individual entry in Symbol file Export array entries each element is genertated as an individual entry in the Symbol file Write access all variables in the Symbol file are enabled for Write access

IndraLogic Basic Setup Target System Basic setup General

CHAP 4

Depending on the selected Target System, certain functions can be set / reset by IndraLogic using Resources / Target System / General

Note ! Adaptions of the functions is only possible, if the Target System is checked out from the ENIDatabase

IndraLogic Basic Setup Target System Basic setup General


I/OConfiguration / No address check An I/OAddress can be defined only once. n The same I/O address can be defined in several tasks.

CHAP 4

10

Support preemptive multitasking n A Task with a low priority can be interrupted immediately by a task with a higher priority. The Task with low priority is continued after the high priority task has been completed. Byte addressing mode Each variable allocates memory according to its size. The addressing of the Variables is done according to their size (B, W, D) n The addressing of the Variables is done generally Byte by Byte. Online Change Loading of changes requires a STOP of the controller. n Changes are loaded without of a STOP of the controller. Update unused I/Os Variables not used in theprogram are not updated in the I/O Update Cycle n all Variables no matter if they are used in the program or not, are updated in the I/O Update Cycle Download symbol file Symbol files are used as address references for external OPCClients or for the Communication requests of VCP or VPP Panels. They are generated, if the checkbox in Project / Options / Symbol configuration is checked. The Symbol file is not loaded into the L40 n The Symbol file is loaded into the L40 Symbol config from INI file The Symbol configuration is defined in Project / Options under the function Configure symbol file . n The Symbol configuration is read out of the INDRALOGIC.INI file. The button Configure symbol file is not available with this selection. PLC Browser The PLC Browser is a tool, which can communicate with the L40 via command line commands The PLC Browser is not available in the Resources. n The PLC Browser is available in the Resources. Trace The Trace function makes available a 8channel Oscilloscope for digital and analogue values, which can be used to monitor Global Variables. Trace is not available in the Resources. n Trace is available in the Resources. Load boot project automatically The boot project must be updated manually with the command Online / Create boot project in the L40. n The Boot project is updated with each LogIn (Load / Online Change) in the L40 FlashMemory Retain forcing The active forcings remain active, after a new program is loaded

IndraLogic Project Structures

CHAP 4

11

Project structure

Project

Programs / Modules

Global Variables

Data Types

Declarations

Code

Main program PLC_PRG Update of input status Processing of forcing list inputs Processinh of the IndraLogic Application Callup of additional Programs, Functions and Function Blocks Processing of forcing list outputs Update of output status The module PLC_PRG has a special status among all other modules. PLC_PRG is the only module, which is directly called by the runtime system

Functions of the Indralogic Runtime system IndraLogic Application ( user specific program)

IndraLogic Project Structures

CHAP 4

12

IndraLogic directory structure on harddrive (Development system) Um


Development system Directory structure is generated during the installation process

IndraLogic Project Structures

CHAP 4

13

IndraLogic directory structure on harddrive (Project data)


Example :
Um

IndraLogic Project Structures

CHAP 4

14

Files in the Indralogic programming system


The following table shows the predefined file extensions and their assignment to the used files: File extension <Project name>.pro *.lib, *.obj, *.hex *.ci *.ri IndraLogic.ini *.trg *.txt *.tnf *.cfg, *.gsd *.eds, *.dib, *.ico *.sdb, *.sym *.log *.bmp Retain.BIN Persist.DAT MPS.BIN Ethernet.BIN Config.DAT Bootrom.SYS Default.STS Default.PRG Default.CHK Source.DAT corresponding files the IndraLogic project file libraries and if available the corresponding object and hexfiles compiler information download/reference information INI file target files in binary format for all installed targets target files for the installed targets in text format, if available target files in text format (only for installation reference to *.trg) files used for PLC configuration (configuration files, device files, icons etc.) symbolic informations generated from the project project log file bitmaps for project POUs and visualization Pointer to the adresses of remanent RETAIN variables, in NvRAM remanent PERSIST variables on the FLASH card Master Parameter Set for the ProfibusDP configuration Contains the IP address, Subnet Mask and Gateway address Stored data of the control configuration Boot sector for VxWorks operating system Status of the control after a restart Boot project Program code Boot project Checksum Compressed source code stored on the FLASH card

IndraLogic Project Structures

CHAP 4

15

Display structure IndraLogic

Declaration window for variables

Program window

Message and Error display

Modules

Data Types

Visualization

Resources

IndraLogic Project Structures

CHAP 4

16

Generation of a new Folder

1. Select level under which the new structure is to be generated e.g. POUs

2. Press right mouse button and select New Folder

3. Select New Folder object, press right mouse button and select Rename Object

IndraLogic Project Structures

CHAP 4

17

Generation of a new Object


1. Select the Level and the Folder under which the New Object is to be inserted

2. Press the right mouse button and select Add Object

3. Select Type of POU, Language of POU and enter the Name of the new POU

IndraLogic Program Structures

CHAP 4

18

Elements of Program Organization Units (POU)

Configuration

Ressource

Task

Data types & variables

Program Organization Units (POU) Program (PRG) Function Block (FB) Function (FUN)

The modules which a project is made of are called Program Organization Units by the IEC61131 standard POUs are the same as the Program, Organization, Sequence and Function modules used in the PLCProgramming world To reduce the large variety, very specific meanings of module types and to simlify the programming of them, is the most important goal of the standardization

IndraLogic Program Structures

CHAP 4

19

Elements of Program Organization Units (POU)

Organization module

OM

PM
Program module

SM
Sequence module

(PRG) (FB)

DM
Data module

FM
Function module

(FUN)

Programming languages for POUs


POU Type Program Functionblock Function Keyword Program Function_Block Function Description Main program with allocation of PLCI/O devices, Global Variables and Access Paths Module with Input and Output Variables Is the mainly used POUType for programming Module with Return Value to extend the instruction set of a PLC

LDR LIST FUP ST SFC

IndraLogic Program Structures

CHAP 4

20

Elements of a Program Organization Unit (POU)


The following three POUTypes differ by the the properties of their usage: Function (FUN) Parameterized POU without static variables (without memorized values), which returns always the same result with the same input parameters as a function result value. Function block (FB) Parameterized POU with static variables (with memorized values) A Function Block (e.g. Timer or Counter module) with the same input parameters returns results, which depend on the status of the internal (VAR) and external (VAR_EXTERNAL) variables, which remain unchanged between FBCalls. Program (PRG) This POUType represents the Main Program All variables of the complete program, to which physical address have been assigned (e.g. Inputs and Outputs of the PLC) must be declared inside of this POU or above (Ressources, Configuration) remaining properties like FB Usage of parameters Programs (PRG) and Function Block (FB) can be programmed together with parameters, which can be passed together with the call of the module Functions have Input parameters and one Function Return Value Such properties have been previously only available with Function Blocks This makes an IEC 611313 FUNCTION_BLOCK with Inputs and Output parameters equivalent to the previously used Function Modules in PLCs As a result of the extended or restricted properties of the POUTypes PROGRAM and FUNCTION, there are no eqivalent counterparts in modules according to DIN 19239 General Specifications A POU is a self contained unit, which can be compiled independently from other program parts by the compiler However the compiler requires information about the calling interface of the POUs, which are called inside of the module (Prototypes) To build the complete program, compiled POUs can be linked together later on The name of a POU is known inside of the complete project and must not be allocated several times at different locations Local Subroutines, which are possible with other high level languages, are not known by the IEC 611313 standard This makes the name of a POU and its calling interface globally available to all other POUs in a project, as soon as the POU has been declared This autonomy of the POUs, makes not only possible an extensive modularization of an application, but also the reusability of already implemented and tested programs

IndraLogic Program Structures

CHAP 4

21

Elements of Program Organization Units (POU)


A POU consist of the following parts: Definitionof the POU Type with POU Name (and Data type with Functions) Declaration sectin with the variable declarations POUBody with the program code Program Prog name Function_Block FB name Function FUN name

Interface variables Local variables Program code (POU Body) Declaration section Code section

Declaration section Declarations are are used to define all variables of a POU A difference is made between the Local (internal) variables of a POU and the Interface (In /Out) variables, which can be seen by the outside program Program code section (POU Body) In the Program section of a POU the binary logic and/ or the data processing is to be programmed using one of the following progrmming languages Instruction list (IL) Ladder Diagram (LD) Functions Plan (FBD) Structured Text (ST)
Function_Block FB name Function_Block Continue

Interface variables Local variables Program code (POU Body)

VAR_INPUT VAR_OUTPUT VAR LD ... LD ST ... ST VarIN

VarIN : VarOUT1 : VarOUT2 : VarLocal :

BOOL; END_VAR BYTE ; BOOL ; END_VAR BYTE ; END_VAR

VarLocal VarOUT1 VarOUT2

IndraLogic Program Structures

CHAP 4

22

Deklaration section of Program Organisation Units (POU)


Usage of Variable types inside of the 3 POU Types Variable type PROGRAM VAR VAR_INPUT VAR_OUTPUT VAR_IN_OUT VAR_EXTERNAL VAR_GLOBAL VAR_ACCESS yes yes yes yes yes yes yes permitted inside of FUNCTION_BLOCK yes yes yes yes yes no no FUNCTION yes yes no no no no no

as shown in the table above, all variable types can be used together with a Program Function blocks cannot provide global variables to other POUs, this is only permitted in Programs, Ressources and Configurations Function blocks can acces such global variables only by using the variable type VAR_External Functions are the most restrictive POUs, because they can only use VAR and VAR_INPUT variable types Functions return their Result via the Function Value Except for the Local variable type VAR, all other variable types can be used to exchange information between different POUs

IndraLogic Program Structures

CHAP 4

23

Characteristics of the POUInterface


By allocating the POEVariables to Variable types inside of the declaration block, the interface of the POU and its Local data range is determined. The POUInterface is arranged as follows: Calling interface: Formal parameters (Input and Input / Output parameters) Return values: Output parameter or Funktion value Globale interface with globale / external variables and access paths Calling interface and Return values / Function values of a POU can also entered in a graphical format using LDR or FUP The Variables of the Calling interface are also refered to as Formal parameters At the time when a POU is called the Formal parameters are assigned to Actual parameters this means they are assigned to actual variables, values, signals or constants
Variable type Calling interface (Formal parameters) Return value Global interface VAR_INPUT VAR_OUTPUT VAR_OUTPUT VAR_GLOBAL VAR_EXTERNAL VAR_ACCESS VAR Description Input / Output parameters displayable in graphical representation Output parameters displayable in graphical representation Global data

Local data

Internal POU data

IndraLogic Program Structures

CHAP 4

24

Formal parameters and Return values of a POU


The two calling interfaces respectively the Return values differ in the access methode respectively the access right Formal parameter (VAR_INPUT) The actual parameters are passed on to the POU as values i.e. not the variable itself is passed to the POU but a copy of it this assures that the value passed via the input variable cannot be altered inside of the called POU This concept is also known as call by value Formal parameter (VAR_IN_OUT) The actual parameters are passed on to the POU as a pointer to its memory location, i.e. the variable itself is passed on to the POU and can be read and altered inside of the called POU Alterations of the value affect directly the value of passed variable outside of the POU This concept is also know as call by reference This type of variable offers Pointers, like in high level languages (e.g. C), in a high level language they are used as Return values from subroutines, by returning the memory address of the corresponding parameter Return value (VAR_OUTPUT) Return values are not passed to the calling POU, but they are available as values in the calling POU They are not part of the calling interface They are graphically represented together with VAR_INPUT and VAR_IN_OUT but their values are further processed as read only in text base languages like LIST and ST the returned value is passed back to the calling POU using the return by value concept, i.e the value is available for the calling instance (FB or PRG) this protects the output parameters from being altered by the calling POU Together with the POEType PROGRAM, the output parameters are passed on to the actual parameter and can be used for further processing in the calling module If arrays or user defined data structures are passed as variables, the usage of VAR_IN_OUT can result in very efficent programs, reason is, that the variables must not be copied at runtime like VAR_INPUT or VAR_OUTPUT, only their pointers have to be passed but this has also the disadvantage, that the variables are not protected from unwanted manipulations from the caling POU

IndraLogic Program Structures

CHAP 4

25

External and internal access to POEVariables


one characteristic of Formal parameters and Return values is their visibility outside (external) of the POU in which they are used the calling POU can (but must not) use their names explicit to set input variables this results in a better documentation of the calling POU and paremeters can be exchanged or ommited Input and output variables possess in this context an additional protection against unwanted Read or Write operations Variable type VAR Local variable VAR_INPUT Input variale VAR_OUTPUT Output variable VAR_IN_OUT Input and Output variable VAR_EXTERNAL External variable Access rights external internal W RW R A local variable is only vissble inside of a POU and can only be altered inside of this POU An input variable is visible in the calling POU and can be altered there. Inside of the called POU, the variable is read only An output variable is visible in the calling POU and can only be read there. Inside of the called POU, the variable has read / write access rights An input / output variable has the combined capabilities of VAR_INPUT and VAR_OUTPUT. The variable has read / write access rights inside and outside of the called POU An external variable was declared as a global variable in another POU. This variable is available to all other POUs with read / write access rights. Every change inside of a POU is also available to the outside. A global variable is declared inside of a POU. This variable is available to all other POUs with read / write access rights. Every change inside of a POU is also available to the outside. A global variable of configurations, used as a communication channel between components (Ressources) of configurations. This variable can be used like a global variable inside of a POU Description

RW

RW

RW

RW

RW

VAR_GLOBAL Global variable

RW

RW

VAR_ACCESS Access path

RW

RW

W = Write access RL = Read access RW = Read / Write access

Load / Unload

CHAP 5

Chapter 5 Program Load / Unload

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Load PLCProgram

CHAP 5

Load options and Memory structure

PC with Indralogic Indralogic Project file Login

PLC Memory newly loaded program

Online generation of Boot project

*.PRO

actual running program

Load / Unload source code

FLASH Memory Boot project Name : Default.prg

Source code compressed Original Project Name: Source.DAT

Reload program after shutdown

Load PLCProgram

CHAP 5

Used / Generated files

PC with Indralogic Login Name.PRO

PLC Memory PLC Program

Name.SYM Name.SDB
Load source code

FLASH Memory Default.STS Retain.BIN Persist.DAT Boot project Default.PRG Default.CHK

Name0000000br.CI Name0000000br.RI

Source code Compile Source.DAT

Untiteled.PRO

Unload source code

Source.DAT

Programm neu laden nach Neustart

Online generate Boot project

Compile

Load PLCProgram

CHAP 5

Check and compile complete PLCProgram 1. Select Project / Rebuild all in the menubar, to check/compile PLCProgram

2. Check if compiler result is error free


Note ! If errors are displayed at the end of the compiler run, press F4 to jump directly to the incorrect program statement. If you have lots of errors, check, if you have included all required libraries.

Load PLCProgram

CHAP 5

Check interface setting to PLC (IPAddress) 1. Select Online / Communication Parameters in the menubar, to check/set
the IPAddress of the CPS21Panel and the internal IPAddress for the Software PLC

VPP / BTV Panels Software PLC

L20 / L40 / VEP30 Hardware PLC

2. Confirm settings, by clicking onto the OK button

Load PLCProgram

CHAP 5

Load PLCProgram into the PLC 1. Select Online / Login in the menubar, to load the error free compiled
PLCProgram into the PLC

2. Confirm Loading by clicking


onto the Yes button

3. Start the PLCProgram

Load PLCProgram

CHAP 5

Generate Boot Project in PLCController 1. Select Online / Create Boot project in the menubar, to generate a Boot project
in the PLCController

2. Check if you are Online

(Logout is displayed,if you are logged in and online)

Export / Import

CHAP 6

Chapter 6 Export / Import of Project data

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Export / Import Export of Project data

CHAP 6

Note ! IndraLogic handles the data entered in a project, in individual sections, inside of the development enviroment. If individual program sections have to be taken over into another project, it would be to difficult to export the data with Copy and Paste. However if the function Export is used, not only the data is copied, but also the structures and the variables. The Export file generated, is a plain ASCII File, which includes all selected programs, structures and variables in ASCII Format.

1. Select Project / Export in the menubar

2. Press the CTRL key and keep it

pressed, then select all directories, individual programs, Variables and data structures in the displayed window, which you want to export

Export / Import Export of Project data 3. Select the Target directory in the displayed Explorer window,
into which the Export file is to be stored

CHAP 6

4. Enter the name of the Export file and take

over the data, by clicking onto the Save button

6. Close the current project via File / Close, before you open the new project
into which you want to Import the exported data

Export / Import Import of exported project data

CHAP 6

Note ! In order to insert the previously exported project data from an Export file into another project, the function Import must be used . Caution ! With the Import function not only the program data, but also the directory structures, variables and data types are inserted into the current project (i.e. existing structures, variables and data types in the current project can be overwritten by the imported data).

1. Select Project / Import in the menubar

2. Select the directory from which you want to import

the Export file, in the displayed Explorer window

3. Select the Export file, which is to be imported into


Yes existing Structure

the current project, by clicking onto the Open button

is overwritten

No existing Structure remains unchanged, a new structure with the extension _1 is created

4. If structures, variables or programs of the same name are present in the current project,
a warning message is displayed. In the displayed window the further processing of the import can be selected (i.e. a selection can be made, if the existing data is to be overwritten or if the imported data is to be discarded)

Export / Import Import of exported project data

CHAP 6

5. Check the current project for existing errors, by carrying out a new Compiler run (Project / Rebuild all)

Programming

CHAP 7

Chapter 7 Programming with Indralogic

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

I/O Definition Address definition of Inputs, Outputs and Markers Structure of address definition % Percentage sign I Input Q Output X without B W D

CHAP 7

M Marker Single Bit Single Bit Byte Word Double Word 2.7 Bit Address 13 Byte Address 18 Word Address 20 Double Word Address

Addressing examples: %QX2.7 %IB13 %IW18 %MD20 Addressing example with Symbolic names: Valve_1 LedBar ST1_Value Temp1 AT %QX2.7 AT %IB13 AT %IW18 AT %MD20 : BOOL : BYTE : WORD : DWORD

Important note ! The address format in Indralogic is set to ByteAddressing mode by default. This means, the ProfibusDP I/O addresses and the addresses used inside of Indralogic are identical If Word addressing mode is selected, the ProfibusDP I/O addresses must be divided by 2, in order to get the correct IndraLogic Word address. Examples Byte addressing mode: IndraLogic Profibus
%QX2.7 %IX7.4 %IX7.7 Q2.7 I7.4 I7.7

Examples Word addressing mode: IndraLogic Profibus


%QX2.7 %IX3.12 %IX3.15 Q4.7 I7.4 I7.7

I/O Definition Definition of Input, Outputs and Markers

CHAP 7

Using bit signals in the program

I/O Definition Monitoring of BitSignals

CHAP 7

Important note ! The status of a signal in the display below, is only updated and displayed, if the signal is used somewhere else in the program (Program must be called and processed)

Standard Data Types Standard Data Types in Indralogic


The IEC 611313 standard defines five groups of basic data types Bit sequence (ANY_BIT), Integer with / without sign (ANY_INT), Floating point (ANY_REAL), Date, and Time (ANY_DATE), String, Duration, Abgeleitete (ANY).

CHAP 7

In the following table the properties of the five data type groups are described: Name (Keyword) Description (Short description) Number of Bits (Data width) value range (with related IECLiteral) Defaullt values initial The data width and the value range given below, is depending on the target system and the implementation of the software Data type BOOL WORD DWORD SINT INT DINT USINT UINT UDINT REAL LREAL Data type DATE TOD DT TIME STRING Description Bits boolean 8 Bit sequence 16 16 Bit sequence 32 32 short integer 8 integer 16 Double integer 32 Unsigned short integer 8 Unsigned integer 16 Unsigned Double int 32 Float 32 long float 64 Description Date Time of day Date & Time Duration Sequence of characters. Range 0,...,255 0,...,65535 0,...,4294967295 128,...,+127 32768,...,+32767 2147483648,...,2147483647 0,...,+255 0,...,+65535 0 ,..., + 4294967295 Default 0 0 0 0 0 0 0 0 0 0.0 0.0

Default d#00010101 (treated like a DWord) tod#00:00:00 (treated like a DWord) dt#0001010100:00:00 (treated like a DWord) t#0s (treated like a DWord) (max. 255 char., Default without definition 80)

Instead of the keyword TOD it also possible to use the keyword TIME_OF_DAY Instead of keyword DT it also possible to use the keyword DATE_AND_TIME Default value for a string is an empty character sequence.

Variable declaration Validity of Variables

CHAP 7

Global Variables
Program (PRG) Local Variables
VAR . END_VAR

VAR_GLOBAL . END_VAR

Program (PRG) Local Variables


VAR . END_VAR

Program Program

Program (FUN & FB)


VAR_INPUT . END_VAR VAR_OUTPUT . END_VAR Var_IN_OUT . END_VAR

Local Variables

VAR . END_VAR

Interface Variables

Program

Program

Variable declaration Declaration of Variables

CHAP 7

Variable declaration Declaration of Constants

CHAP 7

Variable declaration Global Variables in POUs via VAR_EXTERNAL

CHAP 7

Variable declaration Online Status display of variables in declaration window

CHAP 7

Variable declaration Resizing the Online Window

CHAP 7

10

Variable declaration Selection of display format in Online mode

CHAP 7

11

Programming in LIST

CHAP 8

Chapter 8 Programming in LIST

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Programming in LIST Creation of a program in LIST

CHAP 8

1.Click with the left mouse button onto the

Level and the Folder under which the New Object is to be inserted 2. Press the right mouse button and select Add Object

3. Select Type of POU, Language of POU and enter the Name of the new POU

Input : AND( After input : AND ( S0

S0

Programming in LIST Calling of POUs with and without parameters in LIST

CHAP 8

Programming in LIST Programming of logic operations in LIST (Example 1)

CHAP 8

Logic operations in List are programmed using the statements AND, ANDNOT, OR
and so on the first statement of a rung must be always LD If brackets have to be used, the rules of the Boolean Algebra cannot be applied 100% Note ! Only round brackets ( and ) are valid

Bracket rules: The result of an operation is always set with the close bracket ) statement The result produced at this point, is used as a logical AND with the next contact or the next block of brackets

Rule If more than one contact is connected in parallel to an other contact, this ORBranch must be set into brackets If only one contact is connected in parallel, the rule AND before OR applies and no bracket is required

Programming in LIST Programming of logic operations in LIST (Example 2)

CHAP 8

Rule If more than one contact is connected in parallel to an other contact, this ORBranch must be set into brackets If only one contact is connected in parallel, the rule AND before OR applies and no bracket is required

Programming in LIST Programming of logic operations in LIST (Example 3)

CHAP 8

Rule If a contact is in front of another contact block, the complete contact block has to be set into brackets Inside of the contact block which is set into brackets the following rules apply: If more than one contact is connected in parallel to another contact, this ORBranch must be set into brackets If only one contact is connected in parallel, the rule AND before OR applies and no bracket is required

Programming in LIST Programming of logic operations in LIST (Example 4)

CHAP 8

Rule If a contact is in front of another contact block, the complete contact block has to be set into brackets Inside of the contact block which is set into brackets the following rules apply: If more than one contact is connected in parallel to another contact, this ORBranch must be set into brackets If only one contact is connected in parallel, the rule AND before OR applies and no bracket is required

Programming in LIST Programming of logic operations in LIST (Example 5)

CHAP 8

Rule If a contact is in front of another contact block, the complete contact block has to be set into brackets Inside of the contact block which is set into brackets the following rules apply: If more than one contact is connected in parallel to another contact, this ORBranch must be set into brackets If only one contact is connected in parallel, the rule AND before OR applies and no bracket is required

Programming in LIST Monitor display in LIST (PRGs)

CHAP 8

Programming in LIST Creation of a Function in LIST

CHAP 8

1.Click with the left mouse button onto the

Level and the Folder under which the New Object is to be inserted

2. Press the right mouse button and select Add Object

3. Select Type of POU, Language of POU and enter the Name of the new POU

Programming in LIST Definition and Usage of a Function (FUN)


Program inside of a Function

CHAP 8

10

Calling a Function in the program

Programming in LIST Online Status display of Functions


Status display in the calling program

CHAP 8

11

Status display inside of the Function

Programming in LIST Creation of a Function block in LIST

CHAP 8

12

1.Click with the left mouse button onto the

Level and the Folder under which the New Object is to be inserted

2. Press the right mouse button and select Add Object 3. Select Type of POU, Language of POU and enter the Name of the new POU

Programming in LIST Definition and Usage of a Function block (FB)


Program inside of a Function block

CHAP 8

13

Signals used together with the call of the Function Block

Programming in LIST Definition and Usage of a Function block (FB)


Call of a Function Block in a program

CHAP 8

14

Manual_Move(FB) Robot_1_Right 1.Instance Var_Input Robot_1_Left Work_limit : Inputs: 2.Instance


Manual_mode : E_Stop : Jog_Work : Jog_Base : End_Var Var_Output Movement End_Var _Right _Manual _ESTOP _Key_Work _Key_Base Outputs: _Y1_Right Inputs: _Left _Manual _ESTOP _Key_Base _Key_Work Outputs: _Y1_Left

Memory 1.Instance
Inputs: _Right _Manual _ESTOP _Key_Work _Key_Base Outputs: _Y1_Right

Memory 2.Instance
Inputs: _Left _Manual _ESTOP _Key_Base _Key_Work Outputs: _Y1_Left

Programming in LIST Online Status display of Function blocks


Monitoring in the Global variable definition window

CHAP 8

15

Monitoring of the function block in the calling module

Programming in LIST Online Status display of Function blocks


Monitoring inside of the Function Block

CHAP 8

16

2. Select instance by double clicking on it 1. Double click onto the function block in the left window

3. Signal status inside of the selected instance is displayed

Programming in LDR

CHAP 9

Chapter 9 Programming in LDR

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Programming in Ladder Creation of a program in LDR

CHAP 9

1.Click with the left mouse button onto the

Level and the Folder under which the New Object is to be inserted

2. Press the right mouse button and select Add Object 3. Select Type of POU, Language of POU and enter the Name of the new POU

Programming in Ladder Input of a program in LDR

CHAP 9

1. Empty program branch, with selection


mark at the end of the branchs

2. Click onto the AND button

3. Enter the symbolic name of the signal

4. Click with the left mouse button onto an existing contact, in


order to mark the start position for the next input

5. Click onto the parallel contact button (OR)

6. Enter the symbolic name of the signal 7. Click with the left mouse button onto the
basic line, in order to insert a new AND contact or an Output element

Programming in Ladder Alteration of program in LDR


Addition of a new OR Element

CHAP 9

1. Press the Shift key and keep it pressed, then select all

contacts to which you want to connect the new OR element in parallel, by clicking with the left mouse button on them

2. Click onto the OR button 3. Enter the symbolic name of the signal

Addition of a new AND element

1. Click with the left mouse button onto the element, where
you want to insert the new AND element in front of it

2. Click onto the AND element button

3. Enter the symbolic name of the signal

Programming in Ladder Adding a new LDRNetwork branch

CHAP 9

1. Press the right mouse button and select Network (after) or Network ( before)

2. Enter the logic for the new network in LDR

Programming in Ladder Addition of Function blocks in LDR 1. Click onto the position where you want to
insert the Function block and position the mouse pointer at this position

CHAP 9

2. Press the right mouse button, to call up the


menu, then select Function block

3. Select the desired Function block and

confirm by clicking onto the OK button

4. Enter the parameters of the Function block and


if required declare a new instance for the FB

Programming in Ladder Addition of FBDOperators in LDR

CHAP 9

1. Click onto the position where you want to add a FBDOperator

2. Press the right mouse button


and select Box with EN

3. Click with the left mouse button onto

AND and than press function key F2

Programming in Ladder Addition of FBDOperators in LDR

CHAP 9

F2

4. Click onto FBDOperators in the left window and select


the FBDOperation that you want to insert (e.g. MUL)

5. Enter the Variables / Signals, which you


want to use with the FBDOperator

Programming in Ladder Call of Programs (PRGs) in LDR


1. Click onto the base line of the network into
which you want to add a program call

CHAP 9

2. Press the right mouse button


and select Box with EN

3. Click with the left mouse button onto

AND and than press function key F2

Programming in Ladder Call of Programs (PRGs) in LDR

CHAP 9

F2

4. Click onto Standard Programs or User defined Programs


in the left window, and than select with the left mouse button, the Program that you want to insert

5. Click with the left mouse button directly onto the base line in front of ???,

and than press the Delete key to delete the output assignment and ???

Note !

Only if the output assignment is deleted an error free compiler run is possible

Programming in Ladder Call of Functions (FUNs) in LDR

CHAP 9

10

F2

4. Click onto Standard Functions or User defined Functions


in the left window, and than select with the left mouse button, the Function that you want to insert

5. Enter the Variables / Signals, which you


want to use with the Function

Programming in Ladder Call of Function Blocks (FBs) in LDR

CHAP 9

11

F2

4. Click onto Standard Function Blocks or User defined

Function Blocks in the left window, and than select with the left mouse button, the Function Block that you want to insert

5. Enter the Variables / Signals, which you


want to use with the Function Block

Programming in Ladder Conditional calls of PRGs, FUNs and FBs in LDR

CHAP 9

12

Note ! If Programs, Functions and Function Block have to be called conditionally, the function Box with EN has to be used in Ladder diagram 1. Click with the left mouse button onto the base line in front of the Program,
Function or Function Block, which has to called conditionally

2. Click onto the AND contact in the toolbar

3. Enter additional logic to be used with the conditional call

Programming in Ladder Online display of POUs written in LDR

CHAP 9

13

Logic result is TRUE

Logic result is FALSE

Programming in Ladder Additional display options in LDR


1. Select Extras / Options in the menubar

CHAP 9

14

Default setting

2. Activate the desired additional options in the displayed selection window

Programming in Ladder Comment input in LDR

CHAP 9

15

1. Press the right mouse button and select Comment

2. Enter the first line of the comment (to make a new line, press the Enter key)

Programming in Ladder Jump instruction in LDR

CHAP 9

16

1. Press the right mouse button and select Jump

2. Alter the default label from Label to a desired label (e.g. End)

3. Enter the jump destination label according to the nemae used together with the Jump statement (e.g. End:)

Caution ! This is a comment line

Programming in FBD

CHAP 10

Chapter 10 Programming in FBD

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Programming in FBD Creation of a program in FBD

CHAP 10

1.Click with the left mouse button onto the

Level and the Folder under which the New Object is to be inserted 2. Press the right mouse button and select Add Object

3. Select Type of POU, Language of POU and enter the Name of the new POU

Programming in FBD Input of a program in FBD

CHAP 10

1. Select ??? and delete the question


marks with the Del key

2. Click onto button Box to insert a


Basic FBDElement

3. Press the F2 key, to call up a


Function selection window

F2

4. Enter the names of the signals to be used

Programming in FBD Adding of new Logic Elements in FBD


Connection points for new FBDElements

CHAP 10

At this Connection point the following FBDElements can be added: Box Assignment Jump Return Set (S) / Reset (R)

At this Connection point the following FBDElements can be added: Box Negation

At this Connection point the following FBDElements can be added: Output

Programming in FBD

CHAP 10

Definition / Alteration the logic or function of a BasicFBDElement 1. Click with the left mouse button onto the text displayed inside
of the element (Text background is changed to black color)

2. Press F2 key to call up the Function selection window

F2

3. First select the Function Group then the Function itself

Programming in FBD Deletion of Inputs, Outputs and Elements


Deletion of an Input pin

CHAP 10

Select the Input Pin to be deleted by a click with the left mouse button and delete the pin by pressing the Del key

Del

Deletion of an Output pin Select the Output Pin to be deleted by a click with the left mouse button and delete the pin by pressing the Del key

Del

Deletion of a complete Element Select the Elemet to be deleted by a click with the left mouse button and delete the pin by pressing the Del key

Del

Important note ! If an element is deleted to which other elements are connected to, all elements connected to the input pins of this element will be deleted and the logic is adapted accordingly

Programming in FBD Adding a new FBDNetwork

CHAP 10

1. Press the right mouse button and select Network (after) or Network (before)

2. Enter the logic into the new FBDNetwork

Programming in FBD Direct switchover from FBD to LDR display

CHAP 10

1. Select Extras / View in the menubar and select the desired display mode

Programming in FBD

CHAP 10

Monitor display in FBD

Representation in Blue Logic result = TRUE Representation in Black Logic result = False

Note ! The color for the signal status representation can be adapted under Project / Options / Colors

Programming in FBD Input of Comment in FBD

CHAP 10

1. Press the right mouse button and select Comment

2. Enter comment, to make a new comment line, press the Enter key

Programming in FBD Jumps in FBD

CHAP 10

10

1. Press the right mouse button and select Jump

2. Adapt the default text for the target e.g. Label to End)

3. Enter the target label according to the entered label (e.g. End: )

Caution ! This is the comment line

Programming in FBD Call of Programs, Functions and Function blocks in FBD

CHAP 10

11

1. Select ??? and delete the question


marks with the Del key

2. Click onto button Box to insert a


Basic FBDElement

F2

3. Press the F2 key, to call up the


Function selection window

Programming in FBD Call of Programs, Functions and Function blocks in FBD

CHAP 10

12

4. If are there are any parameters,


enter the required information

Programming in FBD Definition and usage of Timers

CHAP 10

13

1. Select ??? and delete the

question marks with the Del key

2. Click onto button Box to insert a


Basic FBDElement

3. Press the F2 key, to call up a


Function selection window F2

4. Select the desired Timer Function block

Programming in FBD Definition and usage of Timers

CHAP 10

14

5. Enter the name of the instance for the timer function


and define the remaining parameters

Programming in FBD Monitoring of Timers / Diagram Switch On Delay (TON)

CHAP 10

15

Time diagram Switch On Delay

Input Variables IN : Start signal (BOOL) PT : Time command value (TIME) Example T#2s, T#2000ms Output Variables Q : Timer check Bit (Bool) Q = 1, if IN = 1 and if the actual time (ET) is equal to command value (PT) in alle other cases Q = 0 ET : actual time value (Time) actual time (ET) is counted up as soon as IN = 1 if command value (PT) is reached, actual time (ET) is stopped

Programming in FBD Monitoring of Timers / Diagram Switch Off Delay (TOF)

CHAP 10

16

Time diagram Switch Off Delay

Input Variables IN : Start signal (BOOL) PT : Time command value (TIME) Example T#2s, T#2000ms Output Variables Q : Timer check Bit (Bool) Q = 0, if IN = 0 and if the actual time (ET) is equal to command value (PT) in alle other cases Q = 1 ET : actual time value (Time) actual time (ET) is counted up as soon as IN = 0 if command value (PT) is reached, actual time (ET) is stopped

Programming in FBD Monitoring of Timers / Diagram Pulse function (TP)

CHAP 10

17

Time diagram Pulse function (TP)

Input Variables IN : Start signal (BOOL) PT : Time command value (TIME) Example T#2s, T#2000ms Output Variables Q : Timer check Bit (Bool) Q = 1, if IN = 1 and if the actual time (ET) is less than command value (PT) in alle other cases Q = 0 ET : actual time value (Time) actual time (ET) is counted up as soon as IN = 1 if command value (PT) is reached, actual time (ET) is stopped

Programming in FBD Monitoring of Timers / Diagram Real Time Clock (RTC)

CHAP 10

18

Input Variables EN : Enable signal (BOOL) PT : Date/Time command value (DT) Example : DT#2004041514:00:00 Output Variables Q : Time check Bit (Bool) Q = 1, if EN = 1 in alle other cases Q = 0 CDT : active Date and Time (DT) Example : DT#2004073022:10:23 as soon as EN = 1, the given command value at PDT is set at the output parameter CDT and CDT is incremented in steps of seconds as long as EN = 1 if EN = 0, then DT#1970010100:00 is output at CDT

Programming in FBD Definition and usage of Counters

CHAP 10

19

1. Select ??? and delete the

question marks with the Del key

2. Click onto button Box to insert a


Basic FBDElement

3. Press the F2 key, to call up a


Function selection window F2

4. Select the desired Counter Function block

Programming in FBD Definition and usage of Counters

CHAP 10

20

5. Enter the name of the instance for

the counter function and define the remaining parameters

Programming in FBD Online Status display Up Counter (CTU)

CHAP 10

21

Input Variable CU : Count signal (BOOL) edge triggert Reset : Reset signal (BOOL) resets actual counter value CV and result bit Q to 0 PV : Command value (INT) max. 65535 Output variables Q : Result Bit (Bool) Q = 1, if actual counter value (CV) is equal or greater than command value (PV) in all other cases Q = 0 CV : actual counter value (INT) actual counter value (CV) is incremented by 1 as soon as the count signal (CU) is changing form 0 to 1 or from 1 to 0 if Reset = 1 the actual counter value (CV) and ouput (Q) are reset to 0 as long as Reset = 1 counting is blocked

Programming in FBD Online Status display Down Counter (CTD)

CHAP 10

22

Input Variable CU : Count signal (BOOL) edge triggert Load : Load signal (BOOL) sets actual counter value CV to command value (PV) PV : Command value (INT) max. 65535 Reset : Reset signal (BOOL) resets actual counter value CV and result bit Q to 0 Output variables Q : Result Bit (Bool) Q = 1, if actual counter value (CV) is equal to 0 in all other cases Q = 0 CV : actual counter value (INT) actual counter value (CV) is decremented by 1 as soon as the count signal (CD) is changing form 0 to 1 or from 1 to 0 if Load = 1 actual counter value (CV) ist set to the command value (PV) as long as Load = 1 counting is blocked if actual counter (CV) value reaches 0, counting is stopped if Reset = 1 the actual counter value (CV) and ouput (Q) are reset to 0 as long as Reset = 1 counting is blocked

Programming in FBD Online Status display Up / Down Counter (CTUD)

CHAP 10

23

Input Variable CU : Count up signal (BOOL) edge triggert CD : Count down signal (BOOL) edge triggert Load : Load signal (BOOL) sets actual counter value CV to command value (PV) Reset : Reset signal (BOOL) resets actual counter value CV and result bit Q to 0 PV : Command value (INT) max. 65535 Output variables QU : Result Bit (Bool) QU = 1, if actual counter value (CV) is equal or greater than command value (PV) in all other cases QU = 0 QD : Result Bit (Bool) Q = 1, if actual counter value (CV) is equal to 0 in all other cases Q = 0

CV : actual counter value (INT) actual counter value (CV) is incremented by 1 as soon as the count signal (CU) is changing form = t0 1 or from 1 to 0 actual counter value (CV) is decremented by 1 as soon as the count signal (CD) is changing form 0 to 1 or from 1 to 0 if Load = 1 actual counter value (CV) ist set to the command value (PV) as long as Load = 1 counting is blocked if actual counter (CV) value reaches 0, counting is stopped if Reset = 1 the actual counter value (CV) and ouput (Q) are reset to 0 as long as Reset = 1 counting is blocked

Sequence Programming

CHAP 11

Chapter 11 Sequence Programming with Indralogic

Sequence Programming Selection of IEC compliant SFC Input Mode

CHAP 11

Note ! Indralogic offers 2 different types of SFCProgramming modes. The so called simplified mode, is not compliant to IEC61131. The other SFCMode is compliant to IEC. Before SFC Programming is started, the required mode should be activated, because it is not possible to convert it afterwards. IECLibrary In order to use the IECComliant Sequence, the SFCLibrary IECSFC.LIB must be added to the library window (Window / Library Manager / Additional Library)

IEC compliant SFCProgramming mode is active

Sequence Programming IECStepAction commands

CHAP 11

The following StepAction output commands are available in the IEC compliant sequence: N R S L D P SD DS SL
Nonstored overriding Reset Set (Stored) time Limited time Delayed Pulse Stored and time Delayed Delayed and Stored Action is active as long as the step is active Action is deactivated Action is activated and remains active until a Reset for this action is issued Action is activated for a certain time, but only as long as the step remains active Action is activated after a certain time, if the step is still active at this point and remains active as long as the step is active Action is carried out one time, when the step is activated Action is activated after a certain time and remains active until a Reset for this action is issued Action is activated after a certain time, if the step is still active at this point and remains active until a Reset for this action is issued Action is activated for a limited time

Stored and time Limited

The StepAction commands L, D, SD, DS and SL require a time value in the TIMEConstant format, e.g. T#5s or T#500ms

Sequence Programming Creation of an IECSequence program

CHAP 11

1. Select with the left mouse button the

folder under which the new SFCProgram is to created 2. Press the right mouse button and select Add Object in the menu

3. Select Program and


SFC in the property window and enter name of sequence module

4. Change the default text from

Init to N000 and Trans0 to e.g. _S1 = TRUE and enter the action to be carried out by this step e.g. _Y1

Sequence Programming Adding a new step element

CHAP 11

1. Select Transition with left mouse

button, press right mouse button and select StepTransition (after) in the popup menu

2. Change the default text

from Step2 to N001 and Trans1 to e.g. _S3 = TRUE and Action_1 to e.g. _Y2

Sequence Programming Copy / Paste an existing Step in a Sequence module

CHAP 11

1. Select Transition with left mouse

button, press CTRL key and keep it pressed, then select Step element with left mouse button

2. Select Edit / Copy in the menubar

3. Select Transition after which you want to insert

the copied step element, with left mouse button, press the CTRL key and keep it pressed, than press right mouse button and select Paste after

4. Select Paste after in the menubar

5. Adapt the Step

number in the step element

Sequence Programming Deletion of an existing StepElement

CHAP 11

1. Select Transition with left mouse

button, press CTRL key and keep it pressed, then select Step element with left mouse button

2. Select Edit / Delete in the menubar

3. If required, adapt step number

Sequence Programming Adding a new Step Action

CHAP 11

1. Click with the left mouse button


onto the step element, to which a new action is to be added

2. Press the right mouse button and


select Associate Action

3. Adapt the Default values to your needs

Sequence Programming Deletion of a StepAction

CHAP 11

1. Click with the left mouse button


onto the step element, at which an Action is to be deleted

2. Press the right mouse button and

select Clear Action / Transition

3. Select the action which is to be

deleted and confirm deletion with the OK button

Sequence Programming Programming of a step continuation logic

CHAP 11

1. Click with the left mouse button onto the


Transition, for which the continuation logic has to be programmed

2. Press the right mouse button and

select Zoom Action / Transition

3. Select the programming

language, in which the continuation logic is to be programmed

continuation on the next page

Sequence Programming Programming of a step continuation logic (continuation)

CHAP 11

10

4. Enter the Continuation logic


in the selected language

5. By double clicking with the left mouse button


onto the object name, you can switch back to the graphical display

6. An active Continuation logic


is indicated by a black triangle Note By double clicking onto the black triangle, the Continuation logic can be called up and edited

Sequence Programming Programming an ActionLogic

CHAP 11

11

1. Enter the name of the Action program

2. Select the name of sequence program in


the left window, press the right mouse button and select Add Action

3. Select the desired

Programming language and enter the name of the Action program

Continuation on next page

Sequence Programming Programming an ActionLogic (continuation)

CHAP 11

12

4. Enter the Action logic


in the selected language

Sequence Programming Programming a step Entry logic

CHAP 11

13

Note ! The step Entry logic is processed only once when the step is selected the first time.

1. Click with the left mouse button onto

the Step, for which an Entry logic is to be programmed

2. Press the right mouse button and


select Add EntryAction

3. Select the desired Programming language

in which the Entry logic is to be programmed

continuation on next page

Sequence Programming Programming a step Entry logic (continuation)

CHAP 11

14

4. Enter the Entry logic

in the selected language

Sequence Programming Programming a step Exit logic


Note ! The step Exit logic is processed only once when the step is exited.

CHAP 11

15

1. Click with the left mouse button onto


the Step, for which an Exit logic is to be programmed

2. Press the right mouse button and


select Add ExitAction

3. Select the desired Programming language

in which the Exit logic is to be programmed

continuation on the next page

Sequence Programming Programming a step Exit logic (continuation)

CHAP 11

16

4. Enter the Exit logic

in the selected language

Sequence Programming Deletion of a step Entry or Exit logic

CHAP 11

17

1. Click with the left mouse button

onto the Step, for which an Entry/ Exit logic is to be removed

2. Press the right mouse button and

select Clear Action / Transition

3. Select the actions to be removed,


and confirm by clicking on the OK button

4. Click onto the OK button, without


selecting a step action in the displayed window

Sequence programming StepPropertyVariables


Step variables in SFC

CHAP 11

18

Default variables are used together with SFC, to make it possible to check the status of a sequence in other parts of the program Each step has a Flag, which is used to store the status of the step The Step_Flag active or inactive status of a step is called: Stepname.x IECSequence > SqA_080_Robot1.N005.x Stepname Simplified sequence > SqA_080_Robot1.N005 This boolean variable is set to TRUE, if the corresponding step is active, and set to FALSE, if the corresponding step is inactive this variable can be used in each Action and Transition of the SFCPOU To check, if an IECAction is active or not, the variable Actionname.x can be used Together with IECSteps, the active time a step has been active, can be checked using the default variable Stepname.t it is also possible to access the default variables from other programs inside of the project Example: act_step_1 : = SqA_050_Loadstation.N001.x Here the default variable N001.x is used, to check the status of IECStep N001 in POU SqA_050_Loadstation act_step_1_Time : = SqA_050_Loadstation.N001.t Here the default variable N001.t is used, to check the time the step has been active

Sequence programming StepPrpopertyFlags


IECLibrary

CHAP 11

19

To use the complete set of the IECSequence Flags, the SFCLibrary AnalyzationNew.lib must be linked into the project (Window / Library Manager / Aditional library)

SFCFlags
For controlling the operation of SFC POUs flags can be used, which are created implicitely during running the project. To read this flags you have to define appropriate global or local variables as inputs or outputs. Example: If in a SFC POU a step is active for a longer time than defined in the step attributes, then a flag will be set, which is accessible by using a variable SFCError (SFCError gets TRUE in this case). For controlling the operation of SFC POUs flags can be used, which are created implicitely during running the project To read this flags you have to define appropriate global or local variables as inputs or outputs Example: If in a SFCPOU, a step is active for a longer time than defined in the step attributes, then a flag will be set, which is accessible by using the variable SFCError (SFCError gets TRUE in this case).

The following flag variables can be used:


SFCEnableLimit Type BOOL When it has the value TRUE, the timeouts of the steps will be registered in SFCError Other timeouts will be ignored the usage can be helpful during first time installation or manual mode SFCInit Type BOOL When this variable has the value TRUE, the sequential function chart is set back to the Init step The other SFC flags are reset too (initialization) The Init step remains active, but is not executed, for as long as the variable has the value TRUE It is only when SFCInit is again set to FALSE, that the block can be processed normally SFCReset Type BOOL This variable behaves similarly to SFCInit Unlike the latter, however, further processing takes place after the initialization of the Init step Thus for example the SFCReset flag could be reset to FALSE in the Init step SFCQuitError Type BOOL Provided that the Execution of the SFC diagram is stopped for as long as this boolean variable has the value TRUE whereby a possible timeout in the variable SFCError is reset All previous times in the active steps are reset when the variable again assumes the value FALSE The declaration of the flag SFCError is a prerequisite, to registers all timeouts in the SFC SFCPause Type BOOL Execution of the SFC diagram is stopped for as long as this boolean variable has the value TRUE SFCError Type BOOL This Boolean variable is TRUE when a timeout has occurred in a SFC diagram If another timeout occurs in a program after the first one, it will not be registered unless the variable SFCError is reset first The declaration of the flag SFCError is a prerequisite for the functioning of the other Flag Varaiables (SFCErrorStep, SFCErrorPOU, SFCQuitError, SFCErrorAnalyzationTable)

Sequence programming StepPropertyFlags

CHAP 11

20

SFCTrans Type BOOL This variable is set to TRUE, when a transition is actuated (next step is selected) SFCErrorStep Type STRING If SFCError registers a timeout, the name of the step, which has caused the timeout, is stored into this variable The declaration of the flag SFCError is a prerequisite, to registers all timeouts in the SFC SFCErrorPOU Type STRING If SFCError registers a timeout, the name of the POU, which has caused the timeout, is stored into this variable The declaration of the flag SFCError is a prerequisite, to registers all timeouts in the SFC SFCCurrentStep Type STRING The name of the active step is stored in this variable this is done independently of the time monitoring If parallel branches exist in a sequence, the step in the branch on the outer right is stored into this variable SFCErrorAnalyzationTable Type Array [0..15] of ExpressionResult This variable provides the result of an analyzation of a transition expression For each component of the expression, which is contributing to a FALSE of the transition and thereby to a timeout of the previous step, the following information is written to the structure ExpressionResult : Name Address Comment actual status This is possible for maximum 16 variables (ArraySize max. 0..15) The structure ExpressionResult as well as the implicitely used analyzation modules are provided with the library AnalyzationNew.lib The analyzation modules also can be used in other POUs, which are not programmed in SFC Note ! It is a precondition for the analyzation of a transition expression, that a timeout is registered in the preceeding step So a time monitoring must be implemented there and also the variable SFCError (see above) must be defined in the declaration window SFCTip, SFCTipMode Type BOOL This variables allow JogMode of the SFC When this is switched on by SFCTipMode = TRUE, it is only possible to skip to the next step, if SFCTip is set to TRUE As long as SFCTipMode is set to FALSE, it is even possible to skip over transitions

Sequence programming Programming of StepPropertyFlags

CHAP 11

21

Sequence programming Online display of StepPropertyFlags

CHAP 11

22

Sequence programming

CHAP 11

23

Sample sequence program in LDR Step elements & Parameters


In this example, the command output of the sequence is programmed in a separate module, using the step variables. This has the advantage, that the movement can be stooped or canceled any time, independent of the sequence module.

Sequence programming Sample sequence program in LDR Continuation logic


INIT Step (N000) Continuation logic

CHAP 11

24

Movement steps (N005 N0xx) Continuation logic

Sequence programming Sample sequence program in LDR Command output


Command output via Step variable Stepname.x Format : Sequencename.Stepname.x e.g. SqA_050_Robot1.N005.x

CHAP 11

25

Sequence programming Sample sequence program in LDR Program callup

CHAP 11

26

Sequence Programming Sequence Branching / Jump

CHAP 11

27

1. Select the Continuation

element at which the Branching / Jump is to be inserted

2. Press the right mouse button and select


Alternative Branch (right)

Sequence Programming Sequence Branching / Jump

CHAP 11

28

3. Change the default text from TRANSXX


to the defined Continuation logic e.g. _S3 = False

4. Select the Continuation element

and press the right mouse button, then select Jump or StepTransition (after)

5. Change default text fromStep to the step


number you want to jump to e.g. N004

Sequence Programming Sample program sequence Branching / Jump

CHAP 11

29

Sequence Programming Input of Step comment and Step monitoring time

CHAP 11

30

1. Click with the left mouse button onto


the Step element for which you want to enter a Comment or a Monitoring time

2. Press the right mouse button


and select Step Attributes

3. Enter the desired Comment

and/or the Monitoring time (Time format : T#2000ms or T#2s)

Note ! Display of Comment or Monitoring time has to be selected under Tools / Options (see next page)

Note ! In order to insert additional lines, press Ctrl + Enter key

Sequence Programming

CHAP 11

31

Selection of step comment or Step monitoring time display

1. Press the right mouse button

inside of the Sequence window and select Options

Comment display

Monitoring time display

Programming in ST

CHAP 12

Chapter 12 Programming IN ST

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Programming in ST Logic operations with Structured Text (ST)

CHAP 12

Logic operations with Structured Text are programmed using the commands IF / THEN / ELSE / END_IF The status of the used signals are checked using the statments TRUE or FALSE If brackets have to be used, the rules of the Boolean Algebra apply Note ! only round brackets are valid ( and ) Example : Output with Assignment (not latched)

Programming in ST Logic operations with Structured Text (ST)


Example : Output with Set and Reset (latched)

CHAP 12

Programming in ST Calling program modules (PRGs)

CHAP 12

Programming in ST Definition and usage of Functions (FUN)


Program inside of the function

CHAP 12

Call of function

Programming in ST Function parameter input


Parameter input in the calling module

CHAP 12

Parameter input inside of the function

Programming in ST Online Status display of of Functions


Monitoring in the calling module

CHAP 12

Monitoring inside of the function

Programming in ST Definition and usage of Function Blocks (FB)


Program inside of the function block

CHAP 12

Call of function block

Programming in ST

CHAP 12

Definition of an instance for a function block (Memory allocation)

Bas_Manual (Instance)
Inputs: _S0 _S1 Output: _Y9

Memory Bas_Manual
Inputs: _S0 _S1 Output: _Y9

Manual_Move (FB)
Inputs VAR_INPUT left_limit right_limit END_VAR Outputs VAR_OUTPUT out_ok END_VAR

Bas_Manual_2 (Instance)
Inputs: _S2 _S3 Output: _Y10

Memory Bas_Manual_2
Inputs: _S2 _S3 Output: _Y10

Programming in ST Monitoring of Function Blocks


Monitoring in the Global variable definition window

CHAP 12

Monitoring of the function block in the calling module

Programming in ST Monitoring of Function Blocks


Monitoring inside of the Function Block

CHAP 12

10

2. Select instance by double clicking on it 1. Double click onto the function block in the left window

3. Signal status inside of the selected instance is displayed

Programming in ST Selection of SFC Input Mode (simlified SFC non IEC)

CHAP 12

11

Note Codesys offers 2 different types of SFCProgramming modes. The so called simplified mode, is not compliant to IEC61131. The other SFCMode is compliant to IEC. Before SFC Programming is started, the required mode should be activated, because it is not possible to convert it afterwards.

simplified SFCProgramming mode is active

Programming in ST Creation of a SFCSequence programm

CHAP 12

12

1. Select with the left mouse button the

folder under which the new SFCProgram is to created 2. Press the right mouse button and select Add Object in the menu

3. Select Program and

SFC in the property window and enter name of sequence module e.g. SqA_020_Pusher1

4. Change the default text from


Init to N000 and Trans0 to RetVal=OK

Programming in ST Add a new step element

CHAP 12

13

1. Select Transition with left mouse

button, press right mouse button and select StepTransition (after) in the popup menu

2. Change the default text

from Step2 to N001 and Trans1 to RetVal=OK

Programming in ST Copy / Paste an existing Step in a Sequence module

CHAP 12

14

1. Select Transition with left mouse

button, press CTRL key and keep it pressed, then select Step element with left mouse button

2. Select Edit / Copy in the menubar

3. Select Transition after which you


want to insert the copied step element, with left mouse button, press the CTRL key and keep it pressed, then press right mouse button and select Paste after in the menu

4. Adapt the Step

number in the step element

Programming in ST Deletion of an existing StepElement

CHAP 12

15

1. Select Transition with left mouse

button, press CTRL key and keep it pressed, then select Step element with left mouse button

2. Select Edit / Delete in the menubar

3. If required, adapt step number

Programming in ST Programming a step

CHAP 12

16

1. Double click with the left mouse

button onto the step element Note ! If the step element is opend the first time, the programming language in which step program is to be written, can be selected

2. Select the Programming


language to be used

3. Enter the program in the


selected programming language

Programming in ST

CHAP 12

17

Sample Sequence program ST Step elements & Parameters


In this example, the command output of the sequence is programmed in a separate module, using the step variables. This has the advantage, that the movement can be stooped or canceled any time, independent of the sequence module.

Programming in ST Sample Sequence program ST Continuation logic


INIT Step (N000) Continuation logic

CHAP 12

18

Movements steps (N005 N0xx) Continuation logic

Programming in ST Sample Sequence program ST Command output


Command output via Step variable Nxxx Format : Sequencename.Stepname e.g. SqA_080_Robot1.N005

CHAP 12

19

Programming in ST Sample Sequence program ST Module callup

CHAP 12

20

Programming in ST Sequence Branching / Jump

CHAP 12

21

1. Select the Transition at

which the Branching / Jump is to be added

2. Press the right mouse buton and select


Alternative Branch (right)

Programming in ST Sequence Branching / Jump

CHAP 12

22

3. Change the default text from TRANSXX


to the defined Transition logic e.g. RetVal = JP1

4. Select the Continuation element

and press the right mouse button, then select Jump or StepTransition (after)

5. Change default text fromStep

to the step number you want to jump to e.g. N004

Programming in ST Sample program sequence Branching / Jump

CHAP 12

23

Programming in ST Sample program sequence Branching / Jump

CHAP 12

24

Task Managment

CHAP 13

Chapter 13 Task Managment

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Task managment Applications with Task managemant

CHAP 13

Description In addition to declaring the special PLC_PRG program, you can also control the processing of your project using the task management. A Task is a time unit in the processing of an IEC program It is defined by a name, a priority and by a type determining which condition will trigger the start of the task This condition can be defined by a time (cyclic, freewheeling) or by an internal or external event which will trigger the task; e.g. the rising edge of a global project variable or an interrupt event of the controller For each task you can specify a series of programs that will be started by the task If the task is executed in the present cycle, then these programs will be processed for the length of one cycle. The combination of priority and condition will determine in which chronological order the tasks will be executed Types of Tasks
Communication

Free running Task

L Cycle time

Cyclic Task L S L S

Event controlled Task

Event

Task managment Time related behavier of Tasks

CHAP 13

For the execution of a Task, the following rules apply: That task is executed, whose condition has been met; i.e., if its specified time has expired, or after its condition (event) variable exhibits a rising edge If several tasks have a valid requirement, then the task with the highest priority will be executed If several tasks have valid conditions and equivalent priorities, then the task that has had the longest waiting time will be executed first. The processing of the program calls will be done according to their order (top down) in the task editor None preemtive behavier Advantage : Data consistancy Disadvantage : No fast inputs

Park

time delay

Preemtive behavier Advantage : fast inputs Disadvantage : Data consistancy is not guaranteed

Free running Task Priority 10

Event controlled Task Priority 5

Event

Task managment

CHAP 13

Creation of a new Task

1. Click onto Ressources / Task configuration to create one or several Tasks

2. Click onto Task configuration in the middle window, press the right mouse button and select Append Task

continuation on next page

Task managment

CHAP 13

Creation of a Task Definition of the Task properties


3. Enter the Type and the corresponding Parameters for the selected Task

4. Click onto Task configuration to take over the new parameters into the Task window

continuation on next page

Task managment

CHAP 13

Creation of a Task Definition of a program module


5. Click onto the Name of the Task in the Task window, press the right mouse button and select Append Program Call

F2

6. Select the field Program Call and press the function key F2 to callup the program selection window

7. Select the module which is to be called by the task, in the displayed selection list

Task managment Description of properties Cyclic Task

CHAP 13

Name a name for the task; with this name the task is represented in the configuration tree the name can be edited there after a mouse click on the entry or after pressing the Space key when the entry is selected Priority (031): a number between 0 and 31 whereas 0 represents the highest, 31 the lowest priority Type: Cyclic The task will be processed cyclically according to the time definition given in the field Interval Interval the period of time, after which the task should be restarted If a number is entered, then you can choose the desired time in the selection box behind the edit field in milliseconds [ms] or microseconds [s] Inputs in [ms] format will be shown in the TIME format (e.g. t#200ms) as soon as the window gets a focus change Inputs in [ms] will always be displayed as a plain number (e.g. 300) Watchdog Time > Monitoring time, after which the PLC is stopped with a Cycle time error Sensitivity> Number of times the Monitoring time can be triggered, before the PLC goes to STOP

Task managment Description of properties Free wheeling Task

CHAP 13

Name a name for the task; with this name the task is represented in the configuration tree the name can be edited there after a mouse click on the entry or after pressing the Space key when the entry is selected Priority (031): a number between 0 and 31 whereas 0 represents the highest, 31 the lowest priority Type: freewheeling The task will be processed as soon as the program is started and at the end of the cycle, it will be automatically restarted in a continuous loop (There is no cycle time definition) Watchdog Time > Sensitivity > Monitoring time, after which the PLC is stopped with a Cycle time error Number of times the Monitoring time can be triggered, before the PLC goes to STOP

Task managment Description of properties Event controlled Task

CHAP 13

F2

Name a name for the task; with this name the task is represented in the configuration tree the name can be edited there after a mouse click on the entry or after pressing the Space key when the entry is selected Priority (031): a number between 0 and 31 whereas 0 represents the highest, 31 the lowest priority Type: triggered by event The task will be started as soon as the variable, which is defined in the Event field is changing its status from 0 to 1 Properties / Single a Global Variable / Signal is to be entered in this field, which is used to start the Task Watchdog Time Sensitivity

> >

Monitoring time, after which the PLC is stopped with a Cycle time error Number of times the Monitoring time can be triggered, before the PLC goes to STOP

Task managment

CHAP 13

Description of properties External Event controlled Task (Interrupt)

Name a name for the task; with this name the task is represented in the configuration tree the name can be edited there after a mouse click on the entry or after pressing the Space key when the entry is selected Priority (031): a number between 0 and 31 whereas 0 represents the highest, 31 the lowest priority Type: triggered by external event The task will be started as soon as the onboard input (interrupt) of the L40 PLC Controller, which is defined in the Event field is changing its status from 0 to 1 Properties / Event One of the 7 interupt inputs located on the motherboard of the L40 Controller Watchdog Time Sensitivity

> >

Monitoring time, after which the PLC is stopped with a Cycle time error Number of times the Monitoring time can be triggered, before the PLC goes to STOP

Task managment

CHAP 13

10

Description of properties System events


Note: System event controlled Tasks are related to the selected Target System and may not be present in this form in every controller 1. Click onto the System event for which a task is to be defined 2. Select the field called POU by double clicking on it, enter the name of the program or callup a program list window by pressing function key F2

F2

Task managment

CHAP 13

11

Display of Task Timing Diagram in Online mode


1. Check if library SysTaskInfo.Lib is linked into the project 2. If required, include library via function Window/Library Manager Additional library

Note ! The library is control specific and therefore can be found in the Target directory of the selected target system

3. Timing diagram can be monitored after Online / Login under Taskconfiguration

Libraries

CHAP 14

Chapter 14 Library managment

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Library managment Insertion of a new library into the current project 1. Select Window / Library Manager in the menubar

CHAP 14

2. All libraries included in the current project are displayed

Library managment Insertion of a new library into the current project

CHAP 14

3. Select the upper window with the left mouse button, then press the right mouse button

4. Select the Library which is additionally


to be included into the current project

5. All Functions / Function blocks out of this library can now be used in the current project

Remanence

CHAP 15

Chapter 15 Remanence behaviour of variables

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Remanence behaviour of variables

CHAP 15

Behavier of variables after Power Off / ON and Stop / Run (Remanence)


Like in the previous generation of PLCs, the behavier of variables after Power Off / On and Stop / Run can be affected by internal settings. Indralogic is using the statements VAR_RETAIN and VAR_PERSISTENT in the declaration section, to determine, if the Status / Value of a variable is cleared after Power Off / On or Stop / Run or not. Switch Off / On Online Reset Online / Login Online / Reset (Cold)

Var Retain Remant_var : DINT End_Var


All variables declared as Retain, keep their status / values, the status / value of all other variables are cleared

Var Persistent Remanent_var : DINT End_var


All variables declared as Persistant, keep their status / values, the status / value of all other variables are cleared

PLC Program
Switch Off / On Online Reset Online / Login Online / Reset (Cold)

Online / Reset (Original)

Var Retain Persistent Remant_var : DINT End_Var


All variables declared as Retain Persistent, keep their status / values, the status / value of all other variables are cleared complete user memory is deleted

PLC Program PLC Flash Memory Retain.BIN Persist.DAT

Remanence behaviour of variables Declaration of remanent variables

CHAP 15

Remanence behaviour of variables Usage of remanent variables in POUs

CHAP 15

If a variable is declared in a Function Block as Retain / Persistent, the complete instance of this function block is saved into the Retain / Persistent section. But only the variable which is declared as Retain/Persistent will be treated as a remanent variable. All other variables will be cleared.

If a variable is declared in a Function as Retain / Persistent the declaraqtion is ignored and the variable is treated like a non remanent variable (i.e. the Status / value of this variable is cleared, like all the other non remanent variables).

Remanence behaviour of variables Usage of remanent variablen in POUs

CHAP 15

If a variable is declared in a Programm as Retain / Persistent, exactly this one variable is saved into the Retain / Persistent section

Monitor

CHAP 16

Chapter 16 Program Monitoring

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Program Monitoring Monitoring the program flow

CHAP 16

Sometimes it is necessary to see if a part of the program is processed or not. With the function Display Flow Control every line of the program which is process is mark in green on the left side of the window in the line number display.

Program Monitoring Enter variable list into Watch & Recipe Manager

CHAP 16

Sometimes it is necessary to find out what status / value a certain signal / variable has. Occasionally it also required towrite variable values into the PLC to test a function. This function is provided by the Watch and Recipe Manager Important note ! In Watch und Recipe Manager only Global Variabls can be entered and displayed. New variables can only be entered, if you are logged off (Online / Logout)

Program Monitoring

CHAP 16

Online display of variable list with Watch and Recipe Manager

Program Monitoring Read and alter Variables with Recipe Manager

CHAP 16

All values displayed in the Watch window are send to the Recipe Manager By double clicking onto a Variable, an input window is called up, into which new values can be entered

Program Monitoring Write Variables from Recipe Manager into PLC

CHAP 16

Note ! Only the values displayed in blue color are written into the PLC

Programming Monitoring Activation of the Trace Function

CHAP 16

Note ! Before the Trace function can be used, it has to be activated in the Target settings

1. Select Ressources, and open the

Target settings by double clicking on

Programming Monitoring Definition of Trace Parameters

CHAP 16

Monitoring of variables in the Trace window means, that the status / value of variables are monitored and recorded for a certain duration the monitored values are stored into a ring buffer (Trace buffer) If the memory of the ring buffer is full, the oldest values will be overwriten a maximum of 20 Variables can be monitored and recorded at the same time for each variable a maximum of 500 values can be recorded due to the fixed size of the ring buffer in the PLC, it is possible that with a high number of variables or with a very long variables (DWORD), less than 500 values can be recorded

1. Select Ressources and Sampling Trace

2. Press the right mouse button and


select Trace Configuration

3. Enter the signals / values to be


monitored into the Trace configuration window

Programming Monitoring Definition of Trace Parameters

CHAP 16

Trace definitions can be saved onto harddrive a saved Trace configuration can be loaded from the harddrive

Trace Name this name is displayed in the Trace window at the top right position of the Selection list Trigger Variable a boolean or an analog variable can be entered into this field if the status / value of the Trigger Variable is changing, the recording is started and the defined number of changes is displayed before and behind the Trigger point Trigger Position in this field the percentage of values to be displayed before the Trigger point can be entered. (e.g. if a value of 25 is entered, 25 % of the measured values will be displayed before the Trigger point and 75% after he trigger point. Then Trace is stopped) Trigger Level In this field the value of an analog variable can be entered, at which the trigger event occurs Trigger edge positive the trigger is started by the rising edge of a boolean trigger variable, respectively by the change of an analog trigger variable from the current to a lower value negative the trigger is started by the falling edge of a boolean trigger variable, respectively by the change of an analog trigger variable from the current to a higher value both the trigger is started by the falling and the rising edge of a boolean triger variable respectively at the passing from positive to negative or negative to positive none the trigger is not used

Programming Monitoring Definition of Trace Parameter

CHAP 16

Number of samples in this field the number of samples can be entered, after which a new recording cycle is started and the old values are overwritten by the new values Sample rate (ms) time between two recordings in milliseconds a 0 means : one scan cycle with each PLC Cyle Recording single the entered number of samples is displayed once continuous the sampling is restarted at the end of a samling cycle e.g. if you enter a 35, the first display includes the samples 1 to 35, then the next sample block (36 79) is called up automatically and so on Manual the display of the sample recording must be selected manually in the menu via the function Read Trace Variables all variables to be monitored have to be entered into this field, for a later selection in the Trace window for the fields Var 0 to Var 7 Note ! Entereing a . in the fields for the Trace variables calls up a selection of the available variables Input format : .Var_name

Programming Monitoring Start of a Trace sample recording

CHAP 16

10

1. First enter the variables


to be recorded into the fields Var 0 to Var 7

2. Select Online / Login to

change over to Monitor mode

Programming Monitoring Start of a Trace sample recording

CHAP 16

11

3. Press the right mouse button


and select Start Trace

4. As soon as the trigger condition

is met, the result is displayed as soon as the number of defined samples have been completed

User specific data structures

CHAP 17

Chapter 17 User specific data structures

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

User specific data structures Definition of Enumerations

CHAP 17

Using enumerations in the program

User specific data structures Monitoring of enumerations

CHAP 17

User specific data structures Definition and usage of Structures

CHAP 17

Using structures in the program

User specific data structures Monitoring of structures of userspecific data types Status display in the program

CHAP 17

Status display in the Ressources

Data Backup / Data Restore

CHAP 18

Chapter 18 Data Backup and Data Restore

Nachdruck, Vervielfltigung und bersetzung, auch auszugsweise, nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe gestattet. Wir bernehmen keine Haftung fr die bereinstimmung des Inhalts mit den jeweils geltenden gesetzlichen Vorschriften. Reproduction, copying, or translation of this publication, wholly or in part, only with our previous written permission and with source credit. We assume no responsibility for agreement of the contents with local laws and regulations Bosch Rexroth AG is exempt from liability, and reserves the right to make changes at any time.

Data Backup / Data Restore

CHAP 18

Backup of a complete IndraWorks Project


In order to make a Backup of a complete IndraWorks Project, inclusive Visualization and all other comonents included in the project, IndraWorks has an integrated ZIPUtility, which stores the complete project inta a compressed ZIPFile on the harddrive or removeable devices. This ZIPFile can than be easily passed on to other persons and restored on a different computer with IndraWorks.

1. Click onto the button Archive project

2. Click onto button Next to continue

Data Backup / Data Restore

CHAP 18

Backup of a complete IndraWorks Project

3. Enter the drive/directory and the name of the


archive file under which you want to store the project (only existing directories can be used)

4. Protect your archive by entering


a password (Optional)

5. Click onto button Next to continue

6. Check if the selected


options are correct

7. Click onto button Finish to to start archiving

Data Backup / Data Restore

CHAP 18

Backup of a complete IndraWorks Project

8. Project is commpressed and stored


under the entered file name

9. Click onto the button Close to


complete the backup process

Data Backup / Data Restore

CHAP 18

Restoring of an archived IndraWorksProject (ZIPFile)


Using this function, a previously archived IndraWorksProject can be restored into a fully working project

1. Close the actual IndrWorksProject via File/ Close / Project

2. Click onto the button Restore project

3. Click onto button Next to continue

Data Backup / Data Restore

CHAP 18

Restoring of an archived IndraWorksProject (ZIPFile)

4. Select the directory in which the archived ZIPFile is located

5. Select the ZIPFile which is to be restored

6. Click onto button Open

Data Backup / Data Restore

CHAP 18

Restoring of an archived IndraWorksProject (ZIPFile)

7. Click onto button Next

8. Select the directory into which you

want to restore the archived project

9. Click onto button Next

Data Backup / Data Restore

CHAP 18

Restoring of an archived IndraWorksProject (ZIPFile)

10. Check your settings and click onto button


Finish, to start the restore process

11. ZIPFile is unpacked and the project is


restored into the selected directory

Data Backup / Data Restore

CHAP 18

Restoring of an archived IndraWorksProject (ZIPFile)

12. Result is displayed

13. Activate direct loading of the restored

project into IndraWorks project window

Data Backup / Data Restore

CHAP 18

Adaption of the PLCDirectories


Sometimes it is necessary to adapt the directories of a restored project. This is always required, if the project was archived on another computer, with a different directory structures for the IndraWorks development software.

1. Select the Logic icon with the left mouse


button, press the right mouse button and select Properties

2. Adapt the IndraWorksInstallation directory.

e.g. C:\Programme\... to C:\Program files\....

Data Backup / Data Restore

CHAP 18

10

Importing a Standalone IndraLogic Program (*.PROFile)


The function Import PLC project data can be used to repair a corrupted IndraWorksProject or to integrate a Standalone IndraLogic Project into IndraWorks.

1. Click onto Drive and Control, to

display the available Target Systems

2. Click onto File and select


New / Project

3. Enter the name of the new project and

select the directory, into which you want to store the new project

4. Click onto OK button, to


take over your selection

Data Backup / Data Restore

CHAP 18

11

Importing a Standalone IndraLogic Program (*.PROFile)

5. Select the desired Target System with


the left mouse button, keep the left mouse button pressed

6. Drag the selected Target System with the left mouse button still

pressed onto the Project name and release the left mouse button as soon as you can see a line below the Project name

7. Enter the name for the IndraLogik Program

Data Backup / Data Restore

CHAP 18

12

Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC)

8. Select desired firmware version

9. Click onto button Extended to select


BYTE or WORD addressing mode

10. Callup the communication window, in order to enter the

parameters to be used for the connection with the Target System

11. Click onto Gateway, to setup the

parameters for a local Gateway Server

12. Select Local and confirm

by clicking onto the OK button

Data Backup / Data Restore

CHAP 18

13

Definition of communication for IndraLogic L40 / VEP30 (HardwarePLC)

13. Click onto New to create a new


communication channel

14. Select communication channel


Tcp/Ip (Level 2 Route)

15. Open the input field for the

IPAddress by double clicking onto localhost

17. Apply new settings by 16. Enter the IPAddress of the L40 controller
to which you want to make a connection and confirm the input by pressing the Enter key

clicking onto the OK button

Data Backup / Data Restore

CHAP 18

14

Importing a Standalone IndraLogic Program (*.PROFile)

18. Click onto the button Finish to


take over the new settings

Note ! By clicking with the right mouse button onto the icon Logic, the communication window can be called up again by selecting Properties

Data Backup / Data Restore

CHAP 18

15

Importing a Standalone IndraLogic Program (*.PROFile)

19. Select the IndralogicProject with


the left mouse button, press the right mouse button and select Import PLC project data

20. Select the directory in

which the ProFile to be imported is located

21. Select the ProFile to be imported

22. Click onto button Open


to load the selected file

Data Backup / Data Restore

CHAP 18

16

Importing a Standalone IndraLogic Program (*.PROFile)

23. Select the Objects, which


you want to import

24. Click onto the button Import,


to import the selected objects

25. Enter the following into the


three password windows: User name : ENI Password : 123456

Data Backup / Data Restore

CHAP 18

17

Importing a Standalone IndraLogic Program (*.PROFile)

26. The PLCProject data

is now integrated into IndraWorks and can be used for further processing

Language translation

CHAP 19

Chapter 19 Language translation

Nachdruck, Vervielfltigung und bersetzung, auch auszugsweise, nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe gestattet. Wir bernehmen keine Haftung fr die bereinstimmung des Inhalts mit den jeweils geltenden gesetzlichen Vorschriften. Reproduction, copying, or translation of this publication, wholly or in part, only with our previous written permission and with source credit. We assume no responsibility for agreement of the contents with local laws and regulations Bosch Rexroth AG is exempt from liability, and reserves the right to make changes at any time.

Language translation

CHAP 19

Generation of the translation file


The original language used during the development of an IndraLogic PLCProgram can be automatically translated into any other language by using a translation file. This translation file is automatically generated with the original language text. The additional languages have than to be entered into the translation file manually by the user. The translation using the translation file can be carried out temporarily or permanent. If the translation is carried out temporary, it is possible to go back to the original language. If the translation is carried using the translate option, the original texts are replaced permantly by the text of the newly selected language.

1. Select function

Project / Translate into other languages / Create translation file ...

2. Select the objects you

want to include into the tranlation file

3. Insert the languages into which you


want to translate the original text

Language translation

CHAP 19

Generation of the translation file

4. Start the generation of the translation


file by clicking onto the OK button Note ! If the translation file already exists, only the newly found objects will be added, existing translations will not be effected. Additionally a backup file is generated from the previous version of the translation file. 5. After completion of the generation, the system automatically switches back to IndraLogic

Language translation

CHAP 19

Input of the translations into the translation file


In order to enter the translations for the various languages into the translation file, the file has to be opened with an ASCIIEditor like Notepad. The translation file is located in the same directory as your *.Pro File. The translation file also has the same name as the *.PROFile, but with the file extension *.tlt.

1. Check, into which

directory the translation file is stored to.

2. Select the directory using the Windows Explorer


and open the translation file with an ASCIIEditor

Language translation

CHAP 19

Input of the translations into the translation file

OriginalString OriginalString Translation text Translation text OriginalComment OriginalComment Translation text Translation text

Language translation

CHAP 19

Switchover to another language 1. Select Project / Translate into another languages / View translated project
View translated project : Original text is replaced temporarily for display only Translate this project : Original text is replaced permanently and saved into the project

2. Select the language you want to switch to

3. Program is displayed in the selected language

Command overview

CHAP 20

Chapter 20 Command overview

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Command overview

CHAP 20

Identifier, Keywords
Identifiers (Variable name) Sequence of characters, numbers and underscore (_). Must start with a character or an underscore (_). More than one leading underscor or several underscores in a row are invalid. Identifiers must also not include any spaces. A minimum of 6 characters must be supported by every system. Examples of Identifiers START STOP VALVE_6 VALVE_E_7 _16E8 _Motor

Command overview

CHAP 20

Identifier, Keywords
Keywords
A keyword consist of a sequence of characters without any Spaces. Keywords must not be used for any other purposes e.g. Variable names

Keywords ACTION...END_ACTION ARRAY...OF AT CASE...OF...ELSE...END_CASE CONFIGURATION...END_CONFIGURATION CONSTANT EN ENO EXIT FALSE F_EDGE FOR...TO...BY...END_FOR FUNCTION...END_FUNCTION FUNCTION_BLOCK...END_FUNCTION_BLOCK IF...THEN...ELSIF...ELSE...END_IF INITIAL_STEP...END_STEP PROGRAMM...WITH... PROGRAMM...END_PROGRAMM R_EDGE READ_ONLY READ_WRITE REPEAT...UNTIL...END_REPEAT RESOURCE...ON...END_RESOURCE RETAIN RETURN STEP..END_STEP STRUCT...END_STRUCT TASK TRANSITION...FROM...TO...END_TRANSITION TRUE TYPE...END_TYPE VAR...END_VAR VAR_INPUT...END_VAR VAR_IN_OUT...END_VAR VAR_EXTERNAL...END_VAR VAR_ACCESS...END_VAR VAR_GLOBAL...END_VAR WHILE...DO...END_WHILE WITH Furthermore: Data type names Function names Function block names Operators of the LIST Language Operators of the ST Language

Command overview

CHAP 20

Numerical literals
Integer literals and Real literals Examples
-5 +96 628_26 Integer literals underscores between numbers must be ommitted Real literals Real literals with an Exponent Literal Base 2 Literal Base 8 Literal Base 16 Boolean Zero and One Boolean FALSE and TRUE

-5.0 0.123 12.56 6.2E 4 i.e. 6.2e 4 -2.6E + 3 i.e. -2.6e + 3 12.0E3 i.e. 12.0e3 2#1010_1010 8#156 16#FF 0 1 FALSE TRUE

String-Literals
Sequence of zero or more characters between two single quote characters ()

Example
X $ $$6.00 $$ $ $L bzw. $l $N bzw. $n $P bzw. $p $R bzw. $r Empty string with a length of zero String of the length one with character X String of the length one with a space character String of the length one with a quote character String of the length five with, $6.00 Dollar-Character $ Single quote character Line feed New line New page Carriage return

Time literals 1.Duration of time


Command values for time literals must start with the keywords T#, TIME#, t# or time# Underscores can be used to separate the time unit from the time literal. Examples T#80 ms T#30.8s T#9.5m T#20.6h T#30h26m t#7d16h12m TIME#2.5h time#2.5h Time#12h_22m_48s T#16h_12m_18s

Command overview

CHAP 20

Date and Time


DATE# bzw. D# TIME_OF_DAY# bzw. TOD# DATE_AND_TIME# bzw. DT# Date Time of Day Date and Time

Examples Date#1996-04-6 D#1996-04-6 D#1996-04-6 TIME_OF_DAY#17 : 19 : 40.12 TOD#17 : 19 : 40.12 DATE_AND_TIME#1996-04-12-17 : 26 : 45.16 Dt#1996-01-12-17 : 26 : 45.16

Boolean Operators
Operator AND Parameter ANY_BIT Comment AND Function Example ST OUT := _S1 AND _S2 LIST LD AND ST OR ANY_BIT OR Function _S1 _S2 OUT

ST OUT := _S1 OR _S2 LIST LD OR ST _S1 _S2 OUT

NOT

ANY_BIT

NOT Function, Negation

ST OUT := _S1 AND NOT _S2 LIST LD ANDN ST _S1 _S2 OUT

XOR

ANY_BIT

XOR-Function

ST OUT := _S1 XOR _S2 LIST LD XOR ST _S1 _S2 OUT

Command overview

CHAP 20

Arithmetical Operators
Operator InputLIST ST Parameter ADD + ANY_NUM OutputParameter ANY_NUM Comment Addition Example ST Result := Value1 + Value2; LIST LD ADD ST SUB ANY_NUM ANY_NUM Subtraction Value1 Value2 Result

ST Result : =Value1 Value2; LIST LD SUB ST Value1 Value2 Result

MUL

ANY_NUM

ANY_NUM

Multiplication

ST Result := Value1 * Value2; LIST

DIV

ANY_NUM

ANY_NUM

Division; with ANY_INT integer division

ST Result : =Value1 / Value2; LIST LD MUL ST Value1 Value2 Result

MOD

ANY_INT

ANY_INT

Modulo (Reminder with integer division)

ST Result : =Value1 MOD Value2; LIST LD MOD ST Value1 Value2 Result

EXPT

Base: ANY_REAL Exponent: ANY_NUM

ANY_REAL

Power of

ST Result := EXPT( Value1, Value2); LIST LD EXPT ST Value1 Value2 Result

MOVE

ANY_NUM

ANY_NUM

Assignment

ST Result := MOVE( Value1) same as Result := Value1; LIST LD Value1 MOVE Result ST Result same as LD Value1 ST Result

Command overview

CHAP 20

Compare Operators
Operator LIST ST GT > InputParameter ANY_BIT ANY_NUM STRING TIME ANY_DATE OutputParameter BOOL Comment Greater than Example ST X;= A > B; LIST LD GT ST BOOL Greater than or Equal A B X

GE

>=

ANY_BIT ANY_NUM STRING TIME ANY_DATE

ST X;= A >= B; LIST LD GE ST A B X

LE

<=

ANY_BIT ANY_NUM STRING TIME ANY_DATE

BOOL

Less than or Equal

ST X;= A <= B; LIST LD LE ST A B X

LT

<

ANY_BIT ANY_NUM STRING TIME ANY_DATE

BOOL

Less than

ST X;= A < B; LIST LD LT ST A B X

EQ

ANY_BIT ANY_NUM STRING TIME ANY_DATE

BOOL

Equal

ST X;= A = B; LIST LD EQ ST A B X

NE

<>

ANY_BIT ANY_NUM STRING TIME ANY_DATE ANY_NUM

BOOL

not equal

ST X;= A <> B; LIST LD NE ST A B X

Command overview

CHAP 20

Bit manipulation
Function SHL InputParameter IN: ANY_BIT N: ANY_INT IN: ANY_BIT N: ANY_INT IN: ANY_BIT N: ANY_INT IN: ANY_BIT N: ANY_INT OutputParameter ANY_BIT Comment Shift left of IN by NBit Example Value : Word := 2#0000_0000_0001_0101; N_Bit : WORD := 3; Result : WORD; ST Result := SHL (Value, N_Bit); LIST LD SHL ST Value N_Bit Result

SHR

ANY_BIT

Shift right of IN by N Bit

ROL

ANY_BIT

Rotate left of IN by NBit

before SHL : 0000_0000_0001_0101 after SHL : 0000_0000_1010_1000 ii i h l f hif d i 3 posiitions to the left, zeros are shifted in from the right

ROR

ANY_BIT

Rotate right of IN by NBit

Command overview

CHAP 20

Type conversion
Function *_TO_** InputParameter ANY_NUM OutputParameter ANY_NUM Comment Numerical types are converted into each other * Input data type **Output data type Examplee Value_int : INT; Value_Real : REAL; ST Value_real := INT_TO_REAL(Value_int); LIST LD Value_int INT_TO_REAL ST Value_real TRUNC ANY_REAL ANY_INT Digits after the Value comma are truncated Result : REAL := 200.2345; : DINT;

ST Result := TRUNC (Value) LIST LD Value TRUNC ST Result Result = 200 BCD_TO_* ANY_BIT ANY_INT *Data type Data of the group ANY_BIT in BCD-Format is converted into the ANY_INT-Format Value_BCD : BYTE := 2#00010110; Value_INT : INT; ST Value_INT:=BCD_TO_INT (Value_BCD); LIST LD Value_BCD BCD_TO_INT ST Value_INT Value_INT = 16 *_TO_BCD ANY_INT ANY_BIT *Data type Data of the type ANY_INT-Format is converted into BCD-Format Value_BCD : BYTE ; Value_INT : INT := 16; ST Value_BCD:=INT_TO_BCD (Value_INT); LIST LD Value_INT INT_TO_BCD ST Value_BCD Value_BCD = 00010110

Command overview

CHAP 20

Numeric Functions
Function ABS InputParameter ANY_NUM OutputParameter ANY_NUM Comment Convert a number with sign into an absolute value (removes sign) Example ST Result := ABS(Value1); LIST LD ABS ST Value1 Result

SQRT

ANY_REAL

ANY_REAL

Square root

ST Result := SQRT(Value1); LIST LD SQRT ST Value1 Result

LN

ANY_REAL

ANY_REAL

natural Logarithm

ST Result := LN(Value1); LIST

LOG

ANY_REAL

ANY_REAL

Logarithm, Base 10

ST Result := LOG(Value1); LIST LD LN ST Value1 Result

EXP

ANY_REAL

ANY_REAL

Exponential function (e)

ST Result := EXP(Value1); LIST LD EXP ST Value1 Result

SIN

ANY_REAL

ANY_REAL

Sine function (Radian)

ST Result := SIN(Value1); LIST LD SIN ST Value1 Result

COS

ANY_REAL

ANY_REAL

Cosine function (Radian)

ST Result := COS(Value1); LIST LD COS ST Value1 Result

Command overview

CHAP 20

10

Numeric Functions
Function TAN InputParameter ANY_REAL OutputParameter ANY_REAL Comment Tangent function (Radian) Example ST Result := TAN(Value1); LIST LD TAN ST ASIN ANY_REAL ANY_REAL Arcus-Sine function Value1 Result

ST Result := ASIN(Value1); LIST LD ASIN ST Value1 Result

ACOS

ANY_REAL

ANY_REAL

Arcus-Cosine function

ST Result := ACOS(Value1); LIST LD ACOS ST Value1 Result

ATAN

ANY_REAL

ANY_REAL

Arcus-Tangent function

ST Result := ATAN(Value1); LIST LD ATAN ST Value1 Result

Command overview

CHAP 20

11

Selection Function
Function SEL InputParameter G: BOOL IN0: ANY IN1: ANY OutputParameter ANY Comment Binary selection OUT = Value1, if test = False OUT = Value2, if test = True Example Pruef Value1 Value2 OUT : BOOL; : REAL; : REAL; : Real

ST OUT := SEL(test, Value1, Value2) LIST LD SEL ST test Value1, Value2 OUT

MAX

ANY_BIT ANY_NUM STRING ANY_DATE TIME

ANY_BIT ANY_NUM STRING ANY_DATE TIME

Maximum-Function ST OUT := MAX (Value1, Value2, Value3) OUT = highest value out of a list LIST LD Value1 MAX Value2 MAX Value3 ST OUT Minimum-Function OUT = smallest value out of a list ST OUT := MIN (Value1, Value2, Value3) LIST LD MIN MIN ST Value1 Value2 Value3 OUT

MIN

ANY_BIT ANY_NUM STRING ANY_DATE TIME

ANY_BIT ANY_NUM STRING ANY_DATE TIME

LIMIT

MN, IN, MX: ANY_BIT ANY_NUM STRING ANY_DATE TIME

ANY_BIT ANY_NUM STRING ANY_DATE TIME

Limiter

ST OUT := LIMIT (Value_min, Zahl, VaOUT = Value_min, lue_max) if number is smaller than Value_min LIST LD Value_min OUT = Value_max, LIMIT Zahl, Value_max if number is higher ST OUT than Value_max Multiplexer OUT = W1, if select = 0; OUT = W2, if select =1 OUT = W3, if select=2 etc. ST OUT := MUX (select, W1, W2, W3, W4) LIST LD MUX ST select W1, W2, W3, W4 OUT

MUX

C: ANY_INT others: ANY

ANY

Command overview

CHAP 20

12

String Functions
Function LEN InputParameter STRING OutputParameter INT Comment calculates the number of characters in a string Example ST Lenght_INT := LEN(Text_STR); LIST LD LEN ST Text Lenght_INT

LEFT

IN: STRING L: ANY_INT

STRING

Extracts characters from a string String (Text_STR) starting at the left side of a string, number of characters (Nr_INT) are extracted Extracts characters from a string String (Text_STR) starting at the right side of a string, number of characters (Nr_INT) are extracted Extracts characters from the middle of a string (Text_STR) starting at a certain position (Start_INT) a certain number of characters (Nr_INT) Combines 2 individual strings into one string

ST Left_STR := LEFT(Text_STR, Nr_INT); LIST LD LEFT ST Text_STR Nr_INT Left_STR

RIGHT

IN: STRING L: ANY_INT

STRING

ST Right_STR := RIGHT(Text_STR, Nr_INTl); LIST LD Right ST Text_STR Nr_INT Right_STR

MID

IN: STRING L: ANY_INT

STRING

ST Centr_STR := MID(Text_STR, Start_INT, Nr_INT); LIST LD MID ST Text_STR Start_INT, Nr_INT Centre_STR

CONCAT STRING

STRING

ST New_STR := CONCAT(T1_STR, Day); LIST LD CONCAT ST T1_STR Day New_STR

INSERT

IN1, IN2: STRING P: ANY_INT

STRING

Inserts into an existing string (Org_STR) another string (Ins_STR) starting at a certain position (P_INT)

ST New_STR := INSERT(Org_STR, Ins_STR, P_INT); LIST LD INSERT ST Org_STR Ins_STR, P_INT New_STR

Command overview

CHAP 20

13

String Funktions
Function DELETE InputParameter IN: STRING L, P: ANY_INT OutputParameter STRING Comment Removes from an existing string (Org_STR) starting at a certain position (Pos_INT) a certain number of characters (Nr_INT) Replaces characters in an existing string (O_STR) by a new string (N_STR), starting at a certain position (P_INT), for a number of characters (Nr_INT) Searches in an existing string (Org_STR) for a certain sequence of characters (Search_STR) and returns the start position where the search string was found. If the search string is not foung, the function returns Zero Example ST New_STR := Delete(Org_STR, Pos_INT, Nr_INT); LIST LD DELETE ST Org_STR Pos_INT, Nr_INT New_STR

REPLACE IN1:, IN2: STRING L, P: ANY_INT

STRING

ST New:= REPLACE(O_STR, N_STR, P_INT, Nr_INT); LIST LD REPLACE ST O_STR N_STR, P_INT, Nr_INT New

FIND

IN1, IN2: STRING

INT

ST Pos_INT:= FIND(Org_STR, Search_STR); LIST LD Find ST Org_STR Search_STR Pos_INT

Command overview

CHAP 20

14

Standard-Function blocks Flip Flop Elements


Function block SR RS InputParameter S1, R: BOOL S, R1: BOOL OutputParameter Q1: BOOL Q1: BOOL Comment Flip Flop with priority Set lip Flop with priority Reset

Flankenerkennung
Function blockn R_TRIG F_TRIG InputParameter CLK: BOOL CLK: BOOL OutputParameter Q: BOOL Q: BOOL Comment at the rising edge at CLK set Q TRUE. at the falling edge at CLK set Q TRUE.

Timer
Function block TON InputParameter IN: BOOL PT: TIME OutputParameter Q: BOOL ET: TIME Comment Switch on delay IN PT Q ET : : : : rising edge starts timer element Delay time If time is elapsed set to TRUE actual value of timer

TOF

IN: BOOL PT: TIME

Q: BOOL ET: TIME

Switch Off delay IN PT Q ET : : : : rising edge starts timer element Delay time If time is elapsed set to TRUE actual value of timer

TP

IN: BOOL PT: TIME

Q: BOOL ET: TIME

Pulse IN PT Q ET : : : : rising edge starts timer element Delay time If time is elapsed set to TRUE actual value of timer

RTC

IN: BOOL PDT: DATE

Q: BOOL CDT: DATE

Real Time Clock IN : PDT : CDT: Q : rising edge, Date + Time is loaded Preset for Date + Time actual Date+ actual Time like EN

Note: If a rising edge is detected at IN, the time is set. Time is running as long as IN is TRUE

Command overview

CHAP 20

15

Counter
Function block CTU InputParameter CU: R_TRIG (BOOL) R: BOOL PV: INT OutputParameter Q: BOOL ET: TIME Comment Count Up, counts from zero to PV. CU : Count pulse (rising edge) PV : Command value for counter R : Reset (CV to 0) Q : if PV is reached, set Q to TRUE CV : actual counter value Count Down, counts from PV down to zero CD : Count pulse (rising edge) PV : Start value for counter LD : Load start value from PV into CV Q : If PV = 0, than set Q to TRUE CV : actual counter value

CTD

CD: R_TRIG (BOOL) LD: BOOL PV: INT

Q: BOOL ET: TIME

CTUD

CU, CD: R_TRIG (BOOL) R, LD: BOOL PV: INT

QU, QD: BOOL Up / Down Counter CV: INT QU : If CV Max. value is reached set QU to TRUE QD : If CV Min. value is reached, set QD to TRUE , Rest like CTU and CTD

Exercises

CHAP 21

Chapter 21 Exercises

2004
This manual is the exclusive property of ROBERT BOSCH GMBH, also in the case of Intellectual Property Right applications. Without their consent it may not be reproduced or given to third parties. Errors and technical modifications reserved.

Exercises Network structure Subnet : 255.255.255.0 192.168.1.101


PC_1

CHAP 21

192.168.1.11
L40_1

192.168.1.102
PC_2

192.168.1.12
L40_2

192.168.1.103
PC_3

S W I T C

192.168.1.13
L40_1

192.168.1.14
L40_2

192.168.1.15
L40_5

192.168.1.108
PC_8

192.168.1.200
Trainer1

Exercises I/O Bus Configuration


OnBoard I/Os L40 I0.0 ... I0.7

CHAP 21

Q0.0 ... Q0.7

Rexroth Inline > Type : R IB IL 24 DI 16 Interbus L40 I8.0 ... I9.7

Rexroth Inline > Type : R IB IL 24 DO 16 Q8.0 ... Q9.7

B IO K DP > Type : 16DI / 16DA ProfibusDP Master 10 I4.0 ... I5.7 Q4.0...Q5.7 Switch box

RILB PB 24 > Type : ILB PB 24 DI16 DO16 12 I60.0 ... I61.7 Q60.0...Q61.7 Robot & Transport slide

RILB PB 24 > Type : ILB PB 24 DI16 DO16 I62.0 ... I63.7 13 Q62.0...Q63.7 Press In Station

Exercises Program structure

CHAP 21

Exercises Global Variables Inputs and Outputs

CHAP 21

Exercises Signal list Switch Box (Bit signals)


Inputs I4.0 I4.1 I4.2 I4.3 I4.4 I4.5 I4.6 I4.7 I5.0 I5.1 I5.2 I5.3 I5.4 I5.5 I5.6 I5.7 Outputs Q4.0 Q4.1 Q4.2 Q4.3 Q4.4 Q4.5 Q4.6 Q4.7 Q5.0 Q5.1 Q5.2 Q5.3 Q5.4 Q5.5 Q5.6 Q5.7 Inputs I4 I5 I4 Q4 Q5 Q4 M20.0 M20.1 M20.2 M20.3 _S0 _S1 _S2 _S3 _S4 _S5 _S6 _S7 _S8 _S9 _S10 _S11 _S12 _S13 _S14 _S15 _Y0 _Y1 _Y2 _Y3 _Y4 _Y5 _Y6 _Y7 _Y8 _Y9 _Y10 _Y11 _Y12 _Y13 _Y14 _Y15 _S0_S7 _S8_S15 _S0_S15 _Y0_Y7 _Y8_Y15 _Y0_Y15 _Auto _manual _Jog _Special Switch 0 Switch 1 Switch 2 Switch 3 Switch 4 Switch 5 Switch 6 Switch 7 Switch 8 Switch 9 Switch 10 Switch 11 Switch 12 Switch 13 Switch 14 Switch 15 Led 0 Led 1 Led 2 Led 3 Led 4 Led 5 Led 6 Led 7 Led 8 Led 9 Led 10 Led 11 Led 12 Led 13 Led 14 Led 15 Byte Byte Word Byte Byte Word

CHAP 21

Signal list Switch Box (Byte & Word)

Outputs

Signal Markers
Automatic mode manual mode Jog mode Special mode

Exercises Example 1

CHAP 21

Example 2

Exercises Example 3

CHAP 21

Exercises Example 4

CHAP 21

Exercises Example 5

CHAP 21

Exercises Example 6

CHAP 21

10

Exercises

CHAP 21

11

AND before OR Circuit

S10 S11 S12

& O >=1

S20 S21

& + = Y7

Exercises

CHAP 21

12

Circuit with bracket

S1 S2 S3 S10 S11 & >=1

&

S12 S13 S17

&

S18 S20 S21 &

>=1

Y8

Exercises

CHAP 21

13

Circuit with ORbracket

S12 S13 S2 S3 O & >=1

& O

S4 S5

&

S16 S19

>=1 & S21 O S22 + = Y9

Transportation Slide
I61.1 Q61.0 Q60.7 I61.2

I60.7

I61.0

PressIn Station Exercises Robot Station


Q60.5 Q60.4 I62.0 I60.5 I60.3 I60.2 I60.4 I60.6 Q60.6 I62.4 Q62.0 Q62.4 I62.2 Q62.2 Q62.3 I62.3 I62.7

Q60.0

I60.0 Q60.3

I62.6

Q62.1

Q62.5 I62.5

CHAP 21

I62.1 Q60.1 I60.1

14

Q60.2

Exercises Signal list machine model


Robot Station Inputs Address
I60.0 I60.1 I60.2 I60.3 I60.4 I60.5 I60.6

CHAP 21

15

Symbol name
301S101B 301S101A 301S201A 301S201B 301S301A 301S301B 301S401A

Robot Rotation Arm at top Robot Rotation Arm at bottom Robot Rotation Arm at right Robot Rotation Arm at left Robot Rotation Arm at front Robot Rotation Arm at rear Robot Gripper closed

Comment

Outputs Address
Q60.0 Q60.1 Q60.2 Q60.3 Q60.4 Q60.5 Q60.6

Symbol name
301Y101B 301Y101A 301Y201B 301Y201A 301Y301A 301Y301B 301Y401A

Move Robot Rotation Arm Up Move Robot Rotation Arm Down Move Robot Rotation Arm to the left Move Robot Rotation Arm to the right Move Robot Arm to the front Move Robot Arm to the back Close Robot Gripper

Comment

Transportation slide Inputs Address


I60.7 I61.0 I61.1 I61.2 I63.0

Symbol name
401S101B 401S101A 401S101 401S201 400S600

Transportation slide at front Transportation slide at rear Transportation slide occupied at front Transportation slide occupied at rear PressIn ready

Comment

Outputs Address
Q60.7 Q61.0 Q61.1

Symbol name
401Y101B 401Y101A 400Y600

Transportation slide backward Transportation slide forward Enable signal Robot station ready

Comment

Exercises Signal list machine model


Press In station Inputs Address
I62.0 I62.1 I62.2 I62.3 I62.4 I62.5 I62.6 I62.7 I63.0

CHAP 21

16

Symbol name
501S101B 501S101A 501S201B 501S201A 501S301B 501S301A 501S101 501S201 500S600

Safety gate at top Safety gate at bottom Horizontal unit at front Horizontal unit at rear Press In unit at top Press In unit at bottom Part present at front Part present at rear Robot ready

Comment

Outputs Address
Q62.0 Q62.1 Q62.2 Q62.3 Q62.4 Q62.5 Q62.6

Symbol name
501Y201B 501Y201A 501Y101B 501Y101A 501Y301B 501Y301A

Safety gate up Safety gate down Pusher forward Pusher backward Press In unit up Press In unit down Enable signal Press InStation ready

Comment

500Y600

Exercise Exercise Programming of a Function


Movement from Work to Base Position

CHAP 21

17

Set movement to Work Reset movement to Base

Movement from Base to Work Position

Set movement to Base Reset movement to Work

Callup PLC_PRG >

Manual_Move_Robot >

Base_Move

Work_Move >

Exercise Exercise Programming of a Function


Logic from Base to Work Position

CHAP 21

18

Logic from Work to Base Position

Switch assignment Switch box _S7 _S6 _S5 _S4 _S3 _S2 _S1 _S0

Jog Mode

Jog

Door

Start

Jog Work

Jog Base

EStop

Manual Auto

_S15

_S14

_S13

_S12

_S11

_S10

_S9

_S8

Pusher Forw Backw

Gate Up Down

PressIn Up Down

Slide. Forw Backw

Gripper Close Open

Robot Forw Backw

Robot right Left

Robot Up Down

Exercise Exercise Programming of a Function Block

CHAP 21

19

Switch assignment Switch box _S7 _S6 _S5 _S4 _S3 _S2 _S1 _S0

Jog Mode

Jog

Door

Start

Jog Work

Jog Base

EStop

Manual Auto

_S15

_S14

_S13

_S12

_S11

_S10

_S9

_S8

Pusher Forw Backw

Gate Up Down

PressIn Up Down

Slide. Forw Backw

Gripper Close Open

Robot Forw Backw

Robot right Left

Robot Up Down

Callup PLC_PRG

Manual_Move_Stat120

Instances of BaseMoveFB

>

>

Exercise

CHAP 21

20

Exercise Programming of a Function Block Manual logic


Local variables

Logic Manual Mode => Input Manual = TRUE

Exercise

CHAP 21

21

Exercise Programming of a Function Block Automatic logic


Logic Automatic Mode => Input Manual = FALSE

Logic Set outputs

Exercises Automatic Sequence Robot Station

CHAP 21

22

Exercises Automatic Sequence Robot Station

CHAP 21

23

Exercises Automatic Sequence Robot Station

CHAP 21

24

Exercises Automatic Sequence Transportation Slide

CHAP 21

25

Exercises Automatic Sequence Press In Station

CHAP 21

26

Exercises Automatic Sequence Press In Station

CHAP 21

27

You might also like