Training manual Indralogic Basic Revision 04 / 2007 Mobile Hydraulics Service Automation Pneumatics Linear Motion Assembly Technologies Electric Drives and Controls Industrial Hydraulics didactic from Rexroth. Systematic Success
Oct 27, 2014
Training manualIndralogic BasicRevision 04 / 2007
MobileHydraulics
ServiceAutomationPneumatics
Linear MotionAssembly Technologies
Electric Drivesand Controls
IndustrialHydraulics
didactic from Rexroth. Systematic Success
Revision04 / 2007
Indralogic Basic
Impressum
Publisher:Bosch Rexroth AGService Automationdidactic
Author: Helmut Kleinhans BRC / SAL2
Impressum Nachdruck, Vervielfältigung undÜbersetzung, auch auszugsweise,
Herausgeber: nur mit unserer vorherigen schrift-Bosch Rexroth AG lichen Zustimmung und mit Quellen-Service Automation angabe gestattet. Wir übernehmendidactic keine Haftung für die Übereinstim-
mung des Inhalts mit den jeweilsgeltenden gesetzlichen Vorschriften.
Reproduction, copying, or trans-lation of this publication, wholly orin part, only with our previous writtenpermission and with source credit.We assume no responsibility foragreement of the contents with locallaws and regulations.Bosch Rexroth AG is exempt fromliability, and reserves the right tomake changes at any time.
ITable of Contents
Chapter 1 −−−> Network installation
Setup of the “Network Neighborhood” in Windows 2000 1 Setup of the “Network Neighborhood” in Windows 2000 2 Setup of the “Network Neighbourhood” in Windows 2000 3 Setup of the “Network Neighborhood” in Windows 2000 4 Setup of the “Network Neighborhood” in Windows 2000 5 Setup of the “Network Neighbourhood” in Windows XP 6 Setup of the “Network Neighbourhood” in Windows XP 7 Setup of the “Network Neighbourhood” in Windows XP 8 Setup of the “Network Neighbourhood” in Windows XP 9 Setup of the “Network Neighbourhood” in Windows XP 10 Functional overview 11 Hardware stucture of IndraControl L40 12 Features 12 Mechanical structure 13 Connectionss and interfaces 13 Current and voltage supply 14 I/O connections 15 First time installation L40 − IP−Address setup 16 Firmware− Hardware version & Status display L40 17 Setup of L40 serial RS232 interface 18 Display of L40 Project status 19 Deletion of complete L40 Program−Memory 20
Chapter 2 −−−> Basic setup IndraWorks / IndraLogic
Language and Basic settings for “IndraWorks” 1 Generation of a new “IndraWorks” Project 2 Generation of a new “IndraWorks” Project (continuation) 3 Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC) 4 Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC) 5 Definition of communication channel for VPP/BTV−Panel (Software−PLC) 6 Definition of communication channel for VPP/BTV−Panel (Software−PLC) 7 Completion of communication setup / creation of the new project 8 Communication with a “L40” / “VEPxx” (Hardware − PLC) 9 Communication with a “VPP / BTV“ − Panel (Software − PLC) 10 IndraWorks / Indralogic directory structure 11 IndraWorks / IndraLogic Basic settings 12
IITable of Contents
Chapter 3 −−−> IndraWorks I/O Configuration
Setup of I/O Start address of OnBoard I/O’s 1 Configuration of Rexroth Inline Modules (first Inline−Modul) 2 Configuration of Rexroth Inline Modules (first Inline−Modul) 3 Configuration of Rexroth Inline Modules (second Inline−Modul) 4 Configuration of Rexroth Inline Modules (second Inline−Modul) 5 Import of additional GSD−Files for Profibus−DP I/O−Configuration 6 Import of additional GSD−Files for Profibus−DP I/O−Configuration 7 Directory structure of GSD−Files 7 Configuration of Profibus−DP I/O − Modules 8 Configuration of Profibus−DP I/O − Modules 9 Configuration of Profibus−DP I/O − Modules 10 Configuration of Function − Modules 11 Setup of the Profibus−DP transmission rate 12 Load Profibus−DP Configuration into PLC−Controller 13 Load Profibus−DP Configuration into PLC−Controller 14 Load Profibus−DP Configuration into PLC−Controller 15
Chapter 4 −−−> IndraLogic basic settings
Setting the basic parameters for Indralogic − “Load & Save“ 1 Setting the basic parameters for Indralogic − “Editor” 2 Setting the basic parameters for Indralogic − “Desktop” 3 Setting the basic parameters for Indralogic − “Directories” 4 Setting the basic parameters for Indralogic − “Build” 5 Setting the basic parameters for Indralogic − “Source download” 6 IndraLogic − “Symbol configuration” 7 IndraLogic − “Symbol configuration” 8 “Target System” − Basic setup − “General” 9 “Target System” − Basic setup − “General” 10 Project structure 11 Main program “PLC_PRG” 11 IndraLogic directory structure on harddrive (Development system) 12 IndraLogic directory structure on harddrive (Project data) 13 Files in the Indralogic programming system 14 Display structure IndraLogic 15 Generation of a new “Folder” 16 Generation of a new “Object” 17 Elements of Program Organization Units (POU) 18 Elements of Program Organization Units (POU) 19 Programming languages for POU’s 19 Elements of a Program Organization Unit (POU) 20 Elements of Program Organization Units (POU) 21 Deklaration section of Program Organisation Units (POU) 22 Characteristics of the POU−Interface 23 Formal parameters and Return values of a POU 24 External and internal access to POE−Variables 25
IIITable of Contents
Chapter 5 −−−> Load Program
Load options and Memory structure 1 Used / Generated files 2 Check and compile complete PLC−Program 3 Check interface setting to PLC (IP−Address) 4 Load PLC−Program into the PLC 5 Generate “Boot Project” in PLC−Controller 6
Chapter 6 −−−> Import / Export of Program blocks
Export of Project data 1 Export of Project data 2 Import of exported project data 3 Import of exported project data 4
Chapter 7 −−−> Programming with Logic
Address definition of Inputs, Outputs and Markers 1 Definition of Input, Outputs and Markers 2 Using bit signals in the program 2 Monitoring of Bit−Signals 3 Standard Data Types in Indralogic 4 Validity of Variables 5 Declaration of Variables 6 Declaration of Constants 7 Global Variables in POU’s via “VAR_EXTERNAL” 8 Online − Status display of variables in declaration window 9 Resizing the Online Window 10 Selection of display format in Online mode 11
IVTable of Contents
Chapter 8 −−−> Programming in List
Creation of a program in LIST 1 Calling of POU’s with and without parameters in “LIST” 2 Programming of logic operations in LIST (Example 1) 3 Programming of logic operations in LIST (Example 2) 4 Programming of logic operations in LIST (Example 3) 5 Programming of logic operations in LIST (Example 4) 6 Programming of logic operations in LIST (Example 5) 7 Monitor display in LIST (PRG’s) 8 Creation of a “Function” in LIST 9 Definition and Usage of a “Function” (FUN) 10 Online − Status display of “Functions” 11 Creation of a “Function block” in LIST 12 Definition and Usage of a “Function block” (FB) 13 Definition and Usage of a “Function block” (FB) 14 Online − Status display of “Function blocks” 15 Online − Status display of “Function blocks” 16
Chapter 9 −−−> Programming in Ladder
Creation of a program in LDR 1 Input of a program in LDR 2 Alteration of program in LDR 3 Addition of a new OR − Element 3 Addition of a new “AND” element 3 Adding a new LDR−Network branch 4 Addition of “Function blocks” in LDR 5 Addition of “FBD−Operators” in LDR 6 Addition of “FBD−Operators” in LDR 7 Call of Programs (PRG’s) in LDR 8 Call of Programs (PRG’s) in LDR 9 Call of Functions (FUN’s) in LDR 10 Call of Function Blocks (FB’s) in LDR 11 Conditional calls of PRG’s, FUN’s and FB’s in LDR 12 Online display of POU’s written in LDR 13 Additional display options in LDR 14 Comment input in LDR 15 Jump instruction in LDR 16
VTable of Contents
Chapter 10 −−−> Programming in FBD
Creation of a program in FBD 1 Input of a program in FBD 2 Adding of new Logic − Elements in FBD 3 Definition / Alteration the logic or function of a Basic−FBD−Element 4 Deletion of Inputs, Outputs and Elements 5 Adding a new FBD−Network 6 Direct switchover from “FBD” to “LDR” display 7 Monitor display in FBD 8 Input of Comment in FBD 9 Jumps in FBD 10 Call of Programs, Functions and Function blocks in FBD 11 Call of Programs, Functions and Function blocks in FBD 12 Definition and usage of Timers 13 Definition and usage of Timers 14 Monitoring of Timers / Diagram Switch On Delay (TON) 15 Monitoring of Timers / Diagram Switch Off Delay (TOF) 16 Monitoring of Timers / Diagram Pulse function (TP) 17 Monitoring of Timers / Diagram Real Time Clock (RTC) 18 Definition and usage of Counters 19 Definition and usage of Counters 20 Online − Status display Up Counter (CTU) 21 Online − Status display Down Counter (CTD) 22 Online − Status display Up / Down Counter (CTUD) 23
VITable of Contents
Chapter 11 −−−> Sequence programming
Selection of IEC compliant SFC Input Mode 1 IEC−Step−Action commands 2 Creation of an IEC−Sequence program 3 Adding a new step element 4 Copy / Paste an existing “Step” in a “Sequence” module 5 Deletion of an existing Step−Element 6 Adding a new Step − Action 7 Deletion of a Step−Action 8 Programming of a step continuation logic 9 Programming of a step continuation logic (continuation) 10 Programming an Action−Logic 11 Programming an Action−Logic (continuation) 12 Programming a step “Entry” logic 13 Programming a step “Entry” logic (continuation) 14 Programming a step “Exit” logic 15 Programming a step “Exit” logic (continuation) 16 Deletion of a step “Entry” or “Exit” logic 17 Step−Property−Variables 18 Step−Prpoperty−Flags 19 Step−Property−Flags 20 Programming of Step−Property−Flags 21 Online display of Step−Property−Flags 22 Sample sequence program in “LDR” − Step elements & Parameters 23 Sample sequence program in “LDR” − Continuation logic 24 Sample sequence program in “LDR” − Command output 25 Sample sequence program in “LDR” − Program callup 26 Sequence Branching / Jump 27 Sequence Branching / Jump 28 Sample program sequence Branching / Jump 29 Input of “Step” comment and “Step” monitoring time 30 Selection of “step comment” or “Step monitoring time” display 31
VIITable of Contents
Chapter 12 −−−> Programming in ST
Logic operations with “Structured Text” (ST) 1 Logic operations with “Structured Text” (ST) 2 Calling program modules (PRG’s) 3 Definition and usage of Functions (FUN) 4 Function parameter input 5 Online − Status display of of Functions 6 Definition and usage of Function Blocks (FB) 7 Definition of an instance for a function block (Memory allocation) 8 Monitoring of Function Blocks 9 Monitoring of Function Blocks 10 Selection of SFC Input Mode (simlified SFC non IEC) 11 Creation of a SFC−Sequence programm 12 Add a new step element 13 Copy / Paste an existing “Step” in a “Sequence” module 14 Deletion of an existing Step−Element 15 Programming a step 16 Sample Sequence program “ST” − Step elements & Parameters 17 Sample Sequence program “ST” − Continuation logic 18 Sample Sequence program “ST” − Command output 19 Sample Sequence program “ST” − Module callup 20 Sequence Branching / Jump 21 Sequence Branching / Jump 22 Sample program sequence Branching / Jump 23 Sample program sequence Branching / Jump 24
Chapter 13 −−−> Task managment
Applications with Task managemant 1 Time related behavier of Tasks 2 Creation of a new Task 3 Creation of a Task − Definition of the Task properties 4 Creation of a Task − Definition of a program module 5 Description of properties − Cyclic Task 6 Description of properties − Free wheeling Task 7 Description of properties − Event controlled Task 8 Description of properties − External Event controlled Task (Interrupt) 9 Description of properties − System events 10 Display of “Task Timing Diagram” in Online mode 11
Chapter 14 −−−> Library managment
Insertion of a new library into the current project 1 Insertion of a new library into the current project 2
VIIITable of Contents
Chapter 15 −−−> Remanence behaviour of variables
Behavier of variables after Power Off / ON and Stop / Run (Remanence) 1 Declaration of remanent variables 2 Usage of remanent variables in POU’s 3 Usage of remanent variablen in POU’s 4
Chapter 16 −−−> Monitoring
Monitoring the program flow 1 Enter variable list into “Watch & Recipe Manager“ 2 Online display of variable list with “Watch and Recipe Manager” 3 Read and alter Variables with “Recipe” Manager 4 Write Variables from “ Recipe Manager” into PLC 5 Activation of the “Trace” Function 6 Definition of “Trace” Parameters 7 Definition of “Trace” Parameters 8 Definition of “Trace” Parameter 9 Start of a “Trace” sample recording 10 Start of a “Trace” sample recording 11
Chapter 17 −−−> User specific data structures
Definition of Enumerations 1 Using enumerations in the program 1 Monitoring of enumerations 2 Definition and usage of Structures 3 Using structures in the program 3 Monitoring of structures of userspecific data types 4 Status display in the program 4 Status display in the “Ressources” 4
IXTable of Contents
Chapter 18 Backup & Restoring an IndraWorks − Project
Backup of a complete IndraWorks − Project 1 Backup of a complete IndraWorks − Project 2 Backup of a complete IndraWorks − Project 3 Restoring of an archived IndraWorks−Project (ZIP−File) 4 Restoring of an archived IndraWorks−Project (ZIP−File) 5 Restoring of an archived IndraWorks−Project (ZIP−File) 6 Restoring of an archived IndraWorks−Project (ZIP−File) 7 Restoring of an archived IndraWorks−Project (ZIP−File) 8 Adaption of the PLC−Directories 9 Importing a Standalone IndraLogic Program (*.PRO−File) 10 Importing a Standalone IndraLogic Program (*.PRO−File) 11 Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC) 12 Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC) 13 Importing a Standalone IndraLogic Program (*.PRO−File) 14 Importing a Standalone IndraLogic Program (*.PRO−File) 15 Importing a Standalone IndraLogic Program (*.PRO−File) 16 Importing a Standalone IndraLogic Program (*.PRO−File) 17
Chapter 19 Language translation
Generation of the translation file 1 Generation of the translation file 2 Input of the translations into the translation file 3 Input of the translations into the translation file 4 Switchover to another language 5
XTable of Contents
Chapter 20 Command overview
Identifier, Keywords 1 Identifier, Keywords 2 Numerical literals 3 String-Literals 3 Time literals 1. Duration of time 3 Date and Time 4 Boolean Operators 4 Arithmetical Operators 5 Compare Operators 6 Bit manipulation 7 Type conversion 8 Numeric Functions 9 Numeric Functions 10 Selection Function 11 String Functions 12 String Funktions 13 Standard-Function blocks Flip Flop Elements 14 Flankenerkennung 14 Timer 14 Counter 15
XITable of Contents
Chapter 21 Exercises
Network structure 1 I/O − Bus Configuration 2 Program structure 3 Global Variables Inputs and Outputs 4 Signal list Switch Box (Bit signals) 5 Signal list Switch Box (Byte & Word) 5 Signal Markers 5 Example 1 6 Example 3 7 Example 4 8 Example 5 9 Example 6 10 AND before OR Circuit 11 Circuit with bracket 12 Circuit with OR−bracket 13 Transportation Slide 14 Signal list machine model 15 Signal list machine model 16 Exercise Programming of a Function 17 Exercise Programming of a Function 18 Exercise Programming of a Function Block 19 Exercise Programming of a Function Block − Manual logic 20 Exercise Programming of a Function Block − Automatic logic 21 Automatic Sequence “Robot Station” 22 Automatic Sequence “Robot Station” 23 Automatic Sequence “Robot Station” 24 Automatic Sequence “Transportation Slide” 25 Automatic Sequence “Press In Station” 26 Automatic Sequence “Press In Station” 27
© 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 thirdparties.Errors and technical modifications reserved.
CHAP 1 INetwork
Chapter 1Network
Installation
CHAP 1TCP/IP Installation 1
Setup of the “Network Neighborhood” in Windows 2000
Note ! Before the setup of the “Network Neighborhood”, the a “Network−card” musthave been installed
1. Call−up the Windows “Control Panel” and double click on the “System” icon
CHAP 1TCP/IP Installation 2
Setup of the “Network Neighborhood” in Windows 2000
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 thenetwork
Note !• The “Workgroup” name must be
the same on all computers on thenetwork, which should belong to this group
CHAP 1TCP/IP Installation 3
Setup of the “Network Neighbourhood” in Windows 2000
4. Call−up the Windows “Control Panel” and double click on the“Network and Dial−up Connections” icon
5. Open the network connection for which you want to set the IP−Address
CHAP 1TCP/IP Installation 4
Setup of the “Network Neighborhood” in Windows 2000
6. Click onto “Properties”, to open the “TCP/IP−Property” window
7. Select entry “Internet Protokol (TCP/IP)” and click onto button “Properties”
CHAP 1TCP/IP Installation 5
Setup of the “Network Neighborhood” in Windows 20008. Enter the “IP−address” and the “Subnet mask”
IP−Address
Subnet mask
No entry required in the“Default gateway” field
Important note !It is not recommended to makeany other alterations orchanges in the “Network” properties window
CHAP 1TCP/IP Installation 6
Setup of the “Network Neighbourhood” in Windows XP
Note ! Before the setup of the “Network Neighbourhood”, the a “Network Card” musthave been installed
1. Call−up the Windows “Control Panel” via the “Start” button
2. Double click on the “System” icon
CHAP 1TCP/IP Installation 7
Setup of the “Network Neighbourhood” in Windows XP
3. Click onto tab “Computer name”
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 computersbelonging to this group
CHAP 1TCP/IP Installation 8
Setup of the “Network Neighbourhood” in Windows XP5. Call−up the Windows “Control Panel” and double click on the
“Network and Dial−up Connections” icon
6. Open the “Property” window by double clicking onto the network connection for which you want to set the IP−Address
CHAP 1TCP/IP Installation 9
Setup of the “Network Neighbourhood” in Windows XP
7. Click onto “Properties”, to open the “TCP/IP−Property” window
8. Select entry “Internet Protokol (TCP/IP)” and click onto button “Properties”
CHAP 1TCP/IP Installation 10
Setup of the “Network Neighbourhood” in Windows XP
IP−Adresse
Subnet Mask
9. Enter the “IP−address” and the “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
CHAP 1 11Hardware L40 & Network − Installation
Functional overview
Status−Display Ethernet connection for Onboard I/O
8 characters − Programming unit or 8 fast inputsOperating panel − communication to: usable as interrupt inputs 4 Buttons New controls 8 outputs (0,5 A)e.g. adjustment of the (NetVarUDPLib) orcommunication parameters or to the old CLxx world
(BuepE_Client) power supply terminal
Inline I/O
Extension withRexroth−Inline−Modules
max. 64 Modulesmax. 32Byte I and O
Extension− RS232−interface for Progr. memory Profibus DP−V1interface − COM PROG 32 MB RAM max. 8 k I/Ofor Programming unit 64 kB NvRAM Add DP−Slaves toFunction− − COM SERV Boot project I/O configurationmodules small operation panel Remanence Access to VCP panel
− COM USER new File types (IL_VCP_DP)Programming unit or Acyclic Services (V1)
. serial communication DP_Diag via functionwith SysLibCom DP_RDREC,
DP_WRREC
CHAP 1 12Hardware L40 & Network − Installation
Hardware stucture of IndraControl L40IndraControl 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 withI/O modules of the Inline−System. The functionality of the IndraControl L40−System can beenhanced 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.
FeaturesUser 32 MB Runtime Indralogic (according memory to EC 61131−3)
Remanent 64 kByte Programming according to IEC61131−3:memory languages IL, LAD, FBS, ST, SFC, CFC
Number of tasks 16 Programming Rexroth IndraWorkssystem
Task types cyclic, free wheeling, Programming Ethernet or RS232event controlled interface
In−/ Outputs 8 Bit I (interrupt) Functions for Monitoring, Online Change, + 8 Bit O on board monitoring Trace, Write (1 cycle) /
Forcing,512 Bit I/O (central) Simulation, Breakpoint,8 kByte I/O (decentral single step, single cyclevia Profibus−DP V1)
Cycle time typical 120 µs Supplied Standard IEC 6131−3 library(1000 Instr. of IL) libraries TCP/IP + ser. communication,
VCP interface, DP_Diagnosis
CHAP 1 13Hardware L40 & Network − Installation
Mechanical structureThe 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 themetallic ground plate of the L40 as a cooling element.
The power supply voltages and the Onboard− in− and Outputs are wired via theInline− terminals. Sensors and actors at the Onboard− I/O’s are connected with a 2−wiretechnique (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 ofa control cabinet or a similar housing. The prefered mounting position is horizontal. Due to thermic reasons, a vertical mounting isnot recommended.
Connectionss and interfaces
Label on housing Interface type Connector type
X3C Serial interface RS232 D−Sub−connector (male), 9−poles
X7E Network interface:Ethernet 10Base T / 100Base X
RJ45−connector (female)
X7P DP: PROFIBUS DP D−Sub−connector (female),9−poles
For more informations please see manual:Indracontrol L40 Chapter 7 − “Connections and interfaces”
CHAP 1 14Hardware L40 & Network − Installation
Current and voltage supplyThe 24V power supply used to supply power to the L40, has to be equipped with a savecircuit 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 ofeach 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 isreached (current sum of US and UM), a new (additional) power supply terminal must beused.
For more informations please see manual:Indracontrol L40 Chapter 7.2 − “Power supply”
CHAP 1 15Hardware L40 & Network − Installation
I/O connections
I
N
T
E
R
B
U
S
CPU
Onboard I/O
I/O at localExpansioninterface
Profibus DP I/O
1 Byte Input (can be used as interrupt input)1 Byte Output
max. 125 DP−Slavesmax. 12 MBaudmax. 244Byte/telegrammmax. 8 kByte I / O
max. 32 Byte I / Ovia Inline−Modules
Master
Node 1
Node 0
Node 2
. . .2 126..
National Geode SC1100min. 266 MHz32 MB DRAM + 64 kByte NvRAM
CHAP 1 16Hardware L40 & Network − Installation
First time installation L40 − IP−Address setup
INIT
Enter Ethernet
Enter
IP : 10.23.1.27
EnterESC
Abort
Enter
AAA : 192
Enter
BBB : 168
Enter
CCC : 1
Enter
DDD : 11
Enter
OK : ?
Confirm
Display
Input
Ethernet
Enter
IP : 10.23.1.27
Display IP Adrress
Subnet : 255.255.0.0
EnterESC
Abort
Enter
AAA : 255
Enter
BBB : 255
Enter
CCC : 255
Enter
DDD : 0
Enter
OK : ?
Confirm
Input
Display Subnet Mask
RUN STOP
Enter
CHAP 1 17Hardware L40 & Network − Installation
Firmware− Hardware version & Status display L40
INIT
Enter Ethernet
RS 232
ESC Abort
Firmware Enter
Selection
RUN STOP
03V03
ESC Abort
Hardware CML 40.1−NP−220−NAEnter
ESC Abort
Temp + 44,0CEnter
ESC Abort
OHC CTRL 1018 hEnter
ESC Abort
OHC FAN 0 hEnter
Display
CHAP 1 18Hardware L40 & Network − Installation
Setup of L40 serial RS232 interface
INIT
Enter Ethernet
RS 232
COM SERV
Enter
Selection
RUN STOP
COM : SERVEnter
COM : USER
COM : PROG
Enter
Enter
Enter
EnterESC
Abort
OK : ?
Confirm
EnterESC
Abort
OK : ?
EnterESC
Abort
OK : ?
Confirm
Confirm
CHAP 1 19Hardware L40 & Network − Installation
Display of L40 Project status
RUN
Enter
PLC:OK
Outp. ON
PLC RUN
PLC PROJ
Enter OUTP: ON
OUTP: OFF
ESC Enter
Abort Confirm
Enter PLC: RUN
PLC: STOP
ESC Enter
Abort Confirm
Enter
PROJ:L40_Name.pro
PROJ−DATE : DT#2006−08−16−09:30:23
PROJ−SIZE : 456678 Byte
ESC Abort
CHAP 1 20Hardware L40 & Network − Installation
Deletion of complete L40 Program−Memory
HW WATCH
BOOT1.01
EnterESC
1. Disconnect L40 from supply voltage.2. Reconnect L40 to supply voltage
+ 4. Press both keys at the same time and keep them pressed
3. Wait until you see this message
BOOT1.02
Enter
5. Wait until you see this message, than release the two keys
BOOT1.03
BOOT1.04
Bootproj
delete ?
Enter
Enter
ESC Exit
OK : ?
Confirm deletion
Bootproj
INIT
6. Complete L40 program memory has been deleted and PLC− Program has to be loaded 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.
CHAP 2 IIndraWorks Projects
Chapter 2
IndraWorks
Projects
CHAP 2IndraWorks Projects 1
Language and Basic settings for “IndraWorks”
Click onto “Tools / Options”, to setthe basic parameters of “IndraWorks”
Default directory for “IndraWorks” projects
Language setting forUser Interface
Menu parameters
CHAP 2IndraWorks Projects 2
Generation of a new “IndraWorks” Project
1. Click onto “Drive and Control“, todisplay 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
CHAP 2IndraWorks Projects 3
Generation of a new “IndraWorks” Project (continuation)
5. Select desired “Target System” with the left mousebutton 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
CHAP 2IndraWorks Projects 4
Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC)
12. Select “Local” and confirm by clicking onto the “OK” button
10. Callup the communication window, in order to enter theparameters to be used for the connection with the “Target System”
11. Click onto “Gateway”, to setup theparameters for a local “Gateway − Server”
8. Select desired firmware version
9. Click onto button “Extended” to select “BYTE” or “WORD” addressing mode
CHAP 2IndraWorks Projects 5
Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC)
14. Select communication channel“Tcp/Ip (Level 2 Route)”
13. Click onto “New” to create a newcommunication channel
16. Enter the IP−Address of the “L40” controller to which you want to make a connection and confirm the input by pressing the “Enter” key
15. Open the input field for the IP−Address by double clickingonto “localhost”
17. Apply new settings by clicking onto the “OK” button
CHAP 2IndraWorks Projects 6
Definition of communication channel for VPP/BTV−Panel (Software−PLC)
10. Callup the communication window, in order toenter the parameters to be used for the connectionwith the “Target System”
12. Select communication channel“Tcp/Ip (Level 2 Route)”
11. Click onto “New” to create a newcommunication channel
CHAP 2IndraWorks Projects 7
Definition of communication channel for VPP/BTV−Panel (Software−PLC)
13. Click onto “Gateway”, to setup theparameters for an external “Gateway−Server”
14. Select “Tcp/Ip“
15. Enter the IP−Address of the“VPP/BTV”−Panel 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
CHAP 2IndraWorks Projects 8
Completion of communication setup / creation of the new project
Communication via a local Gateway−Server (L40)
Note !By clicking with the right mouse buttononto the icon “Logic”, the communicationwindow can be called up again by selecting“Properties”
CHAP 2IndraWorks Projects 9
Communication with a “L40” / “VEPxx” (Hardware − PLC)
IndraLogic Programming System − Target System “L40/VEP30”
Hardware − PLC (VxWorks)
External PC with IndraWorks / Indralogic
Communication via “Gateway” with “Local” (IP − 192.168.1.101)
L40 / VEP30
Network adapter (e.g. IP−Addresse = 192.168.1.50)
Integrated network adapter (e.g. IP − 192.168.1.101)
Gateway − Server
CHAP 2IndraWorks Projects 10
Communication with a “VPP / BTV“ − Panel (Software − PLC)
Gateway Server
Indralogic Programming System − Target System VPP/BTV
Software − PLC
External PC with IndraWorks / Indralogic
Communication via “Gateway” with TCP/IP (192.168.1.202)
VPP / BTV
Communication with “VxWin Shared Memory Network“ via local network IP−Address 192.168.0.2
Network adapter (e.g. IP−Address = 192.168.1.50)
Network adapter (e.g. IP − Address = 192.168.1.202
CHAP 2IndraWorks Projects 11
IndraWorks / Indralogic directory structure
“IndraWorks Project” directory
“Indralogic” Project directory
Directory with PLC−Program files
PLC−Program
CHAP 2IndraWorks Projects 12
IndraWorks / IndraLogic Basic settings
1. Select the icon “Logic” with the left mouse button, press the right mouse button and select “Properties”
2. Activate / Deactivate settings byclicking with the left mouse button on it
3. Check, if the directory for the I/O Confiiguration (GSD − Files) is correctDefault setting : C:\Program files\Rexroth\IndraWorks\IndraLogic\Targets\Config\
IndraWorks I/O Configuration CHAP 3
Chapter 3IndraWorks
I/O − Configuration
Nachdruck, Vervielfältigung und Übersetzung, auch auszugsweise,nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe
gestattet. Wir übernehmen keine Haftung für die Übereinstimmungdes Inhalts mit den jeweils geltenden gesetzlichen Vorschriften.
Reproduction, copying, or translation of this publication, wholly orin part, only with our previous written permission and with source credit.
We assume no responsibility for agreement of the contents with locallaws and regulations Bosch Rexroth AG is exempt from
liability, and reserves the right to make changes at any time.
CHAP 3IndraWorks I/O − Configuration 1
Setup of I/O Start address of OnBoard I/O’s
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”.
1. Open I/O − Window by double clicking on the address
2. Adapt “Input / Output“Start − Address
4. Check “Input / Output“ addresses
OnBoard Inputs OnBoard Outputs
3. Take over Start − Addressby clicking onto the “Apply” button
CHAP 3IndraWorks I/O − Configuration 2
Configuration of Rexroth Inline Modules (first Inline−Modul)
1. Click onto the button “Periphery”and select “Rexroth Inline”
2. Select the Inline−Module 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 mousebutton still pressed onto the icon “Inline I/O”, andrelease the left mouse button as soon as two littlesquares are displayed
CHAP 3IndraWorks I/O − Configuration 3
Configuration of Rexroth Inline Modules (first Inline−Modul)
6. Check, if the new address is correct(Caution ! Obey Word / Byte addressing mode)
4. Enter the I/O − Start address
5. Take over the new address by clickingonto the “Apply” button
CHAP 3IndraWorks I/O − Configuration 4
Configuration of Rexroth Inline Modules (second Inline−Modul)
Important note!The order in the configuration window, must match 100% the orderof the installed “Inline Modules”, otherwise a configuration error isdisplayed after the program has been loaded into the controller
7. Select the Inline−Module which has to be additionally inserted into the project with theleft 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”
CHAP 3IndraWorks I/O − Configuration 5
Configuration of Rexroth Inline Modules (second Inline−Modul)
9. Enter the I/O − Start address
10. Take over the new address by clickingonto the “Apply” button
11. Check, if the new address is correct(Caution ! Obey Word / Byte addressing mode)
CHAP 3IndraWorks I/O − Configuration 6
Import of additional GSD−Files for Profibus−DP I/O−Configuration
1. Click onto the button “Periphery”and select “ProfibusDP / I_O“
2. Check , if the required Profibus−DP I/O−Module is already existing in the selection list
3. Click with the left mouse button onto icon “Profibus−M”, press the right mouse button and select “Import GSD files”
4. Select the “GSD−Files” you want to add to the existing list,and take over the selection by clicking onto the “Open” button
CHAP 3IndraWorks I/O − Configuration 7
Import of additional GSD−Files for Profibus−DP I/O−Configuration
5. Check, if all imported “GSD−Files”are displayed in the list
Directory structure of GSD−Files
Note ! To remove an installed “GSD−File” from the list in “IndraWorks”, the file must be manually deleted from the “Config” − Directory
CHAP 3IndraWorks I/O − Configuration 8
Configuration of Profibus−DP I/O − Modules
1. Click onto the button “Periphery”and select “ProfibusDP / I_O“
2. Select the Profibus−DP module which has to be inserted into the project with the left mouse button, and keep the mouse button pressed
3. Drag the selected “Profibus−DP” 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
CHAP 3IndraWorks I/O − Configuration 9
Configuration of Profibus−DP I/O − Modules
Note !The window with the “Station” addresscan be called up again by double clickingonto the corresponding basic module
5. Enter the station address of the Profibus−DP I/O−Module,
4. To adapt the Profibus−Station Address, open the inserted module by double clicking on it
5. Take over the station address (Bus address) by clicking onto the “Apply” button
CHAP 3IndraWorks I/O − Configuration 10
Configuration of Profibus−DP I/O − Modules
6. Drag the selected “Type” of the I/O−Modulewith the left mouse button still pressed ontothe icon of the previously inserted “Basic” module, and release the left mouse button as soon as two little squares are displayed
9. Take over the new address byclicking onto the “Apply” button
10. Check, if the “Module Type” is correct(Caution ! Obey Word / Byte addressing mode)Note !The I/O−Address input window can be called upagain by double clicking onto the “Module Type”
8. Enter the I/O − Start address
7. To adapt the I/O−Start Address, open the inserted module by double clicking on it
CHAP 3IndraWorks I/O − Configuration 11
Configuration of Function − Modules
1. Click onto the button “FM”
2. Select the desired Function−Module, which isto be inserted into the project with the left mousebutton and keep the mouse button pressed
3. Drag the selected “Function−Module”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
4. To adapt the I/O−Start Address, open the inserted module by double clicking on it
6 Take over the new address byclicking onto the “Apply” button
5. Enter the I/O − Start addresses
CHAP 3IndraWorks I/O − Configuration 12
Setup of the Profibus−DP transmission rate
1. Open the “Bus parameter window” by double clicking onto the Icon “Profibus / M ”
2. Adapt the transmission rateaccording to the specificationof the used I/O−Modules
Note ! For the first time installation, it is recommended to set the “Transmission” rate to 1500MBit. As soon as the Profibus−DP runs in an error free state, the “Transmission” rate can be increased to the maximum value.
CHAP 3IndraWorks I/O−Configuration 13
Load Profibus−DP Configuration into PLC−Controller
1. Callup “IndraLogic” by double clicking withthe left mouse button onto the icon “Logic”
2. Click onto the tab “Ressources” and open the I/O−Configuration window by double clicking with the left mouse button onto “PLC Configuration” (<R> = is managed by “IndraWorks”)
3. Check, if the I/O−Configurationwas taken over from“IndraWorks” without errors
CHAP 3IndraWorks I/O−Configuration 14
Load Profibus−DP Configuration into PLC−Controller
4. Select “Project / Rebuild all” andcompile the Indralogic project
5. Check, if the project was compiled without erros
CHAP 3IndraWorks I/O−Configuration 15
Load Profibus−DP Configuration into PLC−Controller
6. Select “Online / Login” and load theIndraLogic project into the PLC−Controller
8. Check the function of the I/O−Modules and the status of the connected signalsj − Signalzustand ist “0” (False)J − Signalzustand = “1” (True)
7. After loading is completed, start the PLC− Program using “Online / Run”
IndraLogic Program structure CHAP 4
Kapitel 2Chapter 5CChapter 4
IndraLogicProgram structure
Nachdruck, Vervielfältigung und Übersetzung, auch auszugsweise,nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe
gestattet. Wir übernehmen keine Haftung für die Übereinstimmungdes Inhalts mit den jeweils geltenden gesetzlichen Vorschriften.
Reproduction, copying, or translation of this publication, wholly orin part, only with our previous written permission and with source credit.
We assume no responsibility for agreement of the contents with locallaws and regulations Bosch Rexroth AG is exempt from
liability, and reserves the right to make changes at any time.
CHAP 4IndraLogic Basic Setup 1
Setting the basic parameters for Indralogic − “Load & Save“
2. Click onto “Load & Save“, to define thesystem properties and the memory handling
1. Click onto “Project / Options“,to setup the basic parameters
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 requiredAuto 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 itAuto 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 lineSave 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
CHAP 4IndraLogic Basic Setup 2
Setting the basic parameters for Indralogic − “Editor”
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 not−yet−declared variable, the “Variable”
declaration window is called up automaticallyAutoformat• 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 BinarySurpress 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 selectedShow POU symbols• if this option is activated, icons will be displayed inside of the POU−Boxes, if they are stored as
bitmaps in the Library directory (POU−Name “TON” = Symbol name “TON.bmp”)
CHAP 4IndraLogic Basic Setup 3
Setting the basic parameters for Indralogic − “Desktop”
language selection for the User Interface, program code is notchanged (Code is always in “English”)Note ! Language selection is only possible under Windows NT,Windows 2000 und Windows XP möglich
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
MDI−representation• with active MDI−Option multiple windows can be opened• with deactivated MDI−Option only one window can be opened in Full Screen Mode
CHAP 4IndraLogic Basic Setup 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
CHAP 4IndraLogic Basic Setup 5
Setting the basic parameters for Indralogic − “Build”
Note!If the “Number of “Data” segmentsis 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
CHAP 4IndraLogic Basic Setup 6
Setting the basic parameters for Indralogic − “Source download”
Note !Source download requires time, when loading aprogram. If source is not required in PLC don’tdownload 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
CHAP 4IndraLogic Basic Setup 7
IndraLogic − “Symbol configuration”
FunctionThe settings made here, are used to configure the handling of the “Symbol file”“Projectname.sym” or as a Binary−File 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 XML−Version of the “Symbol file” (Projectname.SYM_XML)• both files will be stored into the project directoryConfiguration of the Symbol file entries with the button “Configure symbol file”• If the option “Symbol configuration from “INI−File” 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 “INI−File” is not activated in the “Target settings”, the symbol file entries will be generated according to the selection made with “Configure symbol file”
CHAP 4IndraLogic Basic Setup 8
IndraLogic − “Symbol configuration”
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
Select all objects from which the variableshave to be stored into the “Symbol file”
CHAP 4IndraLogic Basic Setup 9
“Target System” − Basic setup − “General”
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 ENI−Database
CHAP 4IndraLogic Basic Setup 10
“Target System” − Basic setup − “General”I/O−Configuration / No address check
An I/O−Address can be defined only once.n The same I/O address can be defined in several tasks.
Support preemptive multitaskingn 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 modeEach 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 ChangeLoading of changes requires a STOP of the controller.
n Changes are loaded without of a STOP of the controller.
Update unused I/O’sVariables 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 fileSymbol files are used as address references for external OPC−Clients or for the Communicationrequests 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 L40n The Symbol file is loaded into the L40
Symbol config from INI fileThe 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 BrowserThe 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.
TraceThe Trace function makes available a 8−channel Oscilloscope for digital and analogue values, whichcan 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 Flash−Memory
Retain forcing• The active forcings remain active, after a new program is loaded
11IndraLogic Project Structures CHAP 4
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 IndraLogicApplication
Callup of additionalPrograms, Functions and
Function Blocks
Update of output status
Functions of theIndralogic
Runtime system
IndraLogic Application( user specific program)
The module “PLC_PRG”has a special status among allother modules.
“PLC_PRG” is the only module,which is directly called by the“runtime system
Processing of forcing list outputs
12IndraLogic Project Structures CHAP 4
IndraLogic directory structure on harddrive (Development system)Um
Development systemDirectory structure is generated during theinstallation process
13IndraLogic Project Structures CHAP 4
IndraLogic directory structure on harddrive (Project data)Um
Example :
14IndraLogic Project Structures CHAP 4
Files in the Indralogic programming systemThe following table shows the predefined file extensions and their assignment to theused files:
File extension corresponding files
<Project name>.pro the IndraLogic project file *.lib, *.obj, *.hex libraries and if available the corresponding object and hex−files *.ci compiler information *.ri download/reference information IndraLogic.ini INI file
*.trg target files in binary format for all installed targets*.txt target files for the installed targets in text format, if available*.tnf target files in text format (only for installation − reference to *.trg)
*.cfg, *.gsd *.eds, files used for PLC configuration (configuration files, device files, *.dib, *.ico icons etc.) *.sdb, *.sym symbolic informations generated from the project
*.log project log file *.bmp bitmaps for project POUs and visualization
Retain.BIN Pointer to the adresses of remanent ’RETAIN’ variables, in NvRAM
Persist.DAT remanent ’PERSIST’ variables on the FLASH card
MPS.BIN Master Parameter Set for the Profibus−DP configuration
Ethernet.BIN Contains the IP address, Subnet Mask and Gateway address
Config.DAT Stored data of the control configuration
Bootrom.SYS Boot sector for VxWorks operating system
Default.STS Status of the control after a restart
Default.PRG Boot project − Program codeDefault.CHK Boot project − Checksum
Source.DAT Compressed source code stored on the FLASH card
15IndraLogic Project Structures CHAP 4
Display structure IndraLogic
Modules Data Types ResourcesVisualization
Declaration window for variables
Program window
Message and Error display
16IndraLogic Project Structures CHAP 4
Generation of a new “Folder”
1. Select level under which the new structure is to be generatede.g. POU’s
2. Press right mouse buttonand select “New Folder”
3. Select “New Folder” object, press right mouse buttonand select “Rename Object”
17IndraLogic Project Structures CHAP 4
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 buttonand select “Add Object”
3. Select “Type of POU”,“Language of POU” and enterthe “Name” of the new POU
CHAP 4IndraLogic Program Structures 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
• POU’s are the same as the Program, Organization, Sequence and Function modules used in the PLC−Programming 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
CHAP 4IndraLogic Program Structures 19
Elements of Program Organization Units (POU)
OM
PM
SM
FMDM
Organizationmodule
ProgrammoduleSequence
module
Datamodule
Functionmodule
(PRG)
(FB)
(FUN)
Programming languages for POU’s
POU − Type Keyword Description
Program Program Main program with allocation of PLC−I/O devices,Global Variables and Access Paths
Functionblock Function_Block Module with Input and Output VariablesIs the mainly used POU−Type for programming
Function Function Module with Return Value to extend the instruction set of aPLC
LDR
LIST
FUP
ST
SFC
CHAP 4IndraLogic Program Structures 20
Elements of a Program Organization Unit (POU)The following three POU−Types 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 FB−Calls.
Program (PRG)• This POU−Type 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 61131−3 FUNCTION_BLOCK with Inputs and Output parameters
equivalent to the previously used Function Modules in PLC’s• As a result of the extended or restricted properties of the POU−Types 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 POU’s, which
are called inside of the module (Prototypes)• To build the complete program, compiled POU’s 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 61131−3 standard• This makes the name of a POU and its calling interface globally available to all other
POU’s in a project, as soon as the POU has been declared • This autonomy of the POU’s, makes not only possible an extensive modularization of an
application, but also the reusability of already implemented and tested programs
CHAP 4IndraLogic Program Structures 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− POU−Body 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 VarIN : BOOL; END_VARVAR_OUTPUT VarOUT1 : BYTE ;
VarOUT2 : BOOL ; END_VAR
VAR VarLocal : BYTE ; END_VAR
LD VarIN...LD VarLocalST VarOUT1...ST VarOUT2
CHAP 4IndraLogic Program Structures 22
Deklaration section of Program Organisation Units (POU)Usage of Variable types inside of the 3 POU Types
Variable type permitted inside of
PROGRAM FUNCTION_BLOCK FUNCTION
VAR yes yes yes
VAR_INPUT yes yes yes
VAR_OUTPUT yes yes no
VAR_IN_OUT yes yes no
VAR_EXTERNAL yes yes no
VAR_GLOBAL yes no no
VAR_ACCESS yes 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 POU’s, 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 POU’s, 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 POU’s
CHAP 4IndraLogic Program Structures 23
Characteristics of the POU−InterfaceBy allocating the “POE−Variables” to “Variable types” inside of the declaration block,the interface of the POU and its “Local data” range is determined.
The POU−Interface 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 Description
Calling interface(Formal parameters)
VAR_INPUTVAR_OUTPUT
Input / Output parameters displayable in graphicalrepresentation
Return value VAR_OUTPUT Output parameters displayable in graphicalrepresentation
Global interface VAR_GLOBALVAR_EXTERNALVAR_ACCESS
Global data
Local data VAR Internal POU data
CHAP 4IndraLogic Program Structures 24
Formal parameters and Return values of a POUThe two calling interfaces respectively the Return values differ in the access methoderespectively 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 POE−Type “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
CHAP 4IndraLogic Program Structures 25
External and internal access to POE−Variables• 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 Access rights DescriptionVariable type Access rights Description
external internal
VARLocal variable
− RW A local variable is only vissble inside of a POUand can only be altered inside of this POU
VAR_INPUTInput variale
W R An input variable is visible in the calling POU andcan be altered there. Inside of the called POU, thevariable is read only
VAR_OUTPUTOutput variable
R RW An output variable is visible in the calling POU andcan only be read there. Inside of the called POU,the variable has read / write access rights
VAR_IN_OUTInput and Outputvariable
RW RW An input / output variable has the combined capa-bilities of VAR_INPUT and VAR_OUTPUT. Thevariable has read / write access rightsinside and outside of the called POU
VAR_EXTERNALExternal variable
RW RW An external variable was declared as a global va-riable in another POU. This variable isavailable to all other POU’s with read / writeaccess rights. Every change inside of a POU isalso available to the outside.
VAR_GLOBALGlobal variable
RW RW A global variable is declared inside of a POU. This variable is available to all other POU’s withread / write access rights. Every change inside ofa POU is also available to the outside.
VAR_ACCESSAccess path
RW RW A global variable of configurations, used as acommunication channel between components(Ressources) of configurations. This variable canbe used like a global variable inside of a POU
W = Write accessRL = Read accessRW = Read / Write access
© 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.
CHAP 5 ILoad / Unload
Chapter 5
Program
Load / Unload
CHAP 5Load PLC−Program 1
Load options and Memory structure
PC with Indralogic PLC Memory
newly loadedprogram
actual runningprogram
Boot project
Name :Default.prg
Source codecompressedOriginal Project
Name:Source.DAT
IndralogicProject file
Login
On
line
gen
erat
ion
of
Bo
ot
pro
ject
Lo
ad /
Un
load
so
urc
e co
de
Rel
oad
pro
gra
m a
fter
sh
utd
ow
n
*.PRO
FLASH Memory
CHAP 5Load PLC−Program 2
Used / Generated files
Name.SYMName.SDB
PC with IndralogicPLC Memory
Default.STSRetain.BINPersist.DAT
Default.PRGDefault.CHK
Source.DAT
Login
Pro
gra
mm
neu
lad
en n
ach
Neu
star
t
Name.PRO
Co
mp
ile
Boot project
PLC Program
On
line
gen
erat
e B
oo
t p
roje
ct
Lo
ad s
ou
rce
cod
e
Source code
Unload source code Source.DATUntiteled.PRO
Name0000000br.CIName0000000br.RI
Co
mp
ile
FLASH Memory
CHAP 5Load PLC−Program 3
Check and compile complete PLC−Program
1. Select “Project / Rebuild all” in the menubar, to check/compile PLC−Program
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 theincorrect program statement.If you have lots of errors, check, if you have included all required libraries.
CHAP 5Load PLC−Program 4
Check interface setting to PLC (IP−Address)
1. Select “Online / Communication Parameters” in the menubar, to check/setthe IP−Address of the CPS21−Panel and the internal IP−Address for theSoftware − PLC
2. Confirm settings, by clicking onto the “OK” button
VPP / BTV PanelsSoftware PLC
L20 / L40 / VEP30Hardware PLC
CHAP 5Load PLC−Program 5
Load PLC−Program into the PLC
1. Select “Online / Login” in the menubar, to load the error free compiledPLC−Program into the PLC
2. Confirm “Loading” by clicking onto the “Yes” button
3. Start the PLC−Program”
CHAP 5Load PLC−Program 6
Generate “Boot Project” in PLC−Controller
1. Select “Online / Create Boot project” in the menubar, to generate a “Boot” project in the PLC−Controller
2. Check if you are “Online” (Logout is displayed,if you are logged in and online)”
© 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.
CHAP 6 IExport / Import
Chapter 6
Export / Import
of Project data
CHAP 6Export / Import 1
Export of Project data
Note !IndraLogic handles the data entered in a project, in individual sections, inside of the developmentenviroment. If individual program sections have to be taken over into another project, it would be todifficult 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 thevariables. 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 datastructures in the displayed window, which you want to export
CHAP 6Export / Import 2
Export of Project data
3. Select the “Target” directory in the displayed “Explorer” window, into which the “Export” file is to be stored
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
CHAP 6Export / Import 3
Import of exported project data
Note !In order to insert the previously exported project data from an “Export” file into another project, thefunction “Import” must be used .Caution !With the “Import” function not only the program data, but also the directory structures, variables anddata types are inserted into the current project (i.e. existing structures, variables and datatypes 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 intothe current project, by clicking onto the “Open” button
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 beoverwritten or if the imported data is to be discarded)
Yes− existing Structure
is overwritten
No− existing Structure
remains unchanged, a new structure with the extension “_1” is created
CHAP 6Export / Import 4
Import of exported project data
5. Check the current project for existing errors, by carrying out a new “Compiler” run(Project / Rebuild all)
© 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.
CHAP 7 IProgramming
Chapter 7Programming
with Indralogic
CHAP 7I/O Definition 1
Address definition of Inputs, Outputs and Markers
Structure of address definition
% Percentage signI − InputQ − Output M − Marker
X − Single Bitwithout − Single BitB − ByteW − WordD − Double Word
2.7 − Bit− Address13 − Byte Address18 − Word Address20 − Double Word Address
Addressing examples:
%QX2.7%IB13%IW18%MD20
Addressing example with Symbolic names:
Valve_1 AT %QX2.7 : BOOLLedBar AT %IB13 : BYTEST1_Value AT %IW18 : WORDTemp1 AT %MD20 : DWORD
Important note !The address format in Indralogic is set to Byte−Addressing mode by default.This means, the Profibus−DP I/O addresses and the addresses used inside ofIndralogic are identicalIf Word addressing mode is selected, the Profibus−DP I/O addresses must bedivided by 2, in order to get the correct IndraLogic Word address.
Examples Byte addressing mode:IndraLogic Profibus%QX2.7 Q2.7 %IX7.4 I7.4%IX7.7 I7.7
Examples Word addressing mode:IndraLogic Profibus%QX2.7 Q4.7 %IX3.12 I7.4%IX3.15 I7.7
CHAP 7I/O Definition 2
Definition of Input, Outputs and Markers
Using bit signals in the program
CHAP 7I/O Definition 3
Monitoring of Bit−Signals
Important note !The status of a signal in the display below, is only updated and displayed, if the signal isused somewhere else in the program (Program must be called and processed)
CHAP 7Standard Data Types 4
Standard Data Types in Indralogic
The IEC 61131−3 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).
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 IEC−Literal)− Defaullt values „initial“
The data width and the value range given below, is depending on the target system and theimplementation of the software
Data type Description Bits Range DefaultBOOL boolean 8 0,...,255 0WORD Bit sequence 16 16 0,...,65535 0DWORD Bit sequence 32 32 0,...,4294967295 0SINT short integer 8 −128,...,+127 0INT integer 16 −32768,...,+32767 0DINT Double integer 32 −2147483648,...,2147483647 0USINT Unsigned short integer 8 0,...,+255 0UINT Unsigned integer 16 0,...,+65535 0UDINT Unsigned Double int 32 0 ,..., + 4294967295 0REAL Float 32 0.0LREAL long float 64 0.0
Data type Description DefaultDATE Date d#0001−01−01 (treated like a D−Word)TOD Time of day tod#00:00:00 (treated like a D−Word)DT Date & Time dt#0001−01−01−00:00:00 (treated like a D−Word)TIME Duration t#0s (treated like a D−Word)STRING Sequence of characters. (max. 255 char., Default without definition 80)
Instead of the keyword TOD it also possible to use the keyword TIME_OF_DAYInstead of keyword DT it also possible to use the keyword DATE_AND_TIMEDefault value for a string is an empty character sequence.
CHAP 7Variable declaration 5
Validity of Variables
Global VariablesVAR_GLOBAL.END_VAR
LocalVariables
VAR.END_VAR
Program (PRG)
LocalVariables
Program (PRG)
Interface Variables
VAR_INPUT.END_VAR
VAR_OUTPUT.END_VAR
Var_IN_OUT.END_VAR
VAR.END_VAR
Program (FUN & FB)
ProgramProgram
Program
VAR.END_VAR
LocalVariables
P r o g r a m
CHAP 7Variable declaration 6
Declaration of Variables
CHAP 7Variable declaration 7
Declaration of Constants
CHAP 7Variable declaration 8
Global Variables in POU’s via “VAR_EXTERNAL”
CHAP 7Variable declaration 9
Online − Status display of variables in declaration window
CHAP 7Variable declaration 10
Resizing the Online Window
CHAP 7Variable declaration 11
Selection of display format in Online mode
© 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 CHAP 8
Chapter 8Programming
in LIST
1Programming in LIST CHAP 8
Creation of a program in LIST
Input :
AND( S0
After input :AND ( S0
1.Click with the left mouse button onto the “Level” and the “Folder” under which the “New Object” is to be inserted
3. Select “Type of POU”, “Language of POU”and enter the “Name” of the new POU
2. Press the right mouse buttonand select “Add Object”
2Programming in LIST CHAP 8
Calling of POU’s with and without parameters in “LIST”
3Programming in LIST CHAP 8
Programming of logic operations in LIST (Example 1)
• 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 ”)“ statementThe result produced at this point, is used as a logical “AND” with the next contact or the nextblock of brackets
Rule• If more than one contact is connected in parallel to an
other contact, this “OR−Branch” must be set into brackets• If only one contact is connected in parallel, the rule “AND”
before “OR” applies and no bracket is required
/
4Programming in LIST CHAP 8
Programming of logic operations in LIST (Example 2)
Rule• If more than one contact is connected in parallel to an other contact, this “OR−Branch”
must be set into brackets• If only one contact is connected in parallel, the rule “AND” before “OR” applies and no
bracket is required
5Programming in LIST CHAP 8
Programming of logic operations in LIST (Example 3)
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 “OR−Branch”
must be set into brackets• If only one contact is connected in parallel, the rule “AND” before “OR” applies and no
bracket is required
6Programming in LIST CHAP 8
Programming of logic operations in LIST (Example 4)
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 “OR−Branch”
must be set into brackets• If only one contact is connected in parallel, the rule “AND” before “OR” applies and no
bracket is required
7Programming in LIST CHAP 8
Programming of logic operations in LIST (Example 5)
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 “OR−Branch”
must be set into brackets• If only one contact is connected in parallel, the rule “AND” before “OR” applies and no
bracket is required
8Programming in LIST CHAP 8
Monitor display in LIST (PRG’s)
9Programming in LIST CHAP 8
Creation of a “Function” in LIST
1.Click with the left mouse button onto the “Level” and the “Folder” under which the “New Object” is to be inserted
3. Select “Type of POU”, “Language of POU”and enter the “Name” of the new POU
2. Press the right mouse buttonand select “Add Object”
10Programming in LIST CHAP 8
Definition and Usage of a “Function” (FUN)
Program inside of a “Function”
Calling a “Function” in the program
11Programming in LIST CHAP 8
Online − Status display of “Functions”
Status display in the calling program
Status display inside of the “Function”
12Programming in LIST CHAP 8
Creation of a “Function block” in LIST
1.Click with the left mouse button onto the “Level” and the “Folder” under which the “New Object” is to be inserted
3. Select “Type of POU”, “Language of POU”and enter the “Name” of the new POU
2. Press the right mouse buttonand select “Add Object”
13Programming in LIST CHAP 8
Definition and Usage of a “Function block” (FB)
Program inside of a “Function block”
Signals used together with the call of the “Function Block”
14Programming in LIST CHAP 8
Definition and Usage of a “Function block” (FB)
Call of a “Function Block in a program
Manual_Move(FB) Robot_1_Right1.Instance
Memory1.InstanceVar_Input
Work_limit :Manual_mode :E_Stop :Jog_Work :Jog_Base :
End_Var
Var_OutputMovement :
End_Var
Inputs:_Right_Manual_ESTOP_Key_Work_Key_Base
Outputs:_Y1_Right
Robot_1_Left2.Instance
Memory2.Instance
Inputs:_Left_Manual_ESTOP_Key_Base_Key_Work
Outputs:_Y1_Left
Inputs:_Left_Manual_ESTOP_Key_Base_Key_Work
Outputs:_Y1_Left
Inputs:_Right_Manual_ESTOP_Key_Work_Key_Base
Outputs:_Y1_Right
15Programming in LIST CHAP 8
Online − Status display of “Function blocks”
Monitoring in the Global variable definition window
Monitoring of the function block in the calling module
16Programming in LIST CHAP 8
Online − Status display of “Function blocks”
Monitoring inside of the Function Block
1. Double click onto the functionblock in the left window
2. Select instance by double clicking on it
3. Signal status inside of the selected instance is displayed
© 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 LDR CHAP 9
Chapter 9Programming
in LDR
1Programming in Ladder CHAP 9
Creation of a program in LDR
1.Click with the left mouse button onto the “Level” and the “Folder” under which the “New Object” is to be inserted
3. Select “Type of POU”, “Language of POU”and enter the “Name” of the new POU
2. Press the right mouse buttonand select “Add Object”
2Programming in Ladder CHAP 9
Input of a program in LDR
1. Empty program branch, with selectionmark 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 thebasic line, in order to insert a new “AND” contact or an “Output” element
3Programming in Ladder CHAP 9
Alteration of program in LDR
Addition of a new OR − Element
1. Press the “Shift” key and keep it pressed, then select allcontacts 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
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
3. Enter the symbolic name of the signal
4Programming in Ladder CHAP 9
Adding a new LDR−Network branch
1. Press the right mouse button and select “Network (after)“ or “Network ( before)”
2. Enter the logic for the new network in LDR
5Programming in Ladder CHAP 9
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
2. Press the right mouse button, to call up themenu, then select “Function block”
4. Enter the parameters of the “Function block” andif required declare a new instance for the “FB”
3. Select the desired “Function block” andconfirm by clicking onto the “OK” button
6Programming in Ladder CHAP 9
Addition of “FBD−Operators” in LDR
1. Click onto the position where you want to add a “FBD−Operator“
2. Press the right mouse buttonand select “Box with EN”
3. Click with the left mouse button onto“AND” and than press function key “F2”
7Programming in Ladder CHAP 9
Addition of “FBD−Operators” in LDR
4. Click onto “FBD−Operators“ in the left window and select the “FBD−Operation” that you want to insert (e.g. “MUL”)
F2
5. Enter the Variables / Signals, which youwant to use with the “FBD−Operator”
8Programming in Ladder CHAP 9
Call of Programs (PRG’s) in LDR
1. Click onto the base line of the network into which you want to add a program call
2. Press the right mouse buttonand select “Box with EN”
3. Click with the left mouse button onto“AND” and than press function key “F2”
9Programming in Ladder CHAP 9
Call of Programs (PRG’s) in LDR
F2
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
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
10Programming in Ladder CHAP 9
Call of Functions (FUN’s) in LDR
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 youwant to use with the “Function”
11Programming in Ladder CHAP 9
Call of Function Blocks (FB’s) in LDR
F2
5. Enter the Variables / Signals, which youwant to use with the “Function Block”
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
12Programming in Ladder CHAP 9
Conditional calls of PRG’s, FUN’s and FB’s in LDR
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
13Programming in Ladder CHAP 9
Online display of POU’s written in LDR
Logic result is “TRUE”
Logic result is “FALSE”
14Programming in Ladder CHAP 9
Additional display options in LDR
1. Select “Extras / Options” in the menubar
Default setting
2. Activate the desired additional options in the displayed selection window
15Programming in Ladder CHAP 9
Comment input in LDR
1. Press the right mouse button and select “Comment”
2. Enter the first line of the comment(to make a new line, pressthe “Enter” key)
16Programming in Ladder CHAP 9
Jump instruction in LDR
3. Enter the jump destination label according to the nemae usedtogether with the “Jump” statement (e.g. End:)
Caution ! This is a comment line
2. Alter the default label from “Label” to a desired label (e.g. “End”)
1. Press the right mouse button and select “Jump”
© 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 CHAP 10
Chapter 10Programming
in FBD
1Programming in FBD CHAP 10
Creation of a program in FBD
1.Click with the left mouse button onto the “Level” and the “Folder” under which the “New Object” is to be inserted
3. Select “Type of POU”, “Language of POU”and enter the “Name” of the new POU
2. Press the right mouse buttonand select “Add Object”
2Programming in FBD CHAP 10
Input of a program in FBD
1. Select “???” and delete the questionmarks with the “Del” key
2. Click onto button “Box” to insert aBasic FBD−Element
3. Press the “F2” key, to call up a“Function” selection window
F2
4. Enter the names of the signals to be used
3Programming in FBD CHAP 10
Adding of new Logic − Elements in FBD
Connection points for new FBD−Elements
At this “Connection point” the following FBD−Elementscan be added:− Box− Assignment− Jump− Return− Set (S) / Reset (R)
At this “Connection point” the following FBD−Ele-ments can be added:− Box− Negation
At this “Connection point” the followingFBD−Elements can be added:− Output
4Programming in FBD CHAP 10
Definition / Alteration the logic or function of a Basic−FBD−Element
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
5Programming in FBD CHAP 10
Deletion of Inputs, Outputs and Elements
Select the Input − Pin to be deleted by aclick with the left mouse button anddelete the pin by pressing the “Del” key
Deletion of an Input pin
Del
Deletion of an Output pin
Deletion of a complete Element
Del
Del
Important note !If an element is deleted to which other elements are connected to, all elements connectedto the input pins of this element will be deleted and the logic is adapted accordingly
Select the Output − Pin to be deletedby a click with the left mouse buttonand delete the pin by pressing the“Del” key
Select the Elemet to be deleted by aclick with the left mouse button anddelete the pin by pressing the “Del” key
6Programming in FBD CHAP 10
Adding a new FBD−Network
1. Press the right mouse button and select“Network (after)” or “Network (before)”
2. Enter the logic into the new FBD−Network
7Programming in FBD CHAP 10
Direct switchover from “FBD” to “LDR” display
1. Select “Extras / View” in the menubar and select the desired display mode
8Programming in FBD CHAP 10
Monitor display in FBD
Representation in BlueLogic result = TRUE
Representation in BlackLogic result = False
Note !The color for the signal status representation can be adaptedunder “Project / Options / Colors”
9Programming in FBD CHAP 10
Input of Comment in FBD
2. Enter comment,to make a new comment line, press the “Enter” key
1. Press the right mouse buttonand select “Comment“
10Programming in FBD CHAP 10
Jumps in FBD
3. Enter the target label according to the entered label (e.g. End: )
Caution ! This is the comment line
2. Adapt the default text for the targete.g. “Label” to “End”)
1. Press the right mousebutton and select “Jump“
11Programming in FBD CHAP 10
Call of Programs, Functions and Function blocks in FBD
F2
1. Select “???” and delete the questionmarks with the “Del” key
2. Click onto button “Box” to insert aBasic FBD−Element
3. Press the “F2” key, to call up the“Function” selection window
12Programming in FBD CHAP 10
Call of Programs, Functions and Function blocks in FBD
4. If are there are any parameters,enter the required information
13Programming in FBD CHAP 10
Definition and usage of Timers
F2
4. Select the desired Timer −Function block
1. Select “???” and delete the question marks with the “Del” key
2. Click onto button “Box” to insert aBasic FBD−Element
3. Press the “F2” key, to call up a“Function” selection window
14Programming in FBD CHAP 10
Definition and usage of Timers
5. Enter the name of the instance for the timer functionand define the remaining parameters
15Programming in FBD CHAP 10
Monitoring of Timers / Diagram Switch On Delay (TON)
Time diagram Switch On Delay
Input VariablesIN : Start signal (BOOL)PT : Time command value (TIME) Example T#2s, T#2000ms
Output VariablesQ : 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
16Programming in FBD CHAP 10
Monitoring of Timers / Diagram Switch Off Delay (TOF)
Input VariablesIN : Start signal (BOOL)PT : Time command value (TIME) Example T#2s, T#2000ms
Output VariablesQ : 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
Time diagram Switch Off Delay
17Programming in FBD CHAP 10
Monitoring of Timers / Diagram Pulse function (TP)
Input VariablesIN : Start signal (BOOL)PT : Time command value (TIME) Example T#2s, T#2000ms
Output VariablesQ : 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
Time diagram Pulse function (TP)
18Programming in FBD CHAP 10
Monitoring of Timers / Diagram Real Time Clock (RTC)
Input VariablesEN : Enable signal (BOOL)PT : Date/Time command value (DT) Example : DT#2004−04−15−14:00:00
Output VariablesQ : Time check Bit (Bool)
− “Q” = “1”, if “EN” = “1“− in alle other cases “Q” = “0”
CDT : active Date and Time (DT) Example : DT#2004−07−30−22: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 longas “EN” = “1”
− if “EN” = “0”, then “DT#1970−01−01−00:00” is output at “CDT”
19Programming in FBD CHAP 10
Definition and usage of Counters
F2
4. Select the desired Counter −Function block
1. Select “???” and delete the question marks with the “Del” key
2. Click onto button “Box” to insert aBasic FBD−Element
3. Press the “F2” key, to call up a“Function” selection window
20Programming in FBD CHAP 10
Definition and usage of Counters
5. Enter the name of the instance forthe counter function and define theremaining parameters
21Programming in FBD CHAP 10
Online − Status display Up Counter (CTU)
Input VariableCU : Count signal (BOOL) edge triggertReset : Reset signal (BOOL) resets actual counter value “CV” and result bit “Q” to “0”PV : Command value (INT) max. 65535
Output variablesQ : Result Bit (Bool)
− “Q” = “1”, if actual counter value (CV) is equal or greater thancommand 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
22Programming in FBD CHAP 10
Online − Status display Down Counter (CTD)
Input VariableCU : Count signal (BOOL) edge triggertLoad : 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 variablesQ : 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
23Programming in FBD CHAP 10
Online − Status display Up / Down Counter (CTUD)
Input VariableCU : Count up signal (BOOL) edge triggertCD : Count down signal (BOOL) edge triggertLoad : 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 variablesQU : Result Bit (Bool)
− “QU” = “1”, if actual counter value (CV) is equal or greater thancommand 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 11Sequence
Programmingwith Indralogic
1Sequence Programming CHAP 11
Selection of IEC compliant SFC Input Mode
Note !Indralogic offers 2 different types of SFC−Programming modes. The so called simplified mode, is notcompliant to IEC61131. The other SFC−Mode is compliant to IEC. Before SFC Programming isstarted, the required mode should be activated, because it is not possible to convert it afterwards.
IEC−LibraryIn order to use the IEC−Comliant Sequence, the SFC−Library “IECSFC.LIB” must be added to thelibrary window (Window / Library Manager / Additional Library)
IEC compliant SFC−Programmingmode is active
2Sequence Programming CHAP 11
IEC−Step−Action commandsThe following Step−Action output commands are available in the IEC compliant sequence:
N Non−stored Action is active as long as the step is active
R overriding Reset Action is deactivated
S Set (Stored) Action is activated and remains active until a Reset for thisaction is issued
L time Limited Action is activated for a certain time, but only as long as the stepremains active
D time Delayed Action is activated after a certain time, if the step is still active atthis point and remains active as long as the step is active
P Pulse Action is carried out one time, when the step is activated
SD Stored and time Delayed Action is activated after a certain time and remains active until aReset for this action is issued
DS Delayed and Stored Action is activated after a certain time, if the step is still active atthis point and remains active until a Reset for this action isissued
SL Stored and time Limited Action is activated for a limited time
The Step−Action commands “L”, “D”, “SD”, “DS” and “SL” require a time value in the TIME−Constant format, e.g. T#5s or T#500ms
3Sequence Programming CHAP 11
Creation of an IEC−Sequence program
4. Change the default text from “Init” to “N000” and “Trans0” toe.g. _S1 = TRUE and enter the action to be carried out by this step e.g. “_Y1”
1. Select with the left mouse button the folder under which the new SFC−Programis to created
2. Press the right mouse button and select“Add Object” in the menu
3. Select “Program” and “SFC” in the propertywindow and enter name of sequence module
4Sequence Programming CHAP 11
Adding a new step element
2. Change the default text from “Step2” to “N001” and “Trans1” to e.g. “_S3 = TRUE“ and“Action_1” to e.g. “_Y2”
1. Select “Transition” with left mouse button, press right mouse button and select “Step−Transition (after)” in the popup menu
5Sequence Programming CHAP 11
Copy / Paste an existing “Step” in a “Sequence” module
1. Select “Transition” with left mousebutton, 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”
5. Adapt the “Step number” in the step element
4. Select “Paste after” in the menubar
6Sequence Programming CHAP 11
Deletion of an existing Step−Element
2. Select “Edit / Delete” in the menubar
3. If required, adapt step number
1. Select “Transition” with left mousebutton, press ”CTRL” key and keep it pressed, then select “Step element” with left mouse button
7Sequence Programming CHAP 11
Adding a new Step − Action
1. Click with the left mouse button onto the step element, to which a new action is to be added
3. Adapt the “Default” values to your needs
2. Press the right mouse button andselect “Associate Action”
8Sequence Programming CHAP 11
Deletion of a Step−Action
3. Select the action which is to be deleted and confirm deletion with the “OK” button
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 andselect “Clear Action / Transition”
9Sequence Programming CHAP 11
Programming of a step continuation logic
3. Select the programminglanguage, in which thecontinuation logic is to beprogrammed
2. Press the right mouse button andselect “Zoom Action / Transition”
continuation on the next page
1. Click with the left mouse button onto the Transition, for which the continuation logic has to be programmed
10Sequence Programming CHAP 11
Programming of a step continuation logic (continuation)
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 backto the graphical display
6. An active “Continuation logic” is indicated by a black triangle
NoteBy double clicking onto the black triangle, the “Continuation logic” can be called up and edited
11Sequence Programming CHAP 11
Programming an Action−Logic
3. Select the desired“Programming language” and enter the name of the “Action” program
1. Enter the name of the “Action” program
2. Select the name of sequence program inthe left window, press the right mousebutton and select “Add Action”
Continuation on next page
12Sequence Programming CHAP 11
Programming an Action−Logic (continuation)
4. Enter the “Action logic”in the selected language
13Sequence Programming CHAP 11
Programming a step “Entry” logic
Note !The step “Entry” logic is processed only once when the step is selected the first time.
continuation on next page
1. Click with the left mouse button ontothe Step, for which an “Entry” logic isto be programmed
2. Press the right mouse button andselect “Add Entry−Action”
3. Select the desired “Programming language” in which the “Entry” logic is to be programmed
14Sequence Programming CHAP 11
Programming a step “Entry” logic (continuation)
4. Enter the “Entry“ logicin the selected language
15Sequence Programming CHAP 11
Programming a step “Exit” logic
Note !The step “Exit” logic is processed only once when the step is exited.
continuation on the next page
1. Click with the left mouse button ontothe Step, for which an “Exit” logic isto be programmed
2. Press the right mouse button andselect “Add Exit−Action”
3. Select the desired “Programming language” in which the “Exit” logic is to be programmed
16Sequence Programming CHAP 11
Programming a step “Exit” logic (continuation)
4. Enter the “Exit“ logicin the selected language
17Sequence Programming CHAP 11
Deletion of a step “Entry” or “Exit” logic
3. Select the actions to be removed,and confirm by clicking on the “OK” button
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 andselect “Clear Action / Transition“
4. Click onto the “OK” button, withoutselecting a step action in thedisplayed window
18Sequence programming CHAP 11
Step−Property−Variables
Step variables in SFC
• Default variables are used together with SFC, to make it possible to check the status of asequence 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“ − IEC−Sequence −> 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 SFC−POU• To check, if an “IEC−Action” is active or not, the variable “Actionname.x” can be used• Together with IEC−Steps, 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.xHere the default variable “N001.x” is used, to check the status of IEC−Step “N001” inPOU “SqA_050_Loadstation”
act_step_1_Time : = SqA_050_Loadstation.N001.tHere the default variable “N001.t“ is used, to check the time the step has been active
19Sequence programming CHAP 11
Step−Prpoperty−FlagsIEC−Library
To use the complete set of the IEC−Sequence Flags, the SFC−Library “AnalyzationNew.lib” mustbe linked into the project (Window / Library Manager / Aditional library)
SFC−Flags
For controlling the operation of SFC POUs flags can be used, which are created implicitely duringrunning the project. To read this flags you have to define appropriate global or local variables as in-puts or outputs. Example: If in a SFC POU a step is active for a longer time than defined in the stepattributes, then a flag will be set, which is accessible by using a variable ”SFCError” (SFCError getsTRUE 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 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 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 re−set 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)
20Sequence programming CHAP 11
Step−Property−Flags
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 structureExpressionResult :− Name− Address− Comment− actual status
• This is possible for maximum 16 variables (Array−Size 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 pre−condition 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 Jog−Mode 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
21Sequence programming CHAP 11
Programming of Step−Property−Flags
22Sequence programming CHAP 11
Online display of Step−Property−Flags
23Sequence programming CHAP 11
Sample sequence program in “LDR” − Step elements & Parameters
In this example, the command output of the sequence is programmed in a separate module, using thestep variables. This has the advantage, that the movement can be stooped or canceled any time,independent of the sequence module.
24Sequence programming CHAP 11
Sample sequence program in “LDR” − Continuation logic
INIT − Step (N000) − Continuation logic
Movement steps (N005 − N0xx) − Continuation logic
25Sequence programming CHAP 11
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
26Sequence programming CHAP 11
Sample sequence program in “LDR” − Program callup
27Sequence Programming CHAP 11
Sequence Branching / Jump
1. Select the “Continuation”element at which theBranching / Jump is to beinserted
2. Press the right mouse button and select “Alternative Branch (right)
28Sequence Programming CHAP 11
Sequence Branching / Jump
3. Change the default text from “TRANSXX”to the defined “Continuation” logice.g. “_S3 = False”
4. Select the “Continuation” element and press the right mouse button, then select “Jump” or“Step−Transition (after)”
5. Change default text from“Step” to the step number you want to jump to e.g. “N004”
29Sequence Programming CHAP 11
Sample program sequence Branching / Jump
30Sequence Programming CHAP 11
Input of “Step” comment and “Step” monitoring time
2. Press the right mouse buttonand select “Step Attributes”
1. Click with the left mouse button onto the “Step element” for which you want to enter a “Comment” or a “Monitoring time”
3. Enter the desired “Comment”and/or the “Monitoring time”(Time format : T#2000ms or T#2s)
Note !Display of “Comment” or “Monitoringtime” has to be selected under“Tools / Options” (see next page)
Note !In order to insert additional lines,press “Ctrl” + “Enter” key
31Sequence Programming CHAP 11
Selection of “step comment” or “Step monitoring time” display
1. Press the right mouse buttoninside of the “Sequence” windowand select “Options”
Comment display
Monitoring time display
© 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 CHAP 12
Chapter 12Programming
IN ST
CHAP 12Programming in ST 1
Logic operations with “Structured Text” (ST)
• 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)
CHAP 12Programming in ST 2
Logic operations with “Structured Text” (ST)
Example : Output with “Set“ and “Reset” (latched)
CHAP 12Programming in ST 3
Calling program modules (PRG’s)
CHAP 12Programming in ST 4
Definition and usage of Functions (FUN)
Program inside of the function
Call of function
CHAP 12Programming in ST 5
Function parameter input
Parameter input in the calling module
Parameter input inside of the function
CHAP 12Programming in ST 6
Online − Status display of of Functions
Monitoring in the calling module
Monitoring inside of the function
CHAP 12Programming in ST 7
Definition and usage of Function Blocks (FB)
Program inside of the function block
Call of function block
CHAP 12Programming in ST 8
Definition of an instance for a function block (Memory allocation)
Manual_Move (FB)
Bas_Manual(Instance)
Bas_Manual_2(Instance)
MemoryBas_Manual
MemoryBas_Manual_2
InputsVAR_INPUT
left_limitright_limit
END_VAR
OutputsVAR_OUTPUT
out_okEND_VAR
Inputs:_S0_S1
Output:_Y9
Inputs:_S2_S3
Output:_Y10
Inputs:_S0_S1
Output:_Y9
Inputs:_S2_S3
Output:_Y10
CHAP 12Programming in ST 9
Monitoring of Function Blocks
Monitoring in the Global variable definition window
Monitoring of the function block in the calling module
CHAP 12Programming in ST 10
Monitoring of Function Blocks
Monitoring inside of the Function Block
1. Double click onto the functionblock in the left window
2. Select instance by double clicking on it
3. Signal status inside of the selected instance is displayed
CHAP 12Programming in ST 11
Selection of SFC Input Mode (simlified SFC non IEC)
NoteCodesys offers 2 different types of SFC−Programming modes. The so called simplified mode, is notcompliant to IEC61131. The other SFC−Mode is compliant to IEC. Before SFC Programming isstarted, the required mode should be activated, because it is not possible to convert it afterwards.
simplified SFC−Programmingmode is active
CHAP 12Programming in ST 12
Creation of a SFC−Sequence programm
4. Change the default text from “Init” to “N000” and “Trans0” to “RetVal=OK”
1. Select with the left mouse button the folder under which the new SFC−Programis to created
2. Press the right mouse button and select“Add Object” in the menu
3. Select “Program” and “SFC” in the propertywindow and enter name of sequence modulee.g. SqA_020_Pusher1
CHAP 12Programming in ST 13
Add a new step element
2. Change the default text from “Step2” to “N001” and “Trans1” to “RetVal=OK”
1. Select “Transition” with left mouse button, press right mouse button and select “Step−Transition (after)” in the popup menu
CHAP 12Programming in ST 14
Copy / Paste an existing “Step” in a “Sequence” module
1. Select “Transition” with left mousebutton, 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 stepelement, 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
CHAP 12Programming in ST 15
Deletion of an existing Step−Element
2. Select “Edit / Delete” in the menubar
3. If required, adapt step number
1. Select “Transition” with left mousebutton, press ”CTRL” key and keep it pressed, then select “Step element”with left mouse button
CHAP 12Programming in ST 16
Programming a step
1. Double click with the left mouse button onto the step element Note !If the step element is opend the first time, the programminglanguage in which step program is to be written, can be selected
2. Select the Programminglanguage to be used
3. Enter the program in the selected programming language
CHAP 12Programming in ST 17
Sample Sequence program “ST” − Step elements & Parameters
In this example, the command output of the sequence is programmed in a separate module, usingthe step variables. This has the advantage, that the movement can be stooped or canceled any time,independent of the sequence module.
CHAP 12Programming in ST 18
Sample Sequence program “ST” − Continuation logic
INIT − Step (N000) − Continuation logic
Movements steps (N005 − N0xx) − Continuation logic
CHAP 12Programming in ST 19
Sample Sequence program “ST” − Command output
Command output via Step variable “Nxxx”Format : Sequencename.Stepname
e.g. SqA_080_Robot1.N005
CHAP 12Programming in ST 20
Sample Sequence program “ST” − Module callup
CHAP 12Programming in ST 21
Sequence Branching / Jump
1. Select the “Transition” at which the Branching / Jumpis to be added
2. Press the right mouse buton and select “Alternative Branch (right)
CHAP 12Programming in ST 22
Sequence Branching / Jump
3. Change the default text from “TRANSXX”to the defined “Transition” logice.g. “RetVal = JP1”
4. Select the “Continuation” element and press the right mouse button, then select “Jump” or“Step−Transition (after)”
5. Change default text from“Step” to the step number you want to jump toe.g. “N004”
CHAP 12Programming in ST 23
Sample program sequence Branching / Jump
CHAP 12Programming in ST 24
Sample program sequence Branching / Jump
© 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.
CHAP 13 ITask Managment
Chapter 13
Task
Managment
1Task managment CHAP 13
Applications with Task managemant
DescriptionIn addition to declaring the special “PLC_PRG” program, you can also control theprocessing 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
Free running Task
Cyclic Task
Event controlled Task
Event
Cycle time
Communication
L
L
L
L
L L
S
S S
S S
2Task managment CHAP 13
Time related behavier of Tasks
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
Free running TaskPriority 10
Event controlledTask Priority 5
Event
None preemtive behavier
Advantage : Data consistancyDisadvantage : No fast inputs
L S L
L SPark
time delay
Preemtive behavier
Advantage : fast inputsDisadvantage : Data consistancy is not guaranteed
L L
L S
S
3Task 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
4Task managment CHAP 13
Creation of a Task − Definition of the Task properties
3. Enter the “Type” and the corresponding “Parameters” for the selected Task
continuation on next page
4. Click onto “Task configuration” to take over the new parameters into the Task window
5Task 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”
7. Select the module which is to be called by the task, in the displayed selection list
6. Select the field “Program Call” and press the function key “F2” to callup the program selection windowF2
6Task managment CHAP 13
Description of properties − Cyclic Task
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 (0−31):• 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”)
WatchdogTime −> 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
7Task managment CHAP 13
Description of properties − Free wheeling Task
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 (0−31):• 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)
WatchdogTime −> 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
8Task managment CHAP 13
Description of properties − Event controlled Task
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 selectedPriority (0−31):• a number between 0 and 31• whereas 0 represents the highest, 31 the lowest priorityType: 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
WatchdogTime −> 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
F2
9Task 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 (0−31):• 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
WatchdogTime −> 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
10Task managment CHAP 13
Description of properties − System events
Note:System event controlled Tasks are related to the selected “Target System” and may not bepresent in this form in every controller
2. Select the field “called POU” by double clicking on it, enter the name of the programor callup a program list window by pressing function key “F2”
1. Click onto the “System event” for which a task is to be defined
F2
11Task managment CHAP 13
Display of “Task Timing Diagram” in Online mode
1. Check if library “SysTaskInfo.Lib” is linked into the project
3. Timing diagram can be monitored after “Online / Login” under “Taskconfiguration”
2. If required, include library via function“Window/Library Manager
− Additional library”
Note !The library is control specific and thereforecan be found in the “Target” − directoryof the selected target system
© 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.
CHAP 14 ILibraries
Chapter 14
Library
managment
CHAP 14Library managment 1
Insertion of a new library into the current project
1. Select “Window / Library Manager” in the menubar
2. All libraries included in the current project are displayed
CHAP 14Library managment 2
Insertion of a new library into the current project
3. Select the upper window with the left mouse button, then press the right mouse button
4. Select the “Library” which is additionallyto be included into the current project
5. All Functions / Function blocks out of this library can now be used in the current project
© 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.
CHAP 15 IRemanence
Chapter 15
Remanence
behaviour
of variables
CHAP 15Remanence behaviour of variables 1
Behavier of variables after Power Off / ON and Stop / Run (Remanence)
Like in the previous generation of PLC’s, the behavier of variables after Power Off / On andStop / Run can be affected by internal settings. Indralogic is using the statements“VAR_RETAIN” and VAR_PERSISTENT” in the declaration section, to determine, if theStatus / Value of a variable is cleared after Power Off / On or Stop / Run or not.
Var RetainRemant_var : DINT
End_Var
Var PersistentRemanent_var : DINT
End_var
All variables declared as “Retain”,keep their status / values, thestatus / value of all other variablesare cleared
Switch Off / OnOnline Reset
Online / LoginOnline / Reset (Cold)
PLC Program
Var Retain PersistentRemant_var : DINT
End_Var
PLC Program
PLC Flash Memory Retain.BINPersist.DAT
All variables declared as“Persistant”, keep theirstatus / values, the status / valueof all other variables are cleared
Switch Off / On Online ResetOnline / Login Online / Reset (Cold) Online / Reset (Original)
All variables declared as “Retain”,keep their status / values, thestatus / value of all other variablesare cleared
All variables declared as “Retain Persistent”,keep their status / values, the status / valueof all other variables are cleared
complete user memory is deleted
CHAP 15Remanence behaviour of variables 2
Declaration of remanent variables
CHAP 15Remanence behaviour of variables 3
Usage of remanent variables in POU’s
If a variable is declared in a Function Block as “Retain / Persistent”, the completeinstance 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 aremanent variable. All other variables will be cleared.
If a variable is declared in a Function as “Retain / Persistent” thedeclaraqtion is ignored and the variable is treated like a non remanentvariable (i.e. the Status / value of this variable is cleared, like all the othernon remanent variables).
CHAP 15Remanence behaviour of variables 4
Usage of remanent variablen in POU’s
If a variable is declared in a “Programm” as “Retain / Persistent”, exactly thisone variable is saved into the “Retain / Persistent” section
© 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.
CHAP 16 IMonitor
Chapter 16
Program
Monitoring
CHAP 16Program Monitoring 1
Monitoring the program flow
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 markin green on the left side of the window in the line number display.
CHAP 16Program Monitoring 2
Enter variable list into “Watch & Recipe Manager“
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”)
CHAP 16Program Monitoring 3
Online display of variable list with “Watch and Recipe Manager”
CHAP 16Program Monitoring 4
Read and alter Variables with “Recipe” Manager
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, intowhich new values can be entered
CHAP 16Program Monitoring 5
Write Variables from “ Recipe Manager” into PLC
Note !Only the values displayed in bluecolor are written into the PLC
CHAP 16Programming Monitoring 6
Activation of the “Trace” Function
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
CHAP 16Programming Monitoring 7
Definition of “Trace” Parameters
• 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 andselect “Trace Configuration”
3. Enter the signals / values to bemonitored into the “Trace” configuration window
CHAP 16Programming Monitoring 8
Definition of “Trace” Parameters
• “Trace” definitions can besaved onto harddrive
• a saved “Trace” configuration canbe loaded from the harddrive
Trace Name• this name is displayed in the “Trace” window at the top right position of the “Selection” listTrigger 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” pointTrigger 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 occursTrigger 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
CHAP 16Programming Monitoring 9
Definition of “Trace” ParameterNumber 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 valuesSample rate (ms)• time between two recordings in milliseconds• a “0” means : one scan cycle with each PLC CyleRecording− 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 ofthe available variables
Input format : .Var_name
CHAP 16Programming Monitoring 10
Start of a “Trace” sample recording
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
CHAP 16Programming Monitoring 11
Start of a “Trace” sample recording
4. As soon as the trigger condition is met, the result is displayed assoon as the number of defined samples have been completed
3. Press the right mouse buttonand select “Start Trace”
© 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 CHAP 17
Chapter 17User specific
data structures
CHAP 17User specific data structures 1
Definition of Enumerations
Using enumerations in the program
CHAP 17User specific data structures 2
Monitoring of enumerations
CHAP 17User specific data structures 3
Definition and usage of Structures
Using structures in the program
CHAP 17User specific data structures 4
Monitoring of structures of userspecific data types
Status display in the program
Status display in the “Ressources”
Data Backup / Data Restore CHAP 18
Chapter 18Data Backup
andData Restore
Nachdruck, Vervielfältigung und Übersetzung, auch auszugsweise,nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe
gestattet. Wir übernehmen keine Haftung für die Übereinstimmungdes Inhalts mit den jeweils geltenden gesetzlichen Vorschriften.
Reproduction, copying, or translation of this publication, wholly orin part, only with our previous written permission and with source credit.
We assume no responsibility for agreement of the contents with locallaws and regulations Bosch Rexroth AG is exempt from
liability, and reserves the right to make changes at any time.
1CHAP 18Data Backup / Data Restore
Backup of a complete IndraWorks − ProjectIn order to make a Backup of a complete IndraWorks − Project, inclusive Visualization and all othercomonents included in the project, IndraWorks has an integrated ZIP−Utility, which stores thecomplete project inta a compressed ZIP−File on the harddrive or removeable devices. This ZIP−Filecan 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
2CHAP 18Data Backup / Data Restore
Backup of a complete IndraWorks − Project
4. Protect your archive by enteringa password (Optional)
5. Click onto button “Next” to continue
6. Check if the selectedoptions are correct
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)
7. Click onto button “Finish“ to to start archiving
3CHAP 18Data Backup / Data Restore
Backup of a complete IndraWorks − Project
8. Project is commpressed and storedunder the entered file name
9. Click onto the button “Close” to complete the backup process
4CHAP 18Data Backup / Data Restore
Restoring of an archived IndraWorks−Project (ZIP−File)
Using this function, a previously archived IndraWorks−Project can be restoredinto a fully working project
2. Click onto the button “Restore project“
1. Close the actual IndrWorks−Project via “File/ Close / Project”
3. Click onto button “Next” to continue
5CHAP 18Data Backup / Data Restore
Restoring of an archived IndraWorks−Project (ZIP−File)
5. Select the ZIP−File which is to be restored
6. Click onto button “Open”
4. Select the directory in which the archived ZIP−File is located
6CHAP 18Data Backup / Data Restore
Restoring of an archived IndraWorks−Project (ZIP−File)
8. Select the directory into which you want to restore the archived project
7. Click onto button “Next”
9. Click onto button “Next”
7CHAP 18Data Backup / Data Restore
Restoring of an archived IndraWorks−Project (ZIP−File)
11. ZIP−File is unpacked and the project isrestored into the selected directory
10. Check your settings and click onto button“Finish”, to start the restore process
8CHAP 18Data Backup / Data Restore
Restoring of an archived IndraWorks−Project (ZIP−File)
12. Result is displayed
13. Activate direct loading of the restored project into IndraWorks project window
9CHAP 18Data Backup / Data Restore
Adaption of the PLC−DirectoriesSometimes it is necessary to adapt the directories of a restored project. This is always required, if theproject was archived on another computer, with a different directory structures for the “IndraWorks”development software.
1. Select the “Logic” icon with the left mousebutton, press the right mouse buttonand select “Properties”
2. Adapt the IndraWorks−Installation directory.e.g. “C:\Programme\...” to “C:\Program files\....”
10CHAP 18Data Backup / Data Restore
Importing a Standalone IndraLogic Program (*.PRO−File)
The function “Import PLC project data” can be used to repair a corrupted IndraWorks−Project orto integrate a Standalone IndraLogic − Project into IndraWorks.
1. Click onto “Drive and Control”, to display the available “Target Systems”
3. Enter the name of the new project andselect the directory, into which you wantto store the new project
2. Click onto “File” and select“New / Project”
4. Click onto “OK” button, to take over your selection
11CHAP 18Data Backup / Data Restore
Importing a Standalone IndraLogic Program (*.PRO−File)
7. Enter the name for the “IndraLogik” Program
5. Select the desired “Target System” withthe left mouse button, keep the leftmouse 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”
12CHAP 18Data Backup / Data Restore
Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC)
12. Select “Local” and confirm by clicking onto the “OK” button
10. Callup the communication window, in order to enter theparameters to be used for the connection with the “Target System”
11. Click onto “Gateway”, to setup theparameters for a local “Gateway − Server”
8. Select desired firmware version
9. Click onto button “Extended” to select “BYTE” or “WORD” addressing mode
13CHAP 18Data Backup / Data Restore
Definition of communication for IndraLogic L40 / VEP30 (Hardware−PLC)
14. Select communication channel“Tcp/Ip (Level 2 Route)”
13. Click onto “New” to create a newcommunication channel
16. Enter the IP−Address of the “L40” controller to which you want to make a connection and confirm the input by pressing the “Enter” key
15. Open the input field for the IP−Address by double clickingonto “localhost”
17. Apply new settings by clicking onto the “OK” button
14CHAP 18Data Backup / Data Restore
Importing a Standalone IndraLogic Program (*.PRO−File)
18. Click onto the button “Finish” totake over the new settings
Note !By clicking with the right mouse button onto theicon “Logic”, the communication window canbe called up again by selecting “Properties”
15CHAP 18Data Backup / Data Restore
Importing a Standalone IndraLogic Program (*.PRO−File)
20. Select the directory in which the “Pro−File” to be imported is located
21. Select the “Pro−File” to be imported
22. Click onto button “Open” to load the selected file
19. Select the Indralogic−Project withthe left mouse button, press theright mouse button and select “Import PLC project data“
16CHAP 18Data Backup / Data Restore
Importing a Standalone IndraLogic Program (*.PRO−File)
24. Click onto the button “Import”,to import the selected objects
23. Select the Objects, which you want to import
25. Enter the following into the three password windows:
User name : ENIPassword : 123456
17CHAP 18Data Backup / Data Restore
Importing a Standalone IndraLogic Program (*.PRO−File)
26. The “PLC−Project data” is now integrated into“IndraWorks” and can be used for further processing
Language translation CHAP 19
Chapter 19Language
translation
Nachdruck, Vervielfältigung und Übersetzung, auch auszugsweise,nur mit unserer vorherigen schriftlichen Zustimmung und mit Quellenangabe
gestattet. Wir übernehmen keine Haftung für die Übereinstimmungdes Inhalts mit den jeweils geltenden gesetzlichen Vorschriften.
Reproduction, copying, or translation of this publication, wholly orin part, only with our previous written permission and with source credit.
We assume no responsibility for agreement of the contents with locallaws and regulations Bosch Rexroth AG is exempt from
liability, and reserves the right to make changes at any time.
1CHAP 19Language translation
Generation of the translation file
The original language used during the development of an IndraLogic PLC−Program can beautomatically translated into any other language by using a translation file. This translation file isautomatically generated with the original language text. The additional languages have than to beentered into the translation file manually by the user. The translation using the translation file can becarried out temporarily or permanent. If the translation is carried out temporary, it is possible to goback to the original language. If the translation is carried using the translate option, the original textsare replaced permantly by the text of the newly selected language.
3. Insert the languages into which you want to translate the original text
1. Select function“Project / Translate into other languages / Create translation file ...”
2. Select the objects you want to include into the tranlation file
2CHAP 19Language translation
Generation of the translation file
4. Start the generation of the translationfile by clicking onto the “OK” button
5. After completion of the generation, the system automatically switches back to IndraLogic
Note !If the translation file already exists, only the newly found objects will be added, existingtranslations will not be effected. Additionally a backup file is generated from the previousversion of the translation file.
3CHAP 19Language translation
Input of the translations into the translation file
1. Check, into whichdirectory the translation file is stored to.
2. Select the directory using the “Windows Explorer”and open the translation file with an ASCII−Editor
In order to enter the translations for the various languages into the translation file, the file has tobe opened with an ASCII−Editor like “Notepad”. The translation file is located in the samedirectory as your “*.Pro − File”. The translation file also has the same name as the“*.PRO−File”, but with the file extension “*.tlt”.
4CHAP 19Language translation
Input of the translations into the translation file
Original−String
Translation text
Original−Comment
Translation text
Original−String
Translation text
Original−Comment
Translation text
5CHAP 19Language translation
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
© 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.
CHAP 20 ICommand overview
Chapter 20
Command
overview
CHAP 20Command overview 1
Identifier, Keywords
Identifiers (Variable name)
Sequence of characters, numbers and underscore (_). Must start with a character or anunderscore (_). More than one leading underscor or several underscores in a row areinvalid. Identifiers must also not include any spaces. A minimum of 6 characters must besupported by every system.
Examples of Identifiers
STARTSTOPVALVE_6VALVE_E_7_16E8_Motor
CHAP 20Command overview 2
Identifier, KeywordsKeywordsA keyword consist of a sequence of characters without any “Spaces”.Keywords must not be used for any other purposes e.g. Variable names
KeywordsACTION...END_ACTIONARRAY...OFATCASE...OF...ELSE...END_CASECONFIGURATION...END_CONFIGURATIONCONSTANTENENOEXITFALSEF_EDGEFOR...TO...BY...END_FORFUNCTION...END_FUNCTIONFUNCTION_BLOCK...END_FUNCTION_BLOCKIF...THEN...ELSIF...ELSE...END_IFINITIAL_STEP...END_STEPPROGRAMM...WITH...PROGRAMM...END_PROGRAMMR_EDGEREAD_ONLYREAD_WRITEREPEAT...UNTIL...END_REPEATRESOURCE...ON...END_RESOURCERETAINRETURNSTEP..END_STEPSTRUCT...END_STRUCTTASKTRANSITION...FROM...TO...END_TRANSITIONTRUETYPE...END_TYPEVAR...END_VARVAR_INPUT...END_VARVAR_IN_OUT...END_VARVAR_EXTERNAL...END_VARVAR_ACCESS...END_VARVAR_GLOBAL...END_VARWHILE...DO...END_WHILEWITH
Furthermore:Data type namesFunction namesFunction block namesOperators of the LIST LanguageOperators of the ST Language
CHAP 20Command overview 3
Numerical literalsInteger literals and Real literals
Examples
-5 +96 628_26 Integer literalsunderscores between numbersmust be ommitted
-5.0 0.123 12.56 Real literals
6.2E – 4 i.e. 6.2e – 4 -2.6E + 3i.e. -2.6e + 3 12.0E3 i.e. 12.0e3
Real literals with an Exponent
2#1010_1010 Literal Base 2
8#156 Literal Base 8
16#FF Literal Base 16
0 1 Boolean Zero and One
FALSE TRUE Boolean FALSE and TRUE
String-LiteralsSequence of zero or more characters between two single quote characters (’)
Example
‘‘ Empty string with a length of zero
‘X‘ 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
‘$$6.00‘ String of the length five with, $6.00
$$ Dollar-Character $
$‘ Single quote character
$L bzw. $l Line feed
$N bzw. $n New line
$P bzw. $p New page
$R bzw. $r Carriage return
Time literals1.Duration of timeCommand 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.6hT#30h26m t#7d16h12m TIME#2.5h time#2.5hTime#12h_22m_48s T#16h_12m_18s
CHAP 20Command overview 4
Date and Time
DATE# bzw. D# Date
TIME_OF_DAY# bzw. TOD# Time of Day
DATE_AND_TIME# bzw. DT# Date and Time
Examples
Date#1996-04-6D#1996-04-6D#1996-04-6TIME_OF_DAY#17 : 19 : 40.12TOD#17 : 19 : 40.12DATE_AND_TIME#1996-04-12-17 : 26 : 45.16Dt#1996-01-12-17 : 26 : 45.16
Boolean Operators
Operator Parameter Comment Example
AND ANY_BIT AND Function STOUT := _S1 AND _S2
LISTLD _S1AND _S2ST OUT
OR ANY_BIT OR Function STOUT := _S1 OR _S2
LISTLD _S1OR _S2ST OUT
NOT ANY_BIT NOT Function, Negation STOUT := _S1 AND NOT _S2
LISTLD _S1ANDN _S2ST OUT
XOR ANY_BIT XOR-Function STOUT := _S1 XOR _S2
LISTLD _S1XOR _S2ST OUT
CHAP 20Command overview 5
Arithmetical Operators
OperatorLIST ST
Input-Parameter
Output-Parameter
Comment Example
ADD + ANY_NUM ANY_NUM Addition STResult := Value1 + Value2;
LISTLD Value1ADD Value2ST Result
SUB − ANY_NUM ANY_NUM Subtraction STResult : =Value1 − Value2;
LISTLD Value1SUB Value2ST Result
MUL * ANY_NUM ANY_NUM Multiplication STResult := Value1 * Value2;
LIST
DIV / ANY_NUM ANY_NUM Division; withANY_INT integerdivision
STResult : =Value1 / Value2;
LISTLD Value1MUL Value2ST Result
MOD ANY_INT ANY_INT Modulo (Reminderwith integer division)
STResult : =Value1 MOD Value2;
LISTLD Value1MOD Value2ST Result
EXPT Base:ANY_REALExponent:ANY_NUM
ANY_REAL Power of STResult := EXPT( Value1, Value2);
LISTLD Value1EXPT Value2ST Result
MOVE ANY_NUM ANY_NUM Assignment STResult := MOVE( Value1)
same asResult := Value1;
LISTLD Value1MOVE ResultST Result
same asLD Value1ST Result
CHAP 20Command overview 6
Compare Operators
OperatorLIST ST
Input-Parameter
Output-Parameter
Comment Example
GT > ANY_BITANY_NUMSTRINGTIMEANY_DATE
BOOL Greater than STX;= A > B;
LISTLD AGT BST X
GE >= ANY_BITANY_NUMSTRINGTIMEANY_DATE
BOOL Greater than orEqual
STX;= A >= B;
LISTLD AGE BST X
LE <= ANY_BITANY_NUMSTRINGTIMEANY_DATE
BOOL Less than orEqual
STX;= A <= B;
LISTLD ALE BST X
LT < ANY_BITANY_NUMSTRINGTIMEANY_DATE
BOOL Less than STX;= A < B;
LISTLD ALT BST X
EQ = ANY_BITANY_NUMSTRINGTIMEANY_DATE
BOOL Equal STX;= A = B;
LISTLD AEQ BST X
NE <> ANY_BITANY_NUMSTRINGTIMEANY_DATEANY_NUM
BOOL not equal STX;= A <> B;
LISTLD ANE BST X
CHAP 20Command overview 7
Bit manipulation
Function Input-Parameter
Output-Parameter
Comment Example
SHL IN:ANY_BITN:ANY_INT
ANY_BIT Shift left of IN byN−Bit
Value : Word := 2#0000_0000_0001_0101;N_Bit : WORD := 3;Result : WORD;
STSHR IN:
ANY_BITN:ANY_INT
ANY_BIT Shift right of IN byN− Bit
STResult := SHL (Value, N_Bit);
LISTLD ValueSHL N_Bit
ROL IN:ANY_BITN:ANY_INT
ANY_BIT Rotate left of INby N−Bit
SHL N_BitST Result
before SHL : 0000_0000_0001_0101 after SHL : 0000_0000_1010_1000
ii i h l f hif d iROR IN:ANY_BITN:ANY_INT
ANY_BIT Rotate right of INby N−Bit
3 posiitions to the left, zeros are shifted infrom the right
CHAP 20Command overview 8
Type conversion
Function Input-Parameter
Output-Parameter
Comment Examplee
*_TO_** ANY_NUM ANY_NUM Numerical types areconverted into eachother* Input data type**Output data type
Value_int : INT;Value_Real : REAL;
STValue_real := INT_TO_REAL(Value_int);
LISTLD Value_intINT_TO_REALST Value_real
TRUNC ANY_REAL ANY_INT Digits after thecomma are truncated
Value : REAL := 200.2345;Result : DINT;
STResult := TRUNC (Value)
LISTLD ValueTRUNCST Result
Result = 200
BCD_TO_* ANY_BIT ANY_INT *Data type”
Data of the groupANY_BIT inBCD-Format isconverted into theANY_INT-Format
Value_BCD : BYTE := 2#00010110;Value_INT : INT;
STValue_INT:=BCD_TO_INT (Value_BCD);
LISTLD Value_BCDBCD_TO_INTST Value_INT
Value_INT = 16
*_TO_BCD ANY_INT ANY_BIT *Data type“
Data of the typeANY_INT-Formatis converted intoBCD-Format
Value_BCD : BYTE ;Value_INT : INT := 16;
STValue_BCD:=INT_TO_BCD (Value_INT);
LISTLD Value_INTINT_TO_BCDST Value_BCD
Value_BCD = 00010110
CHAP 20Command overview 9
Numeric Functions
Function Input-Parameter
Output-Parameter
Comment Example
ABS ANY_NUM ANY_NUM Convert a number withsign into an absolutevalue(removes sign)
STResult := ABS(Value1);
LISTLD Value1ABSST Result
SQRT ANY_REAL ANY_REAL Square root STResult := SQRT(Value1);
LISTLD Value1SQRTST Result
LN ANY_REAL ANY_REAL natural Logarithm STResult := LN(Value1);
LIST
LOG ANY_REAL ANY_REAL Logarithm, Base 10 STResult := LOG(Value1);
LISTLD Value1LNST Result
EXP ANY_REAL ANY_REAL Exponential function (e) STResult := EXP(Value1);
LISTLD Value1EXPST Result
SIN ANY_REAL ANY_REAL Sine function (Radian) STResult := SIN(Value1);
LISTLD Value1SINST Result
COS ANY_REAL ANY_REAL Cosine function (Radian) STResult := COS(Value1);
LISTLD Value1COSST Result
CHAP 20Command overview 10
Numeric Functions
Function Input-Parameter
Output-Parameter
Comment Example
TAN ANY_REAL ANY_REAL Tangent function (Radian) STResult := TAN(Value1);
LISTLD Value1TANST Result
ASIN ANY_REAL ANY_REAL Arcus-Sine function STResult := ASIN(Value1);
LISTLD Value1ASINST Result
ACOS ANY_REAL ANY_REAL Arcus-Cosine function STResult := ACOS(Value1);
LISTLD Value1ACOSST Result
ATAN ANY_REAL ANY_REAL Arcus-Tangent function STResult := ATAN(Value1);
LISTLD Value1ATANST Result
CHAP 20Command overview 11
Selection Function
Function Input-Parameter
Output-Parameter
Comment Example
SEL G: BOOLIN0: ANYIN1: ANY
ANY Binary selection
OUT = Value1, if test = False
OUT = Value2,if test = True
Pruef : BOOL;Value1 : REAL;Value2 : REAL;OUT : Real
STOUT := SEL(test, Value1, Value2)
LISTLD testSEL Value1, Value2ST OUT
MAX ANY_BITANY_NUMSTRINGANY_DATETIME
ANY_BITANY_NUMSTRINGANY_DATETIME
Maximum-Function
OUT = highestvalue out of a list
STOUT := MAX (Value1, Value2, Value3)
LISTLD Value1MAX Value2MAX Value3ST OUT
MIN ANY_BITANY_NUMSTRINGANY_DATETIME
ANY_BITANY_NUMSTRINGANY_DATETIME
Minimum-Function
OUT = smallestvalue out of a list
STOUT := MIN (Value1, Value2, Value3)
LISTLD Value1MIN Value2MIN Value3ST OUT
LIMIT MN, IN, MX:
ANY_BITANY_NUMSTRINGANY_DATETIME
ANY_BITANY_NUMSTRINGANY_DATETIME
Limiter
OUT = Value_min,if number is smal-ler than Value_min
OUT = Value_max,if number is higherthan Value_max
STOUT := LIMIT (Value_min, Zahl, Va-lue_max)
LISTLD Value_minLIMIT Zahl, Value_maxST OUT
MUX C: ANY_INTothers:ANY
ANY Multiplexer
OUT = W1,if select = 0;OUT = W2,if select =1OUT = W3,if select=2etc.
STOUT := MUX (select, W1, W2, W3, W4)
LISTLD selectMUX W1, W2, W3, W4ST OUT
CHAP 20Command overview 12
String Functions
Function Input-Parameter
Output-Parameter
Comment Example
LEN STRING INT calculates thenumber ofcharacters in astring
STLenght_INT := LEN(Text_STR);
LISTLD TextLENST Lenght_INT
LEFT IN:STRINGL:ANY_INT
STRING Extractscharacters froma string String(Text_STR)starting at the leftside of a string,number ofcharacters(Nr_INT) areextracted
STLeft_STR := LEFT(Text_STR, Nr_INT);
LISTLD Text_STRLEFT Nr_INTST Left_STR
RIGHT IN:STRINGL:ANY_INT
STRING Extractscharacters froma string String(Text_STR)starting at theright side of astring, number ofcharacters(Nr_INT) areextracted
STRight_STR := RIGHT(Text_STR, Nr_INTl);
LISTLD Text_STRRight Nr_INTST Right_STR
MID IN:STRINGL:ANY_INT
STRING Extractscharacters fromthe middle of astring(Text_STR)starting at acertain position(Start_INT) acertain numberof characters(Nr_INT)
STCentr_STR := MID(Text_STR, Start_INT, Nr_INT);
LISTLD Text_STRMID Start_INT, Nr_INTST Centre_STR
CONCAT STRING STRING Combines2 individualstrings into onestring
STNew_STR := CONCAT(T1_STR, ’Day’);
LISTLD T1_STRCONCAT ’Day’ST New_STR
INSERT IN1, IN2:STRINGP:ANY_INT
STRING Inserts into anexisting string(Org_STR)another string(Ins_STR)starting at acertain position(P_INT)
STNew_STR := INSERT(Org_STR, Ins_STR, P_INT);
LISTLD Org_STRINSERT Ins_STR, P_INTST New_STR
CHAP 20Command overview 13
String Funktions
Function Input-Parameter
Output-Parameter
Comment Example
DELETE IN:STRINGL, P:ANY_INT
STRING Removes froman existing string(Org_STR)starting at acertain position(Pos_INT) acertain numberof characters(Nr_INT)
STNew_STR := Delete(Org_STR, Pos_INT, Nr_INT);
LISTLD Org_STRDELETE Pos_INT, Nr_INTST New_STR
REPLACE IN1:, IN2:STRINGL, P:ANY_INT
STRING Replacescharacters in anexisting string(O_STR) by anew string(N_STR), startingat a certainposition (P_INT),for a number ofcharacters(Nr_INT)
STNew:= REPLACE(O_STR, N_STR, P_INT, Nr_INT);
LISTLD O_STRREPLACE N_STR, P_INT, Nr_INTST New
FIND IN1, IN2:STRING
INT Searches in anexisting string(Org_STR) for acertain sequenceof characters(Search_STR)and returns thestart positionwhere the searchstring was found.If the searchstring is notfoung, thefunction returnsZero
STPos_INT:= FIND(Org_STR, Search_STR);
LISTLD Org_STRFind Search_STRST Pos_INT
CHAP 20Command overview 14
Standard-Function blocksFlip Flop Elements
Functionblock
Input-Parameter
Output-Parameter
Comment
SR S1, R: BOOL Q1: BOOL Flip Flop with priority Set
RS S, R1: BOOL Q1: BOOL lip Flop with priority Reset
Flankenerkennung
Functionblockn
Input-Parameter
Output-Parameter
Comment
R_TRIG CLK: BOOL Q: BOOL at the rising edge at CLK set Q TRUE.
F_TRIG CLK: BOOL Q: BOOL at the falling edge at CLK set Q TRUE.
Timer
Functionblock
Input-Parameter
Output-Parameter
Comment
TON IN: BOOLPT: TIME
Q: BOOLET: TIME
Switch on delay
IN : rising edge starts timer elementPT : Delay timeQ : If time is elapsed set to TRUEET : actual value of timer
TOF IN: BOOLPT: TIME
Q: BOOLET: TIME
Switch Off delay
IN : rising edge starts timer elementPT : Delay timeQ : If time is elapsed set to TRUEET : actual value of timer
TP IN: BOOLPT: TIME
Q: BOOLET: TIME
Pulse
IN : rising edge starts timer elementPT : Delay timeQ : If time is elapsed set to TRUEET : actual value of timer
RTC IN: BOOLPDT: DATE
Q: BOOLCDT: DATE
Real Time Clock
IN : rising edge, Date + Time is loadedPDT: Preset for Date + TimeCDT: actual Date+ actual TimeQ : like EN
Note:If a rising edge is detected at IN, the time is set.Time is running as long as IN is TRUE
CHAP 20Command overview 15
Counter
Functionblock
Input-Parameter
Output-Parameter
Comment
CTU CU: R_TRIG (BOOL)R: BOOLPV: INT
Q: BOOLET: TIME
Count Up, counts from zero to PV.CU : Count pulse (rising edge)PV : Command value for counterR : Reset (CV to 0)Q : if PV is reached, set Q to “TRUE” CV : actual counter value
CTD CD: R_TRIG (BOOL)LD: BOOLPV: INT
Q: BOOLET: TIME
Count Down, counts from PV down to zeroCD : Count pulse (rising edge)PV : Start value for counterLD : Load start value from PV into CVQ : If PV = 0, than set Q to TRUECV : actual counter value
CTUD CU, CD: R_TRIG(BOOL)R, LD: BOOLPV: INT
QU, QD: BOOLCV: INT
Up / Down CounterQU : 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
© 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.
CHAP 21 IExercises
Chapter 21
Exercises
1Exercises CHAP 21
Network structure
PC_1
PC_2
PC_3
PC_8
L40_1
L40_2
L40_5
Trainer−1
192.168.1.101
192.168.1.102
192.168.1.103
192.168.1.108
192.168.1.11
192.168.1.12
192.168.1.15
192.168.1.200
S
W
I
T
C
H
Subnet : 255.255.255.0
L40_1
L40_2
192.168.1.13
192.168.1.14
2Exercises CHAP 21
I/O − Bus Configuration
Interbus L40
Rexroth Inline −−−> Type : R − IB IL 24 DO 16
Rexroth Inline −−−> Type : R − IB IL 24 DI 16
I8.0 ... I9.7
Q8.0 ... Q9.7
OnBoard I/O’s L40
I0.0 ... I0.7
Q0.0 ... Q0.7
Profibus−DP Master 10
12
13
R−ILB PB 24 −−−> Type : ILB PB 24 DI16 DO16
B − IO K − DP −−−> Type : 16DI / 16DA
Switch boxI4.0 ... I5.7Q4.0...Q5.7
I60.0 ... I61.7Q60.0...Q61.7
I62.0 ... I63.7Q62.0...Q63.7
Robot & Transport slide
Press In Station
R−ILB PB 24 −−−> Type : ILB PB 24 DI16 DO16
3Exercises CHAP 21
Program structure
4Exercises CHAP 21
Global Variables Inputs and Outputs
5Exercises CHAP 21
Signal list Switch Box (Bit signals)Inputs I4.0 _S0 Switch 0
I4.1 _S1 Switch 1I4.2 _S2 Switch 2I4.3 _S3 Switch 3I4.4 _S4 Switch 4I4.5 _S5 Switch 5I4.6 _S6 Switch 6I4.7 _S7 Switch 7
I5.0 _S8 Switch 8I5.1 _S9 Switch 9I5.2 _S10 Switch 10I5.3 _S11 Switch 11I5.4 _S12 Switch 12I5.5 _S13 Switch 13I5.6 _S14 Switch 14I5.7 _S15 Switch 15
Outputs Q4.0 _Y0 Led 0Q4.1 _Y1 Led 1Q4.2 _Y2 Led 2Q4.3 _Y3 Led 3Q4.4 _Y4 Led 4Q4.5 _Y5 Led 5Q4.6 _Y6 Led 6Q4.7 _Y7 Led 7
Q5.0 _Y8 Led 8Q5.1 _Y9 Led 9Q5.2 _Y10 Led 10Q5.3 _Y11 Led 11Q5.4 _Y12 Led 12Q5.5 _Y13 Led 13Q5.6 _Y14 Led 14Q5.7 _Y15 Led 15
Signal list Switch Box (Byte & Word)Inputs I4 _S0_S7 Byte
I5 _S8_S15 ByteI4 _S0_S15 Word
Outputs Q4 _Y0_Y7 ByteQ5 _Y8_Y15 ByteQ4 _Y0_Y15 Word
Signal MarkersM20.0 _Auto Automatic modeM20.1 _manual manual modeM20.2 _Jog Jog modeM20.3 _Special Special mode
6Exercises CHAP 21
Example 1
Example 2
7Exercises CHAP 21
Example 3
8Exercises CHAP 21
Example 4
9Exercises CHAP 21
Example 5
10Exercises CHAP 21
Example 6
11Exercises CHAP 21
AND before OR Circuit
1 −S10 & −S11 O −S12 >=1 −S20 & −S21 + = −Y7
12Exercises CHAP 21
Circuit with bracket
2 −S1 & −S2 −S3 −S10 & −S11 >=1 −S12 & −S13 −S17 −S18 >=1 −S20 & −S21 + = −Y8
13Exercises CHAP 21
Circuit with OR−bracket
3 −S12 & −S13 O −S2 O & −S3 >=1 −S4 & −S5 −S16 >=1 −S19 & −S21 O −S22 + = −Y9
14E
xercisesC
HA
P 21
Robot Station
Q60.4Q60.5
I60.7 I61.0
I61.1 I61.2
Transportation Slide
Q60.0
Q60.1
Q60.3
Q60.2
I60.5 I60.4
I60.6
Q60.6
I60.0
I60.1
I62.6
I62.2 I62.3
Q62.3Q62.2
I62.5
I62.4
I62.0
I62.1
I62.7
Q62.1
Q62.0 Q62.4
Q62.5
Q60.7Q61.0
I60.3 I60.2
PressIn Station
15Exercises CHAP 21
Signal list machine modelRobot Station
Inputs
Address Symbol name CommentI60.0 301S101B Robot Rotation Arm at topI60.1 301S101A Robot Rotation Arm at bottomI60.2 301S201A Robot Rotation Arm at rightI60.3 301S201B Robot Rotation Arm at leftI60.4 301S301A Robot Rotation Arm at frontI60.5 301S301B Robot Rotation Arm at rearI60.6 301S401A Robot Gripper closed
Outputs
Address Symbol name CommentQ60.0 301Y101B Move Robot Rotation Arm UpQ60.1 301Y101A Move Robot Rotation Arm DownQ60.2 301Y201B Move Robot Rotation Arm to the leftQ60.3 301Y201A Move Robot Rotation Arm to the rightQ60.4 301Y301A Move Robot Arm to the frontQ60.5 301Y301B Move Robot Arm to the backQ60.6 301Y401A Close Robot Gripper
Transportation slide
Inputs
Address Symbol name CommentI60.7 401S101B Transportation slide at frontI61.0 401S101A Transportation slide at rearI61.1 401S101 Transportation slide occupied at frontI61.2 401S201 Transportation slide occupied at rear
I63.0 400S600 PressIn ready
Outputs
Address Symbol name CommentQ60.7 401Y101B Transportation slide backwardQ61.0 401Y101A Transportation slide forward
Q61.1 400Y600 Enable signal Robot station ready
16Exercises CHAP 21
Signal list machine modelPress In station
Inputs
Address Symbol name CommentI62.0 501S101B Safety gate at topI62.1 501S101A Safety gate at bottomI62.2 501S201B Horizontal unit at frontI62.3 501S201A Horizontal unit at rear
I62.4 501S301B Press In unit at topI62.5 501S301A Press In unit at bottomI62.6 501S101 Part present at frontI62.7 501S201 Part present at rear
I63.0 500S600 Robot ready
Outputs
Address Symbol name CommentQ62.0 501Y201B Safety gate upQ62.1 501Y201A Safety gate downQ62.2 501Y101B Pusher forwardQ62.3 501Y101A Pusher backwardQ62.4 501Y301B Press In unit upQ62.5 501Y301A Press In unit down
Q62.6 500Y600 Enable signal Press In−Station ready
17Exercise CHAP 21
Exercise Programming of a Function
Movement from Work to Base Position
Movement from Base to Work Position
−−−−> −−−−−−>
Base_Move
CallupPLC_PRG Manual_Move_Robot
Work_Move
−−−−−−>
Reset movement to Work
Reset movement to Base
Set movement to Work
Set movement to Base
18Exercise CHAP 21
Exercise Programming of a Function
Logic from Work to Base Position
Logic from Base to Work Position
Switch assignment − Switch box
_S7 _S6 _S5 _S4 _S3 _S2 _S1 _S0
ManualAuto
E−StopJogBase
JogWork
StartDoorJogJogMode
_S15 _S14 _S13 _S12 _S11 _S10 _S9 _S8
GripperCloseOpen
PressInUpDown
GateUpDown
PusherForwBackw
Slide.ForwBackw
RobotUpDown
RobotrightLeft
RobotForwBackw
19Exercise CHAP 21
Exercise Programming of a Function Block
CallupPLC_PRG Manual_Move_Stat120 Instances of BaseMoveFB
−−−−> −−−−−−>
Switch assignment − Switch box
_S7 _S6 _S5 _S4 _S3 _S2 _S1 _S0
ManualAuto
E−StopJogBase
JogWork
StartDoorJogJogMode
_S15 _S14 _S13 _S12 _S11 _S10 _S9 _S8
GripperCloseOpen
PressInUpDown
GateUpDown
PusherForwBackw
Slide.ForwBackw
RobotUpDown
RobotrightLeft
RobotForwBackw
20Exercise CHAP 21
Exercise Programming of a Function Block − Manual logic
Logic − Manual Mode => Input Manual = ”TRUE”
Local variables
21Exercise CHAP 21
Exercise Programming of a Function Block − Automatic logic
Logic − Automatic Mode => Input Manual = ”FALSE”
Logic − Set outputs
22Exercises CHAP 21
Automatic Sequence “Robot Station”
23Exercises CHAP 21
Automatic Sequence “Robot Station”
24Exercises CHAP 21
Automatic Sequence “Robot Station”
25Exercises CHAP 21
Automatic Sequence “Transportation Slide”
26Exercises CHAP 21
Automatic Sequence “Press In Station”
27Exercises CHAP 21
Automatic Sequence “Press In Station”