Home
"user manual"
Contents
1. PCD1 32 64 PCD2 M120 M150 64 96 128 255 PCD2 M170 PCD3 C100 510 PCD2 M480 PCD3 C100 1023 PCD3 Mxxxx 1023 PCD4 510 PCD6 5100 1 The addresses 255 and 511 for PCD2 M170 are reserved for the watchdog 2 The addresses 255 511 767 1023 until 5119 are reserved for the watchdog 3 with inputs cards PCD2 3 E165 and or ouputs cards PCD2 3 A465 Inputs and outputs represent signals to or from the PCD Inputs show the state of end switches pushbuttons proximity detectors sensors etc Outputs can be used to activate valves lamps A C motors etc You can read and write outputs Inputs can only be read Inputs and outputs are added to the PCD by placing 1 0 cards into one of the designated slots on the PCD The start address of a slot is defined either by its position PCD1 2 3 and 4 or by switches PCD 6 The following example turns on output O 64 if inputs 11 and 2 are both high Another way to show such functions is by using boolean equations O 64 11 12 Instruction list program Fupla program COB 0 a ot STH 11 ANH 12 OUT O64 Fbox Binary And ECOB PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 5 3 2 2 Time A real time clock RTC is built into most PCDs PCD1 M120 130 and all PCD2 3 4 6 A special instruction is used to load the date and time into a register The following example shows how to read the time in a
2. Backup E jind Floor Fup Backup Project or CPU Compress projector _ fles E one of the CPUs tation Files etme in PEC a meee leer AA OARA ontrol PCD To Compressed File D CAPISProject City Hall zip Select zip file of project or CPU Comment Backup what Diskette Options Al files For destination dives A or B only Format diskettes first Delete all files on diskettes first Al files except listings and docs Source files only Help Cancel 1 The File Restore menu command lets you restore a project CPU that has been saved in a ZIP file PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 7 2 2 4 2 2 5 Opening a project The PG5 is delivered with all the examples in this manual included The File Open Project menu command allows you to open them and try them out An existing project can be opened with command File Open Project This locates all the project files 5pj in the projects directory and displays them in a list Double click on one of the projects in the list or select a project and press the Open button Alternatively press the Browse button and look for the project file 5pj or CPU file 5pc directly Open Project l Project Directory Directory of saved projects D PG5 Projects amples Project List Relative Path Chapter 1 Quick Start Fupla Chapter 1 Quick Start Fupla Chapter 1 Qu
3. 1 Position mouse cursor on value to edit Press right hand mouse button 2 Edit the new value Display format The display format of values can be adjusted as required Example Display register R 2004 in hexadecimal Insert Line Ins Delete Line Del Delete All Paste er 000 Decimal Ctrl D Floating Point Ctrl F Units e Hex trl H Shaw ASCII Sort Binary 0 Refresh Rate i 113245 iii 0002 6FO0H Open Chrl o 53000 Save Os Chrl 5 Edit Data Ctr E Help F1 About S y PG5 Workshop Chapter 8 Additional tools 05 07 04 Saia Burgess Controls Ltd 8 4 Online configurator The PG5 provides two configuration tools e The offline configurator which can be accessed from the Hardware Settings of the Project Manager e The online configurator which can be accessed with the Tools menu Online Configurator or with the Online Configurator button A E watter Distribution B Settings Offline configurator a oul Configures memory communications parameters and the PCD password This coe Hardware els saree information is saved in a PG5 project file The user must use the Download button to force a download of the configuration into PCD memory Online configurator Configures memory communications parameters and the PCD password However r this information is written directly to PCD memory No copy of the information will Online Configurator remain in
4. Fox internal static variable Rs ce X o Linked with adjust warables Reserves from A 10 to R 11 Variable Resource Enclenchement zaas A 10 De clenchement gaast A 11 Define parameter base address Edit Resource x Scope S885 Local Toe Array Size Define by System Register integer gt E Aare a Help Build the program and open the symbol editor System symbols have been assigned the register addresses shown below Rebuild All Symbols and addresses of Groupjsymbol type OY EE A cpap adjust parameters E Hc E a ERJ DailyTimer 1 GROUP Symbol Editor E ne HG OMT ine R id LP OFF Time R z 2 F al System Ta Global o Daily Timer H C PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 4 36 Saia Burgess Controls Ltd 4 15 Commissioning an analogue module 4 15 1 Acquisition of an analogue measurement The sample programs presented up until now make use of digital inputs and outputs putting their addresses or symbols in the margin of the FUPLA editor With analogue input or output modules an FBox must be used to acquire the analogue value These FBoxes are available with libraries Standard Analogue Add modules Applications and HEAVAC Analogue These libraries offer a wide variety of FBoxes each corresponding to an analogue module The name that appears in the FBox Selector matches the module item nu
5. Write the symbol name the type L EL_3DE46FEC i a comment and press Enter 5 E E cn Ta Global E Ml air Ready 4 Block COB BL_3DE46FEC Page 1 1 58x54 at Group Symbol fe Addressivalue Comment AS 17 EL EL_3DE46FEC in EE Symbol Any comment 5 p cn Pal Global E Main Block COB BL_SDE 6FEC Page 1 1 58x54 Zz PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 9 8 Transferring symbols To avoid entering symbol names several times in one program running the risk of typing errors one or more symbols can be selected from the symbol editor and dragged into the Fupla or IL program Example showing selection of several symbols Symbols Use the mouse to select the first xj symbol aa HC BL_30DE379F ea Or sinpump Output i Drainpumpe Output HCI Drainpump3 lt lt lt oril Muroue Pumps in building F FCI Drainpump4 Sukut Pumps in building F LI DrainpumpS Pumps in building F LE Orainpump Gutput Pumps in building F LC Drainpump utp Press the Shift key select the last symbol 4 Ta Global Press the Alt key select an individual symbol Example showing symbol dragged into the Fupla or IL editor Position mouse pointer at centre of symbol icon Press mouse button Without releasing mouse button drag the symbol into the editor a OUT Drainpump1
6. Add Units of measurement depend on the module FBox and adjust parameters selected The PCD2 W340 is a universal module It supports measurement of ranges 0 10V 0 2 5V 0 20 mA and Pt Ni 1000 temperature sensors A bridge must be selected on the module to define the measurement range Resolution is 12 bits equating to 4095 distinct measured states For more detailed information about these modules please refer to your PCD hardware manual The PCD2 W3 FBox supplies a raw measurement For this module with a resolution of 12 bits that corresponds to a measured value between 0 and 4095 The user then has the task of converting the measurement into a standard physical unit The PCD2 W34 FBox is more elaborate An adjust window allows units of measurement to be defined for each channel The FBox LED turns red if one of the measurements exceeds the valid range short circuit or break in sensor cable The error can be acknowledged with the Acknowledge button in the adjust window Ereu Suittance Configuration des cannaux O 7J 00000 ChO Mode ou type de sonde gt miv Ch 2 Mode ou type de sonde gt The PCD2 W34 with error FBox offers the same services for converting units but also has an error output indicating which channel has the error plus an additional adjust parameter to define a default value in case of error Sortie en cas d erreur gt ancienne valeur PG5 WorkShop Chapter 3 Fuplal 22 09 04
7. Sequential blocks SB are a collection of Steps and Transitions In each step you execute a part of your program and in each transition you wait for a condition to occur in order to continue with the following step This is known as a Graftec program Graftec programs are created using a special editor called S Graf and the files have the extension sfc The Graftec editor is explained in the next chapter It is an excellent tool if you have to solve programming tasks where your installation deals with a situation in a sequential manner SBs can be called from any other block 5 21 5 8 Summary table Service M dia Operand Notices Cyclic Organization COB 0 15 Minimum 1 COB by program Block Programme Block PB 0 299 Under programs called by a COB PB FB SB or XOB Function Block FB 0 999 Function with parameters called by a COB PB FB SB or XOB Sequential Block SB O32 Sequential under programs called 0 96 1 by a COB PB or FB SB XOB Step ST 0 1999 0 5999 Transition TR 0 1999 0 5999 1 PCD2 M170 480 PCD4 M170 et PCD3 PG5 WorkShop Chapter 5 Structures 05 07 04 5 22 Saia Burgess Controls Ltd PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd Contents 6 Graftec programming 6 1 Introduction 6 2 Sequential Blocks SB 0 to 31 96 6 3 Cyclic Blocks 6 3 1 Cyclic programs 6 3 2 Cycle time 6 4 Make a new Graftec file 6 4 1 Create new proj
8. syntax to follow symbol_name type address comment If the new symbol has been defined using the above syntax pressing the enter key on the keyboard will automatically place information in the correct fields Quick method 2 Group Symbel Addressjvalue Comment OUT Red light 0 32 Stop new cars Group Symbol Address Value Comment Aa LC Ried light Stop new cars OUT Red light New symbols can also be added when editing the program To do this edit a line of program code with the mnemonic and its operand For the operand enter the symbol name and definition following the syntax below symbol_name type address comment Pressing the enter key on the keyboard with automatically place the new symbol on the Symbols list but only if the symbol definition is correct and only if the Automatically add entered type value to the Symbol Table option has been selected menu Tools Options in the IL editor PG5 WorkShop Chapter 7 Programming in IL 28 09 04 7 10 7 4 2 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Operand addressing modes A symbol definition does not necessarily include all the information presented below We distinguish between three types of addressing Absolute addresses Group Symbol Type Address alue Comment utpat a2 Stops new cars The data is defined only with a type and address e g 32 and an optional comment Using absolu
9. l am s2ee2k2 CT y Sw Tur pann RED aar yy amey qeus D ane ase Er LN a CLAD oe BS E B a ram s TN q A TS Raas at d 7 L Lt Da S s to a mt A FN D eai A t i gt Beep a A ja P KH CD PROC gt n 4 4 ri r 6 4 et w i ke f hd T 40 an bxi ai To aaa iv 5 p L i AtA t 43 af gt Lact ur di Be as n I AT bot T tt Ps i t T LA t AAHH 3 mi Ji i Ad a a l De i E Programming tools for SAIA PCD con Programming project planning and configuration of PLC based systems ma TTT iA tT aint TH Controls trollers Advantages of the PG5 programming tools m Program portability PG5 programs can run on all SAIA PCD platforms m Program organization by files containing several program blocks simplifies Us er Manu al the shared use of program files between several SAIA PCD controllers m Accepts existing PG3 and PG4 programs m Programming and debugging environments united in each program editor E Simple programming of terminal displays with the HMI Editor m Powerful instruction set supported by macros and assembler directives Features of the PG5 m Symbol Manager administers all local global and network symbols or symbol groups Automatic address allocation largely dispenses with the need for fixed addressing m Project Manager administers complex installations of networked PCDs includ ing displays and documen
10. The communications speed and bus profiles are defined using the Edit Bus Parameters menu command Saia Burgess Controls SA If a PCD7 T7xx station is connected to the network always choose the S Net bus profile Using network symbols in Fupla or IL programs Groups Symbol 4ddress Value txt 1510 Temperatured HEI Temperature HEJ Temperatures Temperatures LE Temperatures HG Temperatures HGJ Alarm LE Alarm LE Slarmz HG Alarma H I Alarm LE SlarmS LE Alarm LE Alarm pnl Tn al a A ant Pant fa sul a fee pe peal eo bi ProfiS 10 S10 Network Temperature Temperature Temperature Alarm RemoteOutputt SIO SLAVE_ sl2_m0_10 0 SIG SO SLAVE 2 sl2_m0_10 2 SIG SIO SLAVE_ sl2_m0_1044 SIO SIO SLAVE _2 sl2_m1_10 0 SIG SIO SLAVE _2 sl2_ml_10 2 SIO SIO SLAVE_ sl2_mi_10 4 SIG SO SLAVE_2 sl2_m1_10 6 SIO SLAVE_2 sl2_m1_10 7 Ta Global Local Process SLAVE_2 sl2_m0_1041 SLAVE_2 sl2_m0_ 1043 SLAVE_2 sl2_m0_1045 SLAVE_2 sl2_mi_1041 SLAVE_2 sl2_mi_1043 SLAVE_ sl _m4_1045 SASI Text After compilation of the S Net file Project Compile menu command the Symbol Editor displays a new page containing the accessible network symbols These symbols can be used directly in Fupla and IL programs PG5 WorkShop Chapter 12 Profi S IlO 01 12 04 Saia Burgess Controls 12 7 12 9 Further information For more information please refer to t
11. 4 38 Saia Burgess Controls Ltd 4 15 3 Example for PCD2 W610 analogue output modules The same principle applies as for inputs the user puts an FBox corresponding to the analogue output module on the FUPLA page drags it to select the number of output channels and defines the module base address Unlike input FBoxes the setpoints of analogue outputs are displayed on the left side of the FBox These inputs can be linked directly to other FBoxes or to registers defined in the left margin of the FUPLA page If the PCD is equipped with a PCD2 W610 module which has 4 universal analogue outputs the FBox below may be used to output a current of 0 20 mA or a voltage of 0 10 V PLD WB j Add Fbox PCD2 W6 A bridge must be selected on the module to define the output range The resolution of this module is 12 bits equating to 4095 distinct setpoint states The integer value at the FBox input determines the output voltage or current of the channel Input value at Fbox Output voltage V Output current mA 2047 4095 Other FBoxes have an adjust window for adapting the range of setpoint values applied to the FBox input e g the FBox for the PCD2 W605 module which has 6 electrically isolated outputs of 0 10 V The parameters User scaling 0 and 100 allow values to be defined for the minimum and maximum channel voltages applied to the FBox input The Reset value parameter corresponds to the value applied to t
12. AOIR A EE a a wr Cyclica Start of COB e Tae Cyclical program 8 No supervision time STH Car_incoming A car comes into the parking DYH Dynamise incoming car signal j On the positiv flank of incor DEC Humber of free slots Decrement the number of fre Sequence of ENESENN ERNE RESETE TE mente Soe wee a instruction i o STH Car_outgoing A car leaves into the parking processing within block DYH Dynamise leaving car signal On the positivu flank of outgo INC Humber of free slots Increment the number of fre STL Number_of free slots If no more free parking slots OUT Red light Set the red light End of COB ECOR End of Cyclical program xl 4 Pai a Car incoming Input 0 ets high when a car comes into the parking H Car_oukgoing Input 1 Gets high when a car leaves the parking LL Red light Mutput 32 Stops new cars at the entry HG Mumber_of_Free_slots Counter Counts the number of Free parking slots Dynamise incoming car_signal F Flag detects the rising edge of the car incoming Le Dynamise leaving _car_ signal F Flag detects the rising edge on the car leaving 4 a System Ta Global Parking lot The IL editor is similar to any other commercial text editor The same text functions are present such as Copy Paste or Find Replace However the IL editor offers more than conventional text editing e Page layout specially adapted to writing PCD programs e Colours enabling each type of
13. CO CO OO O CON N 6 1 6 13 6 13 1 6 13 2 6 14 6 14 1 6 14 2 PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Build and debug your program Message Window Online tools Graftec structure with pages Define a page Edit a page Saia Burgess Controls Ltd 23 23 23 24 24 25 Saia Burgess Controls Ltd 6 Graftec programming 6 1 Introduction This chapter deals with sequential blocks also referred to as SBs SBs are made up of two basic elements transitions and steps SBs are programmed with the Graftec editor In this chapter you will learn What an SB is How to call an SB How to organize several SBs Some typical SB structures How to program SBs How to structure the program into a page format Coi aa a r ne PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 3 Saia Burgess Controls Ltd 6 2 Sequential Blocks SB 0 to 31 96 In the following pages we will describe a program structuring technique called Graftec or Sequential Function Chart which is particularly effective for sequential programs where it is necessary to wait for events that may either be programmed or external to the controller Because these waits are of indeterminate length we cannot estimate the cycle time of sequential programs It is therefore important to separate cyclic programs completely from sequential programs Waiting for a sequential event must never block the continuous exec
14. Drag the FBox back to its original position and release the mouse button Use this method for the other connections Press the Lines Mode button Click on the starting point with the left hand mouse button and release it Move the mouse pointer to the right as far as required and press the left hand mouse button again Move the mouse vertically and click the left mouse button once more Move the mouse pointer to the FBox connector and press the left hand mouse button again to finalise the connection If necessary line drawing can be aborted by pressing the right hand mouse button Deleting a line or function block Press the Delete Mode toolbar button and click on the line or FBox to be deleted PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd Saia Burgess Controls Ltd 1 4 1 4 1 1 4 2 Running and testing the program Building the program Build Before the program executed by the PCD it must be build compiled assembled and linked using the Project Manager s CPU Build menu command or the Build toolbar button of the Fupla Editor or Project Manager Build All The results of the build are shown in the Messages window Compiling Assembling Linking etc If the program has been correctly edited the build function completes with the message Build sucessful Total errors 0 Total warnings O Errors are indicated by a red error message Most errors can be located in t
15. E ulset ounter Graftec Decrementc counter IL program DEC PulseCounter Ifthe accu is still at 1 decrement counter N B The accu is always at 1 at the start of an ST TR 6 12 10 Alternate branching The last two transitions are then straightforward Fupla program IL program Counter 0 Counter 0 STL PulseCounter Fbox Graftec Counter is zero 5 Decrement a i TA Counter 0 ETR STH PulseCounter Counter Transition 3 the input ETR is active if the counter value is zero Transition 4 the input ETR is active if the counter value is not zero s Put an inversion at the input of Invert Binary function ETR with button invert connector binary connector PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 23 6 13 Build and debug your program Once you have finished the drawing you can compile the entire program by clicking on the Build button Build All 6 13 1 Message Window Global symbols 33 Linkage complete O errors 0 warnings The message window will provide all the information you need Generating Block Information files Block Information Files complete Build successful Total errors 0 Total warnings 0 If you have entered the program correctly the message window will now report Build successful Total errors 0 Total warnings O If there are any errors they will be indicated in red text Double clicking on the e
16. Emx Ty Project Manager has three windows The Project window shows the structure of the project with the PCD CPUs that make it up To display this window select menu path View Project Tree or click on the Project Tree Project Tree button A The Message window shows alarm and error messages generated during any build of a the program To display this window select menu path View Project Tree or click on the Message Window button Message Window The View window shows the View list block list block structure or text files It also allows symbols to be cross referenced PG5 WorkShop Chapter 2 Project management 05 07 04 2 6 Saia Burgess Controls Ltd 2 2 2 Saving the project to a PC By default projects are saved in directory C PG5 Projects The project is saved in a directory bearing the same project name It uses one subdirectory per CPU Dor File Backup i Lst 9 obj G Sym G ventilaon_contral File Restore Ol project City Hall zip 2 2 3 Compressing a project or CPU When a project is saved the entire structure of directories and the files they contain must be preserved The simplest method is to compress the whole structure into a ZIP file using the Backup command This is supported as follows Select project file or Tree Tee eer ere Pee Te Te eT ee eT Te ee ee ere er were eee 3 one of the CPUs H ainiti Select menu command File Backup
17. FBor Selector E x Binary family Binary Integer Floating Point Flip Flop Counter Blinker Time related Converter Buffers Nata Bloacke Standard Application User Ladder Standard group All the graphical functions FBoxes needed to produce programs are listed in the FBox selector window They are divided into groups Add FBox The Standard group comprises all the basic functions needed by all users The Application group comprises functions that are specific to certain specialized professional domains The Ladder group comprises all the functions required for ladder diagram programming in the form of contact plans Each group is in turn subdivided into families containing all the functions that cover a particular field of application For example with the Standard group we have the following function families Binary FBoxes for producing logical equations Integer FBoxes for arithmetic with whole numbers Floating Point FBoxes for floating point arithmetic Counter FBoxes for counting tasks Time related FBoxes for time related tasks Analogue Module FBoxes for the control of analogue modules Communication FBoxes for exchanging registers flags on the S Bus network or Ethernet Converter FBoxes for converting binary to integer integer to floating point PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 Saia Burgess Controls Ltd 4 5 2 Edit FBox The f
18. LL Drainpumpe LL Drainpumps PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 25 3 26 3 5 9 3 5 10 Saia Burgess Controls Ltd Auto complete symbols If you use long symbol names your program will be easier to read However it would be annoying to have to re enter a long symbol name every time you use it in the program This can be avoided by simply entering the first letters of a symbol and then pressing the Cirl Space keys to look up all the symbols that match those letters Example Choose a Symbol Gf Choose the Symbol Ctrl Space Ctrl Space gt sth switchposi gt Auto allocation sth Until now we have always declared the elements like this symbol name Type Address Comment Example Pumpspeed R 2000 Speed in l min If you are entering any symbol type other than an input or an output you do not have to enter an address for them If you do not enter an address the PG5 will assign an address to your element at build time We call this automatic or dynamic allocation The PG5 will look up the address range configured in the Software Settings for that element and assign an address during the build process Example Pumpspeed R Speed in l min If you declare a register in your program without giving it an address 5 4 Station EST PCD2 Software Settings Main CPU Dynamic Space Set Default First Last Address Address Used Free Registers 3500 4095 i
19. Libraries Fup ua Ea Floor 1 Fup This folder holds the files that make up the CPU s program To modify files in a program folder right click on the folder or file to show the context menu Adds a new program file Open Enter Mew Ctrl M Add Files Imports a file from another project or CPU Copy paste program files between CPUs in the project ut Chris Copy trl Paste trit Delete Del w Linked CErI L Properties View or edit the file name description and link option Linked or not linked If a new file is added to the program folder define the file name and type New File Eclairage E x Directory a PGS Projects Hotel de yille E clairage File Type Graftec File sfc Define the type of Fupla File fup 9 RIO Network File ria editor according to FMS Metwork File prf i DP Network File dp the list below LON Network File lor Description E W Linked I Open the file now Help Cancel i PG5 WorkShop Chapter 2 Project management 05 07 04 2 3 9 Saia Burgess Controls Ltd File types A CPU can have several program files of different types Each type of file has a corresponding editor specific to a field of application Instruction list editor src Allows programming in text form with a set of 127 instructions Suitable for all applications but requires a certain amount o
20. Possible corrective actions in the slave station For every instruction STXM and SRXM in error read the slave station number and verify concerned stations e Verify if the Hardware Settings are defined correctly e Verify if the PCD is equipped with necessary communication hardware e Verify if the stations are connected to the network and are powered on e Verify the network wiring e Verify if the firmware version supports Profi S Bus Diagnostic register Diagnostic register can give us more information s about the nature the communication error Display the binary content of the register and compare it with the descriptions of the PCD manual or the communication network manual PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 15 10 7 Gateway Function The Gateway feature is commonly used to allow two different communication networks to communicate together or adapt a programming tool PG5 ora supervision system Visi to use a different network that the one usually supported 10 7 1 Application PG5 Supervision Supervision ill ill ill TCP IP The Gateway function creates a bridge between two networks for example to link an Ethernet network with a Profi S Bus network In this way the PCD systems exchange data on a common bus specific to the automation field and separated from information network of the company But the PCs running the PG5 software or the supervision system Visi can exc
21. key is selected Observe the Stop marker which indicates the step by step progress of the program Display symbols or addresses The Show Operand as symbol or value button allows information from the left and right margins to be displayed with their symbols or addresses If pressing it does not replace a Daily Timer symbol with its corresponding address that symbol s address is assigned by the build PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 4 26 Saia Burgess Controls Ltd 4 13 3 Display symbol state with Fupla When the editor is Online and the PCD is in RUN mode each individual symbol used by the program can be displayed The logical state of binary information is shown with a heavy or fine line heavy 1 a and fine 0 All other information can be displayed by clicking the left hand mouse button on the Place Probe connection desired Probe Display Format l xX Double clicking on a probe opens the z f robe Format Probe Display Format window allowing C Float Oe a choice of format for values consulted Bool Integer unsigned Cancel integer hexadecimal binary floating z ASUI Hexadecimal j Bi Decimal point point boolean or ASCII ae S Ea Help Use as default format 50641 AE T Bee pom Probe ailyTimer 4 13 4 Display symbol state with Watch window Another useful way to test and display the symbol states in our example is
22. 1 1 Saia Burgess Controls Ltd 1 PCD Quick start 1 1 Introduction As your first point of contact with PCD equipment we propose a direct approach tackling the production of a small real life application Even without any experience of SAIA products this is easy to do Everything is set out in detail in this quick start chapter Subsequent chapters in this document repeat in more detail the contents of this quick start chapter and provide much more information such as descriptions of available symbols program structures and instruction list programming PG5 WorkShop Chapter 1 Quick Start 05 07 04 1 3 Saia Burgess Controls Ltd 1 2 Preparing the hardware 1 2 1 Example Stairway lighting The commissioning of a PCD is illustrated using stairway lighting as an example The building has a ground floor and three upper storeys Each level has a push button for switching the lights on By briefly pressing any of these buttons all 4 lights in the stairway will be switched on for a period of 5 minutes The push buttons are connected to the 4 inputs of the PCD 10 11 12 and I3 The 4 lights are switched on off via a relay The relay is controlled via a single output O32 on the PCD 1 2 2 Connection diagram E mn m E Si m 3 floor 2 floor 1 floor Ground floor N Pa N 230 VAC 13 I O addresses 032 OO0OO0OO0O000000 OOO0OO0OO000000 PCD2 E110 PCD2 A400 0 32 48 Base addresses Batt
23. 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 5 2 Binary instructions Binary instructions use operands that may have just one of two distinct states O or 1 low or high These instructions are used to perform binary equations with the states of PCD inputs outputs flags counters and timers Binary instructions always involve the accumulator Some binary instructions affect the state of the accumulator Instructions Examples ACC H ACC Forces accumulator state high Operands STH input STL ACC L output Forces accumulator state low flag STH14 Copies state at input 4 to accumulator LU The accumulator state will be high if 24 volts are applied to input 4 The accumulator state will be low if zero volts are applied to input 4 ACCU Other instructions read the state of the accumulator to execute a binary function and put the result back into the accumulator Instructions Examples ANH ANH1I5 ANL Reads accumulator state and executes logical ORH AND function with state of input 5 The ORL accumulator is set to the result Operands XOR input DYN ORH F 100 output Reads accumulator state and executes logical flag OR function with the state of flag 100 The accumulator is set to the result XORT 3 Reads accumulator state and executes logical XOR function with the state of timer 3 The accumulator is set to the result ACCU PG5 WorkShop Chapter 7
24. 589 Texts 3000 3499 a 500 Ee p NM ak D l l E ST Double mouse click The register will be allocated a number between 3500 and 4095 during the build process This is because we declared the dynamic space between 3500 and 4095 for registers in the Software Settings PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 27 3 5 11 Entering text In order to add a text to your PCD the text must first be declared This can be done by entering the X data type after the symbol name Example Addressalue Comment LL EL_2DCE27B7 COB LI Pumpor Input CE J smstext x Any comment i Symbols ee 2 croup symbol Type Address ue Comment aa HLI EL_3DCOE2757 COB J LEI Pump Input LISS Any comment 3 Text z w 2 4 Ea Global o Double mouse click Edit Text SMSText l Gi La als Text size option Text Size C Defaut y aT Cancel Fixed 20 characters Text Do not forget to use otherwise the text will not be valid PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 28 Saia Burgess Controls Ltd 3 5 12 Entering DBs DBs have a special editor too Read the help for more information Edit Data Block DrainPump Size of DB i W Definition es OF Size f4 Cancel Data Default values and comment 3 5 13 Search for a symbol Often a symbol will be used several times inside the program file or even in
25. Edit a connection Once the sequence is finished the program is finished also If you want the program to restart then add a loop You cannot draw a connection between two steps or between two transitions A loop always 3 4 starts at a transition and goes to a step Select the button Select mode Mark the transition you start from 1 k 2 Select the button Link mode Click on the step that you want to connect to the transition eN PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 11 4 Draw an alternative task OR if Select the button Transition mode 2 Click on a transition followed by a step 3 An additional transition is drawn with each mouse click 6 11 5 Close an alternative task In order to resynchronize your alternative task 1 Select the button Select mode 2 Mark the transition you want to close 3 Select the button Link mode 4 Click on the step you want to connect 6 11 6 Edit a simultaneous Task AND 1 Select the button Step mode 2 Click on a step followed by a transition 3 An additional step is drawn with each click 6 11 7 Close simultaneous task In order to close your simultaneous task 1 Select the button Select mode 2 Mark the step you want to close 3 Select the button Link mode 4 Click on the transition you want to connect 6 11 8 Add a comment i Activate the button Select mode 2 Use the right mouse button to click on an element Choose the option Edit Element 3
26. Error marked in red or indicated with an arrow Correction of error Turnoh 1 onrme katt E PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 Saia Burgess Controls Ltd 4 25 4 12 B4 famn Download Program 4 13 4 13 1 4 13 2 Downloading the program into the PCD The user program is now ready All that remains is to download it from the PC into the PCD This is done with the Download Program button or via the SAIA Project Manager window Online menu Download Program If any communications problems arise check the configuration settings Settings Online and Settings Hardware and the PCD8 K111 cable connection between PC and PCD Finding and correcting errors Debug The first version of a program is not always perfect A stringent test is always needed The program test is supported by the same program editor that was used to write the program Go On Offline Run Stop Step by step 1 Press the Go On Offline button vel td Supply 24VDC 2 Start program with the Run button Parallelement observer la lampe RUN plac e sur la face avant du PCD A la s lection du bouton Run la lampe RUN est allum e le PCD ex cute le programme utilisateur 3 When the Stop button is selected the g RUN lamp goes off and the PCD Time stops execution of the user program 4 The PCD executes one FBox each 7 time the Step by step button or F11 Da Yy
27. Ether S Bus 01 12 04 11 18 11 7 3 Saia Burgess Controls SA Testing the functionality of the Gateway Function Activate one of the CPU Master B or Slave C of the project and Go Online for testing the communication with the station If necessary the Online Configurator allows you to verify the station number online It is also possible to download the program in the active CPU and to test it staying always connected via USB cable to station Master A H S Master station B PCD3 M5540 IPNode 2 Station 11 To communicate with another network station activate the CPU and Go Online Remark With the Gateway feature only the slave S Bus station number is defined the Ether S Bus station number is not taken into account because the telegrams are addressed to all Ether S Bus stations Broadcast Configuration of the Gateway Slave port supplementary slave _ Supervision PG5 PGS m bh iN Supervision AM N Supervision a a Serial S Bu USB S Bus modem Gateway slave port Gateway _ 00 ai Gateway Master port The Gateway Slave port is a way to access the network from outside If necessary a second or the third Gateway Slave port can be defined Hardware Settings In general the PCD supports only one slave PGU channel But the new PCD2 M480 and PCD3 Mxxxx controllers may support more PGU port on the same PCD The configuration of the second Gateway Slave PGU is supported by the Hardware Setting
28. Fbox User definable Call SB 6 4 4 Create a new Graftec file Projet al 6 Project Chapter6 1 CPU s H Common Files 1 Chapter6 PCD2 a Files Ctrl hy a ee Add Files E a Listing Files Documentation Files Paste teli Delete All Files Print Ctrl F G New File Chapter E i X File Name Pulse Directory DAPGS Projects Chapter6 Chapter File Type Instruction List File sre Grattec File sfc Fupla File fup RIO Network File rio FS Network File prf DP Network File dp LON Network File lon Description Select to open a Graftec file sfc Linked IY Open the file now m Cance PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 5 6 5 1 SB Block List 6 5 2 Saia Burgess Controls Ltd SB organisation SB list When you create a new Graftec file the Graftec editor opens Sequential Block O with an initial step SB O is then automatically entered in the SB list To access this list open the Graftec file and select the button SB Block List or the menu Block SB Block List This will display the list of SBs in the open file Each CPU can have up to 32 SBs in one file although it is probably better to have one file for each SB Click on the button Properties to display the SB number Do not confuse this number with the numbers of the individual elements This number refers to the entire string of eleme
29. H Common Files Ctrl M Z Settings Program Files _ Listing Files Paste bry Delete All Files Odd Files Ctrl P Print Alternative methods Click on the New File button on the toolbar or use the File New menu command File name of user program New File exemple In the New File window the name and type of the module are defined two very important items of information seein d 4Prograrn Files S 414 Burgess PG S Projects exemple exemple File Type File Name makon _ A A number of editors are available for writing PCD user programs The user can choose which editor is best suited to the user program For this example it is Fupla File fup Fupla is a general purpose programming language User program file type FMS Network File prt DP Network File dp LON Network File lon Description Check Linked for this example 0 Open the file now MW Linked Help Cancel PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd 1 3 6 1 3 7 Opening a file If the folder already contains a program file the file can be opened as follows In the Project window open the Program Files folder and double click on the relevant file Alternatively right click on the file name to open the context menu and select Open Project Open file en file eff Project exemple
30. Instruction List program file src PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 19 3 4 6 Define a global symbol x Comment Bk Re L EESK Input B6 HC flagl1 F 11 lzikseven Input Br L Dainpump Output a2 pompes LC Dainpumpe D ainpurnp 1 pompes HLI Dainpumpes D ainpumpd 2 pompes L D amnpump4 D amnpump 3 pompes LC Dainpumpo D ainpumpd 4 pompes L ems Text 300 no comment symbols Tiaj Global Input output combination fup If you want to use the same symbols in several files then you have to move the symbols from the local list to the Global list Just mark some symbols in the list using the Advanced Make Global function right mouse click Once a symbol is listed as Global it can be accessed from any file within the project 3 4 7 Define symbols for the communications networks H SAIA Fupla Editor Test fuptest fup E oOj x Fie Edit View Project Online Mode Block Page Symbols Help note 000 m DJ 5 W5 nee a rt e Co Po Ng J Inputo DP SLAVE 2 sl C Inputi DP SLAVE 2 sl Impute p Inputs DP SLAVE 2 sl LE Input4 DP SLAVE 2sh 0 C rey Te a SST a 4 m ku DP Network OP_Test Ds Global fuptest Sharing data between two different PCDs is more complicated than sharing information between files A type of network connection is required between the two PCDs
31. Slave station Temperature 4 Write the temperature Master_B Temperature 4 Dynamic registers measures to the master A R 100 104 PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 3 10 3 The PG5 Project Project p Project Profi 5 Bus and data exchange 3 CPUs l Define Hardware Settings for every CPU PCD Listing Files Documentation Files H S Master station B PCD3 M5540 Station 11 Saia Project Manager The Saia Project Manager shows all the PCD stations in an application s Project and also the network communication parameters We will begin with adding a CPU to the Project for each of the Network Stations 10 4 Hardware Settings master slaves The configuration of Hardware Settings for a master and Slave are similar 10 4 1 Define PCD parameters Hardware Settings Master station A g i xX PLD Memory Password S Bus Serial Modem Profi S Bus TEPAF Gateway PCD Hardware CodeT exh Extension Memon Size i024 Bytes RAM Number of CPUs ro Communications Modules Onboard Profi S Net Channel 10 af Slot B1 lt UNKAOWwr T Slot BZ gunkan h Save As Upload Download Cancel Help PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 4 Saia Burgess Controls SA PCD Type Define the CPU type Communication Modules If necessary indicate the type of the communication modules inser
32. Timers E 31 E 23 Counters f 159 Save Ag Cancel Help PCDs are configured with 31 timers some of which have their addresses assigned dynamically With certain programs it may be necessary to increase the number of timers The timebase at which timers decrement is once every 0 1 seconds 100ms If necessary this can be set to another value Note that the timebase has no influence on Fupla programs Only IL programs are affected by this parameter It is advisable not to define an unnecessarily large number of timers nor an unnecessarily small timebase This will help speed up program cycle times Software Settings Daily timer H C x Registers Texts DiBs Timer Counters Flags Directories Advanced Flags up to this address are Set Defaults Last Volatile Flag 2995 volatile and are set to zero at start up Dynamic Space First Last Address Address Used Free Volatile Flags 2500 2995 fo 500 Nor Volatile Flags 7500 e g 52 E30 Save Ag Cancel Help By default all flags are nonvolatile If necessary the Last Volatile Flag parameter allows a volatile range to be defined This example defines volatile flags for addresses F 0 to F 2999 Volatile flags are always set to 0 at start up nonvolatile flags retain their values PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 17 2 3 8 Program Files folder Pragrarm Files oo
33. To restore the program to the PCD s memory use the Tools Download All command and select the file SAIA Online Configurator Ioj x File Online Tools Options Help Download Program Upload Program Upload All Information Download All PCD Typ n O10 Hardware Settings Pragrarn Download Firmware Date 19 5 2004 Day 3 Information Time 16 18 31 Week 21 History Status Run Clock Run Stop Restart E vit Online Sel COMI PC Online Debug Help PG5 WorkShop Chapter 2 Project management 05 07 04 2 28 Saia Burgess Controls Ltd PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd Contents 3 PCD Resources 3 1 Introduction 3 2 Hardware resources 3 2 1 Digital inputs and outputs 3 2 2 Time 3 2 3 Interrupt inputs 3 3 Internal resources softwares 3 3 1 Flags 3 3 2 Registers 3 3 3 Constants 3 3 4 Timers and counters 3 99 Text and data blocks 3 3 1 Summary table 3 4 Symbol editor 3 4 1 Elements of a resource 3 4 2 Grouping symbols together 3 4 3 Scope of symbols 3 4 4 Local symbols 3 4 5 Global symbols 3 4 6 Define a global symbol 3 4 7 Define symbols for the communications networks 3 5 Working with symbols 3 5 1 Writing a symbol list 3 5 2 Adding several symbols to the symbol editor 35 0 Referenced symbols 3 5 4 Importing symbols from EQUATE statements 3 0 0 Importing symbol
34. it ll EEMHIEEREULERES Fl F ak H ta ri af al an TG 3FZOTCSWE F b 3 ail i EH gt D pem i L a w sien TL iH a EH 1A jei i i ft J Hess ee ssh we FE E et me a oils oy A 4 a PCD2 M120 equipped with LM621024 memory PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd Stock Code Text Extension Jumper PCD type Memory number Memory Size Memory Size position on RAM PCD PCS1 C8 Flash 2 MBit 240 kByte 128 kByte No carriers Flash 4 MBit 3 1008 kByte 896 kByte No carriers PCD1 M110 Empty space 17 kByte None R 120 150 1 RAM 256 kBit 4 502 5414 0 32 kByte 13kByte R 1 RAM 1MBit 4 502 7013 0 128 kByte 13kByte R 1 Flash 1MBit 4 502 7141 0 112 kByte 13kByte E 1 EPROM 512kBit 4 502 3958 0 64 kByte 13kByte E 1 EPROM 1Mbit 45027126 0 128 kByte 13kByte E PCD2 M110 Empty space 32 128 kByte None R lt 1Mbit 120 150 1 RAM 256 kBit 450254140 32 kByte 24 128 kByte R lt 1Mbit _ 1 RAM 1 Mbit 4 502 7013 0 128 kByte 24 128 kByte R lt 1Mbit 1RAM4MBits 450271750 512 kByte 24 128 kByte R gt 1Mbit 1 Flash 1 MBit 4 502 7141 0 112 kByte 24 128 kByte F lt 1Mbit 1 Flash 4 MBit 4 502 7224 0 448 kByte 24 128 kByte F gt 1Mbit 1 EPROM 512 kBit 4 502 3958 0 64 kByte 24 128 kByte E lt 1Mbit 1 EPROM 1 MBit 450271260 128 kByte 24 128 kByte E lt 1Mbit 1 EPROM 4 MBit 4 502 72230 512 kByte 24 12
35. Saia Burgess Controls Ltd 3 35 3 5 18 Initialization of symbols There are two ways to initialise symbols used by the PCD she initialization during a PLC coldstart power up fe initialization when the program is downloaded into the PCD During coldstart The initialization of symbols during a coldstart is done in XOB 16 This function block is processed once only during a PCD coldstart The user writes IL code to initialize symbols in XOB 16 Example initialisation of a flag and a register during a PCD coldstart Program in IL Program in Fupla XOB 16 Coldstart block LD R5 R5 256 256 SET F10 F10 1 EXOB COB 0 Cyclic block 0 Your program ECOB For more detailed information about COB and XOB blocks please consult chapter 5 of this document When downloading program To initialise a symbol when the program is being downloaded to the PCD the symbol address should be followed by colon equals which is in turn followed by the initialisation value Example Group Symbal Address alue LL BL_3E315 55 owm b m 4 LC SymbolB Be careful N Remember to tick the following option when downloading the program W First time Initialization Data PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 36 Saia Burgess Controls Ltd 3 5 19 Symbol names Symbol names are names which can be assigned to elements in the PCD inputs outputs flags registers COBs etc Symbol names can be up
36. Select directory and file Save as ty Export E Properties PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 Saia Burgess Controls Ltd 4 9 2 Page import Page import supports the selection of one or more pages from a file fxp and the editing of symbols imported to the Fupla program The Page Properties list allows the selection of page s to be imported To return to our example each time you need a timer you import the file Timer fxp and select the page s that correspond to the component required for your application Page Symbols Help Insert Before Page Import x Insert After Global Symbols Local Symbola FE ox List Delete Page Properties System Symbols Network Symbols Clear Insert Internal Static Variables Hide Lock Clear Page Errors Before curent page M Set Variables to system defined a After curent page Show FBox Priorities l Fage Range Fe Page Name Description feet Last q Daily Timer Control an output ON OFF with the parameters 3 Previous 2 Weekly Timer Control an output ONOFF with the parameters 3 Monthly Timer Control an output ON OFF with the parameters ext Export Properties Selection of page corresponding to component required Daily Timer Cancel Help The Global Symbols and Local Symbols windows display a list of symbols that correspond to the selected pages It is
37. but it can also happen in case of faulty address decoding on the module For a PCD4 module with only 8 elements XOB 5 is not called if one of the absent elements is addressed since this address is still decoded and the signal is sent For the PCD6 this signal is only returned by the new PCD6 modules Most of the PCA2 modules used up to now do not cause invocation of XOB 5 even when they are absent PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd XOB 7 System overload The waiting mechanism for XOBs with priority levels 2 or 3 is overloaded If a level 2 or 3 XOB is processed at the same instant as an XOB with a higher priority level 4 the lower priority XOB is put on hold until the XOB with priority has finished XOB 7 is called when the queue is full XOB 8 Invalid opcode The CPU has noticed an invalid instruction code If edited user programs or routines are assembled linked and loaded into the PCD incorrect opcodes cannot occur because the program is very strictly checked by both the IL editor S Edit and then by the assembler However if the user program is subsequently changed directly using the Debug program or with the hand help programming unit almost any error could be introduced which could lead to the invocation of XOB 8 Errors often incorporated in this way are calling non existent blocks missing end of block instructions program jumps to the second line of multi line instruction
38. gt Counters Timers 0 1599 Flags 0 8191 e 3 Binary 19 Binary r999 Decimal s 7 Qutputs Inputs 0 8191 20 f 599 Decimal al LLLE Data Blocks 0 7999 Help Cancel Select menu Online Quick Data Upload or press the Quick Data Upload button to display the above window Select the types of data to save address ranges possibly also the display format for registers Select the OK button to upload data SS Six If a message like the one shown here is displayed 5 Error 10 No response From PCD check the communications parameters using the Online Settings Online menu and ensure that the PCD8 K111 cable correctly links the PC to the PCD PG5 Workshop Chapter 8 Additional tools 05 07 04 Saia Burgess Controls Ltd 8 5 8 2 4 Open Download 8 2 5 Upload Data upload takes a few moments to be displayed as follows SAIA Data Transfer untitled001 AR File Edit wiew Online Window Help o _ e x sPCD DATA SDATS U41 2 168 sUploaded 26 69 63 13 21 243 11 4 4 1 1 The data file can be edited with new values then saved with the File Save menu or with the Save toolbar button Restore data Previously saved files can be displayed again with the File Open menu or the Open toolbar button If necessary the user can edit file values Data is restored to PCD memory with the Online Download Data to the
39. the starting point after a cold start Once initialisation is complete we can wait for the start signal Start_3_pulses Draw the elements as shown and add comments to the fields SAIA Graftec Editor Chapter 61E M m E4 File Edit wiew Project Online Mode Block Page Help Deulais Be Hy E Edit Element x Set the counter Name to 3 Type Humber 0 Wait for the Transition E starta _p signal Commet Walt for the starts op signal Editor Function Block Diagram Help Cancel PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 18 Saia Burgess Controls Ltd When we start the sequence we turn output Three_pulses on for 1 second After one second we turn the output off for another second We do so three times and then we restart the sequence SAIA Graftec Editor Chapter 6 PULSE sfe E fa lel E File Edit View Project Online Mode Block Page Help O Ss H S s SSE W lh oe Aaa te Set the counter to 3 Wart tor the starts _b signal Turn the output wait 1 Second Turn the output oft Vat on other eccand Decrement Counter Counter 0 Counter 0 6 12 3 Choice the IL or Fupla editor Our sequence is finished now We only have to fill in the program code in each step and transition We can edit each step and transition in instruction list or Fupla whichever you prefer We will program our initial step using the Fupla editor Double click on th
40. 1 CPUs Open p i Common Files New Ctrl M 4 exemple PCD2 M170 Add Files H Settings Mark file or open it 5 59 program Files Cue Ctrl by double clicking i 2 maison A fup Copy Ctrl C the mouse button J Paste Girl Listing Files Delete Del w Linked Ctrl L Properties Alt Enter Editing a program F SAIA Fupla Editor man maison_A fup BEE File Edit View Project Online Mode Block Page Symbols Help Cae ES Salk ex Hei gpe SCH OFFEE GO s Gas aa oq Soe te ae eee ee ee ee Ooty ee ee eee ee ee Ss a E oe be ae eee A St ce FP eee ae a aera ee ce Tie Oe ee IE Esk Oa tS Aa E ne ee tend E a E emutcie tc ayaa a Output I L SOS i See ee or rc A cert ea A AES RAE User Seere e coiii programs E F E O IN T a gah ns a a me Bl Symbol Editor Input 2 input 2 symbols used Fal Global maison _A For Help press F1 Block COB BL_3C4C1476 Page 1 1 58x54 Fit COMPILE REQUIRED OFFLINE PG5 WorkShop Chapter 1 Quick Start 05 07 04 1 11 Saia Burgess Controls Ltd Editing symbols Symbols are the data need by the PCD s user program e g the stairway lighting switches Input symbols are entered in the left hand column of the editor window output symbols in the right hand column This stairway lighting example has 4 light switches as inputs I 0 11 12 and I 3 and one output O 32 to drive the stairway cutout
41. 2 3 4 Settings Online 2 050 Connection of PC to PCD 2 3 6 Hardware Settings 2 3 7 Software Settings 2 3 8 Program Files folder 2 3 9 File types 2 3 10 Files linked 2 3 11 Common files 2 4 1 Rebuild All and Build 2 4 2 Build options 2 6 1 Download options 2 6 2 Load program onto Flash card 2 1 1 Organization block structure 2 2 List of organization blocks 2 7 3 List of symbols 2 1 4 Cross Reference PG5 WorkShop Chapter 2 Project management 05 07 04 WWWWWWWWWWWWWWWWWWWW WWW W 2 1 PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd Saia Burgess Controls Ltd 2 Project management 2 1 Introduction Modern automation applications frequently comprise large numbers of controllers connected in networks The PG5 therefore unites in a single project the programs and configurations of all PCD controllers within any one application The PG5 Project Manager offers the user a global view of all the information that relates to a project PG5 WorkShop Chapter 2 Project management 05 07 04 2 3 Saia Burgess Controls Ltd 2 2 Project organization 2 2 1 Example of application project In practice automated installations almost always comprise a number of local PCD programmable controllers connected in a communications network Each PCD supports the control of a particular function within the project as a whole such as lighting management heating control ventilation contr
42. Available memory defined on the PCD page is shared between the program s code and text in each CPU Some PCDs have more than one CPU PCD4 M44x and PCD6 Mxxx For a single CPU this is defined automatically according to the user program so Manual Memory Allocation can remain unchecked Default parameters are adequate for most applications In applications where they are not an error message like this will appear when downloading the program to the PCD Download Daily timer Failed 4 Code segment too small Has 1K needs 2K There are several ways around this error Uncheck Manual Memory Allocation and let the PG5 do the code text partitioning if there s enough memory Check Manual Memory Allocation and configure the memory allocation according to the error message Increase PCD memory capacity When the Hardware Settings have been defined always remember to download them into the PCD by pressing the Download button or using the Online Hardware Settings Download menu command PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 15 2 3 7 Software Settings J Aap Onine x Registers T exts DBs Timer Counters Flags Directories Advanced Dynamic Space First Last Address Address Used Free Registers foo faos pa por DataBlocks faso fas poo pa RAM Tets 2000 fes fos RAM Data Blocks 2500 2999 fo poo Save s OF Cancel Help This wind
43. Chapter 11 Ether S Bus 01 12 04 11 20 Saia Burgess Controls SA 11 7 4 Communication Timing Supervision S PG5 uy ili S h ti Supervision ki e A modem douni i at Gateway Master port AVE Serial S Bu Gateway slave port Ether S bus Generally the communication timing is defined with default values and this works correctly But the use of the Gateway feature increases the times of the reactions necessary for the data exchange It is then sometimes necessary to adjust the timeout of the master stations which use the Gateway The above picture shows which are the master channels whose timeouts must be adjusted To adjust the Timeout of the PG5 use Online Settings of the Master Station A S Bus USB S Bus Timing Training Sequence delay T5 amp Turnaround delay TN f1 m Response timeout 250 m Defaults To adjust the Timeout of the data exchange program to the PCD use Fbox SASI S Bus IP Extended IP Channel S Bus IP Ex Timeout gt o 11 8 Other References For more information s you can also refer to the following manuals e Instruction Guide 26 133 e Ethernet TCP IP 27 776 e Example of the Ether S Bus project installed with your PG5 PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 12 1 Contents 12 PROM HDI O EEA NA AIE I IEI EO IEEE 2 12 1 Profi S IO network CxAmMple cccccccccccccccccccccccccecsecsesssssssneeeeeeeeeeeeee
44. F C Drainpumps4 Output 35 Pumps in building F HC Drainpumps5 Output 36 Pumps in building F HCI Drainpumps6 Output af Pumps in building F LOCC Drainpumpe Output 28 Pumps in building F Ta Global E Herwsedit PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 22 Saia Burgess Controls Ltd 3 5 3 Referenced symbols Une liste de symbole peut aussi se r f rer a un symbole particulier S lectionner le menu Symbols Advanced Options pour ouvrir la fen tre Symbol Editor Options entrer le symbole et cochez la case Create reference for symbol Confirmer par OK Symbol Editor Options a x Fle i Ctrl Default Symbol Name Default Text Filter Ctrl Character Set Symbol Shaw All ftii ANSI Cancel Cross Reference List Ctrl zup C DEM Symbol Reherences Group GSM Expand amp ll Collapse Ail IY Use selected symbol as template Move Up Ctrl W Create reference for symbol Make Global Make Local Move Down Advanced Use Local Declaration top List Vier Aartup hanges to Global symbols Help Import Symbols 3 Group View Export Symbols Export Symbols To Clipboard Help Delete Unused Symbals Options Another option is to enter a symbol and address in the symbol editor open the options window select the menu path Symbols Advanced then Options enter the symbol and select Create reference for symbol Click OK and then highli
45. Global o ob 2 Alarm Battery Battery Failure k 10 User program Battery Failure PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd Monitoring special events or very fast reactions to external signals interrupt inputs interruption of the program every once in a while Se interruption of the program when a telegram arrives fe cold start Initial values Fupla example Output pulses to a digital output Use functions Special Install cyclic task and Binary Direct transfer H Adjust Install cyclic task oneer bfen COB H SAS Interrupt interval ms gt 1000 o b a G XOB 14 Editor Interrupt inputs IL example XOB 16 SYSWR 4014 Initialise XOB 14 with a 1000 ms interrupt EXOB COB 0 0 User program ECOB XOB 14 Cyclic interrupt COM O 32 with inversion of output O 32 EXOB PG5 WorkShop Chapter 5 Structures 05 07 04 5 16 Saia Burgess Controls Ltd 5 6 4 History Table The PCD History Table lists all the hardware and software errors that have occurred This table is updated even if the XOBs are not programmed To consult the history table click on the Online Configurator button re or go via the menu Tool Online Configurator Online Configurator History eee xi Reason Address Time Date 7 CALL LEVELS O6 01 2003 7 CALL LEVELS 30 14 09 43 o6 01 2003 7 CALL LEVELS 30 14 09 43 o6 01 2003 7 CALL LEVELS 30 14 09
46. ONTIME OFFTIME Outputs active by night HMS gt ONTIME o HMS gt OFFTIME ONTIME gt High DailyTimer Current time a ee ee HMS 0 00 6 00 19 00 23 59 OFFTIME ONTIME PG5 WS K4 FUPLA E2 16 05 03 A System Se Global Daily Timer Saia Burgess Controls Ltd 4 10 3 Programming It is now time to move on to programming At the beginning of this chapter we created a project with a file in it called DailyTimer fup This is the file to which you will now write the present programming example Symbols s Group Symbal Address ialue n rr rr HC HMS R PCD Clock with current time ELI Daily Timer Output 32 Daily Timer LL ONTIME R 60000 Switch on time LL OFFTIME R 19000 Switch off time Li cop 3487C0D07 COB Start by creating the symbol list Note that the current PCD time is saved in a dynamic HMS register The address of this register has not been defined The PG5 will automatically assign its address when the program is built The same applies for the turn on and turn off times ONTIME OFFTIME except that 60000 is not a register address but the value with which it will be initialised when the program is downloaded to the PCD 60000 means 6 hours 00 minutes 00 seconds N B A PCD coldstart will not reinitialise these registers They can only be reinitialised by downloading the program TurnoNn po Ss E Sa Ss o NTIME FFTIME re SS oo Se Ss a ailyTim
47. Open J Mew Project x Mew Project Project Hame Open Project Chapter Clase Project Project Directory Backup D PGS Projects gt Restore oe Description Print Sequential block using Graftec Print Setup ef Project Chapter 1 CPUis j H Common Files Properties 1 Chapter 6 59 W Create CPU 2 DAPGS Projects aaalaaa Create a new Fupla or IL file Add Files eee New File Chapter oo x ast ee ENN ue Hasie File Hame Listing Files Dalta All COE Calle SB Documentat Print Directory DAPG5 Projects Chapter6 Chapterb Select to open a File Type Instruction List File src Fupla file Fup Grattec File stc or Instruction List file IL src RIO Network File ric FS Network File prt DP Network File dp LON Network File lon Descrptiory M Linked IY Open the file now Help Cancel PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 7 6 4 3 Call the SB from a COB Depending on the way you intend to write your program IL or Fupla you call the SB using an instruction CSB or a function Call SB There is no difference between the two examples Open the new file and write the program as shown below IL program Fupla program COB 1 Cyclic Block SFUP main fup COB 0 Page 1 1 starts 0 CSB 0 calls the SB 0 ECOB Cyclic Block ends
48. PCD menu or with the Download button Save data with help of script file If necessary the list of data to save can be edited in a script file Example MyDatasToUpload dt5 sExemple de script 8 99 sSauvegarde les registres 6 99 en d cimal 12 h Sauvegarde le registre 12 en hexad cimal 55 F Sauvegarde le registre 55 en format flottant 0 9299 Sauvegarde les indicateurs 0 999 1000 Sauvegarde l indicateur 1000 Dee Select the Online Upload Data from PCD menu or the Upload button to upload PCD data into a second window distinct from the control window For more information about script commands available please refer to program help See menu Help Help Topics F1 General PG5 Workshop Chapter 8 Additional tools 05 07 04 8 6 Saia Burgess Controls Ltd 8 2 6 Restore data with help of script file A script MyDatasToUpload dt5 Exemple de script Download H 99 sCharge les registres 6 99 avec 6 12 32h scharge le registre 12 avec 32 hexad cimal oo 664 8 scharge le registre 55 avec 64 3 8 999 scharge les indicateurs 99 avec 6 1668 1 scharge l indicateur 1000 avec 1 select the Online Download Data to PCD menu or the Download button to download script data to the PCD 8 2 7 Upload options The window displayed with the Edit Options menu allows you to adjust the format of data to be saved in file dt5 With the following options a data file can easily be imported
49. S Bus Profi S Bus Senal_Gateway Slave _ Port o Bus oly The adjust Gateway parameter then must be defined with option Yes According to channel type the parameters of the adjust window should also correctly defined Example IL add a third Serial S Bus Profi S Bus Use the following text to assign the channel SASI TEXT 11 UART 9600 MODE GS2 DIAG F1110 RO501 ENDSASI N N Flag and diagnostic register Mode S Bus Gateway Slave Data mode Transmission speed 10 7 4 Communication Timing _ Supervision PGS _ PGS ith i M ul Supervision jib Supervision a Serial S Bu bie Ether S Bus Gateway slave port Gateway 1 i at i Gateway Master port Profi S Bus Generally the communication timing is defined with default values and this works correctly But the use of the Gateway feature increases the times of the reactions necessary for the data exchange It is then sometimes necessary to adjust the PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 20 Saia Burgess Controls SA timeout of the master stations which use the Gateway The above picture shows which are the master channels whose timeouts must be adjusted To adjust the Timeout of the PG5 use Online Settings of the Master Station A S Bus USB S Bus Timing Training Sequence delay T5 E i amp Turnaround delay TH 1 m Response timeout 250 m Defaults To adjust the Timeout of the data exchange program t
50. Saia Burgess Controls Ltd 4 3 Organization of a Fupla window Fbox Selector Fupla program impact SEND SMS5 fup Online Mode Block Page Symbols Help O x x De S Fox Selector z 5 gt aa gt E es cubis mail A l Binary spe Pee en os ref Ta13Port Blink delay T o bodem Diag Blink delay TO T1 4 EnableTeam 12 ErTeami2 Shs Buffers Communication Communication Text Converter Counter Data Blocks Display Flip Flop Floating Point grafter Indirect Standard 4pplication User x El COB ModemHandling x i Page 1 SMS i Page 2 CallBack Page 5 E COB MainProgram H 5 Text RAM E GR l IP T a m EL Symbols Black COB ModemHandling F 5M5 1 2 56x54 Fit COMPILE REQUIRE lt Page Navigator Symbol Editor The PCD reads the information represented by the symbols in the left margin evaluates it according to the program and writes the results to the symbols on the right margin The symbols used by the program are all listed in the Symbols window All symbols are allowed in both margins except input and constant type symbols Digital inputs and constants provide read only data and can therefore only be used in the left margin In the middle of the page we have the program made up of different graphical functions selected from the FBox selector window The links represent the exchange of data betw
51. Table Filter Mew Symbol l Symbol Name Selected Types Insert Symbol New Group M Inputs Outputs T Texts noaoo W Flags l Constants Cue Copy Show M Registers DBs All Types Paste Timers Counters Blocks i Selected Types Delete E Errore Select All Clear All Edit Texti DE Find P Shows Al The filter function selects the view As soon as the filter is active your symbols will have a different icon Paa Example Symbol editor shows all Elements gt _ Filter is active gt Not all the symbols are displayed gt A PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 31 3 5 16 Exporting symbols A program s symbol list can be exported to other applications such as Exel Visiplus or Word for example to produce your commissioning report Example showing symbol export to Exel Select context menu Export Symbols from the symbol editor Symbols a Groupi Symbol Address Value a ae es LE cop sasepce3 COB C Input Input 0 nd gate input 0 ELI Inputi Input 1 nd gate input 1 HCI Inpuk2 Input Z nd gate input 2 Show All LC Inputa Input 3 And gate input 3 Ez Cross Ref L Outputo Output 32 Result of input 1 AND 2 symbole Aa Global AND_GATES2 Expand 4 Collapse 4ll Export Symbols Export Symbols To Clipboard Mowe Up Gtrl Up Move Down Gtrl Bovwn Delete Unused Symbols Advanced Options When exporting a symbol list to E
52. This network connection can be designed in our network editor which to date already supports SBus Profibus DP Profibus FMS and LON networks The network editor lists all the symbols in the Network list Network symbols can be used in a program to move data from one PCD to another PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 20 Saia Burgess Controls Ltd 3 5 Working with symbols 3 5 1 Writing a symbol list Open the file you are going to work with This will also open the symbol editor Click on Group Symbol and then press the nsert key A new symbol field is added to the list Enter the symbol name type address value and a comment Press Enter to confirm your entry Address Value Comment BEN HJ BL spesa49c COB HLI Conditional _Run Input 4 Machine in Conditional run HOI Normal Run Input Machine in normal run a Cc Ta Global a Pump _ Conditianal_Run Input 4 Machine in Conditional run HC Mormal_Run Input gt Machine in normal run HO ar iefet OilPump pr oo Ba Global Global ss Pump For the next symbol simply press the nsert key N B The editor automatically copies the previous symbol name and address to the new field incrementing the address value by 1 see picture below You can accept this name type and address value and just edit the comment or you can overwrite the entry with a new name type address value and comment Groupi Symbol lt Address yalue Fly HEI BL_spe3a49
53. Unlike binary instructions integer word instructions rarely use the accumulator However they almost always modify status flags The PCD s 4 status flags are modified by word instructions and inform us of the result Flag positive P Set if the result is positive Flag negative N Set if the result is negative Flag zero Z Set if the result is zero Flag error E Set incase of error The error flag may be set for a number of reasons causing the exception block XOB 13 to be called Overflow caused by an instruction which multiplies two large numbers Division by zero Square root of a negative number Error assigning the communications interface SASI instruction Example Status flags after a subtraction Status flags are set depending on the result of a subtraction R 3 R 1 R 2 Register values are shown in square brackets The result of the subtraction is negative flag N alone is set Word instruction SUB R1 R2 R3 Operands R 1 10 L Result 32Bit SEN R2 11 Status flags E Z N P o 0 0 If necessary status flags can be copied to the accumulator for use with binary instructions program jump instructions or when calling PBs FBs or SBs ACC P Copy status flag P to accumulator ACC N Copy status flag N to accumulator ACC Z Copy status flag Z to accumulator ACC E Copy status flag E to accumulator PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 7 20 7 9
54. a sequence Remark Depending on the position of the element transition or step you select to insert the sequence might be inserted underneath or beside the selected element Turn the output on amp load timer Turn the output off amp load time wait 1 Second Turn the output Turn the output off amp load time off amp load time PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 1 k Turn the output on amp load timer Turn the output off amp load time Wat an other Second SG GRAF32 ex2 fstc File Stile View Search C Cut Chr Ctrl Copy Mode Project Delete Turn the output on amp load timer Wait 1 Second Turn the output off amp load time sequence on a step second Turn the output off amp load time Wait 1 Second Turn the output oft amp load time Saia Burgess Controls Ltd 6 17 6 12 6 12 1 Write your first sequential block Open the file Open the file PULSE sfc Go to the SB list and load the SB called PULSE Goal We will write a program that makes a digital output Three_ pulses O 33 blink three times each time a digital input Start_3_pulses 2 goes high Diagram Input START_3_pulses A a Output Three_pulses T LOT LCT L 1s 1s lt __ gt lt _ gt Time 6 12 2 Draw the basic structure We always start with an initial step
55. aE EAR AARRE REEE 20 TIS ATEST TECOS osese E a REE A Error Bookmark not defined PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls SA 11 Ether S Bus This example shows how to exchange data such as Registers and Flags between the PCDs connected to an Ether S Bus network 11 1 Ether S Bus network Example PCD2 M480 Station Master A S Bus Station Number 10 PCD3 M5540 Station Master B i i aa 1 eee f o a ALNI KARUM m IN Spi Ether S Bus Ether S Bus Onboard channel 9 IP Node 2 address 192 168 12 129 Ether S Bus Onboard channel 9 IP Node 3 IP address 192 168 12 130 Ether S Bus External channel 8 IP Node 1 IP address 192 168 12 128 PCD3 M5540 Station Slave C S Bus Station Number 12 11 2 Examples of the Data Exchange in Ether S Bus Master with data exchanges Data on the network Master station A Master station B FO 7 Master station 2 F 100 107 EREET am E R1 25 Master station B R25 i Slave station Slave_C Binary0O 7 Read 8 flags inthe slave BinaryO 7 F 100 107 station C F 20 27 4 Valued 5 Write 6 registers in the Master_A Valued 5 RO 5 slave station C R20 25 m MasterstationB i MasterstationA Dynamic registers measures to the slave C R 100 104 Slave station Temperature 4 Write the temperature Master_B Temperature 4 Dynamic registers measures to the master A R 100
56. address of the Communication Channel used by data transmission Fbox is defined by the symbol shown at the top left of the Fbox which binds it to the SASI Fbox of the same name in which the channel address is defined This symbol can be edited by putting the mouse on the Fbox and selecting the context menu s Fbox Properties Name Each SEND and RCV Fbox has a binary input for activation of the data exchange If this input is permanently high data exchange will repeated as fast as possible If a short pulse is applied to the input data exchange will be executed at least once but it is always possible to force it using the Execute button or by a Restart Cold the PCD with nitialization option of the adjust window Master station data present at the inputs of the SEND Fbox are sent to the Slave station defined in adjust window Whereas the data present at the output of the RCV Fbox comes from the slave station defined by the parameters of the adjust window address of the slave station source element and base address Only the master stations are programmed with the SEND and RCV Fboxes The slave stations can only be assigned with the communication channel According to the Fboxes used the adjust window allows the definition of the slave stations to which data can be sent from the master station SEND or from which slave stations the Master can read data RCV Adjust window parameters IP Node Defines the node number of the Ether S B
57. always a letter followed by other letters numbers or the underscore character Avoid accented characters 0 Differences of case upper or lower have no significance MotorOn and MOTORON are the same symbol Type Defines operand type input 1 output O register R counter C timer T text X DB Address Each operand type has its own range of available addresses Inputs and outputs dependent on I O modules inserted in PCD Flags FO F 8191 Registers RO R 4095 Timers counters T C O T C 1599 Comment The comment is linked to the symbol and can be viewed instead of the user comment linked to each line of program code Toggle with the button View User or Auto Comment STH Flag sCopy the Flag state into the accu STH Flag sControl the incrementation PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 9 7 4 1 Add new symbol to Symbols list Simple method To add a symbol to the list open the Symbols window position the mouse in the middle of the window and right click to select the context menu nsert Symbol Then fill in the fields Group Symbol Type Address Value and Comment Quick method 1 Group Symbol Address Value Comment CL Redlighto 32 Stop new cars a ter gt LY Redlight Stop new cars It is also possible to enter variables for the different information fields from the Group Symbol field This is more practical and quicker See example below
58. an example we recommend you prepare a new project and file in which to edit the IL program Create new project In the SAIA Project Manager window select menu File New Project and create the new project GC SAIA Project Manager File Edit View CPU Online Tools Help Ctrl h iG New Project Enter the project name Project Hame Chapter 7 Instruction List programming Projects Directory Jd PG5 Projects gt Descriptions How to use IL Edito W Create CPU Help Cancel Create new IL file To add a new program file to the project select the folder Program Files right click with the mouse and select menu New or press the New File button on the toolbar AddFies RSS eeeam Enter the file name Paste Delete All Files File Hame Parking lot sr Print Directory d FG5 Projects Chapter 74C REE and select IL file type src File Type Instruction List File src Grattec File sc Fupla File Fup RIO Network File rio FMS Network File prf DF Network File dp LON Network File lon Description W Linked IY Open the file now Help PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 1 4 Saia Burgess Controls AG 7 3 Organization of an IL edit window Mnemonics Labels Operands Comments RP SAIA IL Editor Parking lot Parking lot src E B ioj x
59. are defined correctly e Verify if the PCD is equipped with necessary communication hardware e Verify if the stations are connected to the network and are powered on e Verify the network wiring e Verify if the firmware version supports Profi S Bus PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 10 Saia Burgess Controls SA Only SASI Fbox is red Open adjust window of the SASI Fbox and clear the last error using Clear button PS8Channel Proti S Bus Master Clr Err ref P 6 Channel END ret P B Channel ACY 6 ref PSB Channel T7 ref PSB Channel Eev _ ey Diagnostic Fbox If SASI lamp is red it is always possible to obtain a diagnostic while consulting the adjust window of the SASI Diagnostic function This Foox should be placed just below SASI Fbox PS8Channel Proti s Bus Waster Clr Err ref F56 Channel Diag Prof s Bus PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 11 10 6 IL programm 10 6 1 Assign master Channel using SASI instruction Mode Profi S bus Master Register with slave station address First address of the range of 8 flags and one diagnostic register SASI TEXT 10 MODE PSM R0500 DIAG F1000 R0501 ENDSASI SASI 10 Address off communication channel 10 Address of the text with assignation parameters The assignation of the channel is done using SASI instruction which is placed at the beginning of the program Graftec initialization Sequen
60. blocks SB PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 2 Cyclic Organization Block COB 0 to 15 5 2 1 Definition Cyclic Organization Blocks COBs are parts of a program that are executed without program loops and without waiting for events that are internal or external to the PCD When the PCD starts up the program executes COB 0 first COBs 1 to 15 are then executed consecutively if present in the program They are automatically called in succession in a continuous loop All signals which need to be dealt with on a regular basis e g end switches for motor movements external power cut or emergency stop signals human_ protection devices have to be inside a COB There must to be at least one COB in the PCD A proper understanding of the concept of cyclic organization blocks is important The lack of wait loops is not a shortcoming in the programming but a safety measure It is in fact the only way to guarantee that important application signals are checked at regular intervals H SAIA Fupla Editor Compact add fup Fie Edit wiew Project Online Mode Block Page Symbols ae SY Bs Bee Nem P Delete Properties Open Page Mew Block Insert Page Delete Mave Up Move Down Expand sll Collapse All Properties Alt Enter If you write your programs with the Fupla editor the new files are automatically opened with a COB You can then change the block type or co
61. communication Channel defined with the Hardware Seitings and SASI function are identical same channel number e Verify that the PCD is equipped with the necessary communication hardware e Verify that the stations are connected to the network and are powered on e Verify the network wiring e Verify that the firmware version supports Ether S Bus Only some Fboxes do not exchange data SASI Fbox and some SEND and RCV Fboxes are red The Fbox in green exchanges the data correctly IP Channel S Bus Master IP ar Err ref IP Channel END a ref IP Channel REW ref PChannel To ref IP Channel Eev e Possible corrective actions in the master station Verify the parameters of the adjust window of the red SEND and RCV Fbox Verify that the slave address is present in the network Possible corrective actions in the slave station For every red SEND and RCV Fbox view the slave station number and verify the concerned stations e Verify if the Hardware Settings are defined correctly e Verify if the PCD is equipped with necessary communication hardware e Verify if the stations are connected to the network and are powered on e Verify the network wiring e Verify if the firmware version supports Ether S Bus PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 11 10 Saia Burgess Controls SA Only SASI Fbox is red Open adjust window of the SASI Fbox and clear the last error using Clear button PS8Channel Proti S Bus Master
62. completed with Hardware Settings Assign slave channel No SASI instruction is necessary for the slave station in the Ether S Bus network All definitions necessary are already present in the Hardware Settings Principles of data exchange in a multi master network A multi master communication network has more than one master station Master Stations are the only stations authorized to read or write the data of the other master and slave stations Data exchange between slaves is not allowed With a Multi master communication mode data exchange is carried out between the masters in the network Only one master at a time holds a token which authorizes it to exchange data with other master or slave stations on the network When the master has finished transferring the data the token is passed to the next master which is then free to exchange data with the other masters or slaves The token circulates automatically between the master stations the slaves never have the token and so cannot read or write the data of other stations in the network PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 11 12 Saia Burgess Controls SA 11 6 4 Data Exchange between master and slave stations Initial Step channel assignation Step data exchange Transition wait end of the data exchange Data exchange between the stations is the sequential program The assignation of the communication channel is treated only once data exchange in the network
63. content is of no interest it is possible to the block that made the call Call block PB 7 in step by step mode Call block PB 2 in run mode 2 5 8 a x PB 7 CPB 2 A EOE eee v EPB After returning to block Exit block in run mode continue in step by step _ EPB Run mode EEE Eee Step by step mode STH Car outgoing A car leaves into the parking Hais STH IjO 1 8 AG Z0 H F1 EG TAG886 For each program step note the line shown in red It moves to the following instruction line The figure in square brackets represents the logical state of input 1 Further to the right the states of the accumulator status flags and index register are displayed PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 35 7 9 4 Set Clear Breakpoint Breakpoints Breakpoints allow the program to be stopped when a particular condition occurs e State of an input output flag status flag e Value present in a register or counter The breakpoint condition can be defined with the help of the Online Breakpoints menu or of the Set Clear Breakpoint button Breakpoints CPU Status Conditional Run X Type Number Condition Value Counter fiano Greater than E History Counter 1400 Greater thar Clear un 1 Clear Stop Help Close Output 3z Equals Delete Delete All Using the above window define the
64. error Ho Grattec parameters Download program after successful build Bo not expand macros Downoad without confirmation Clear Message Window on build Warn on symbols with the same type and value No crossteference list No titles of page breaks gt Disable HOLIST Additional build options W Create Map file map Cancel Help Ask before saving changed files If selected the PG5 requests authorization to save source files which have been changed but not saved before building the program Otherwise files will be saved automatically Stop build on first error Selecting this option will stop the build when the first error appears in the Messages window Download program after sucessfull build Selecting this option automatically downloads the program to the PCD but only if the build ends with no errors Download without confirmation Normally the process of downloading the program to PCD memory starts with a dialog box notifying the user and to be acknowledged with an OK button Selecting this option downloads the program directly without displaying the dialog box Clear Message Window on build The Messages window will be cleared at the start of each build Create listing file Creates an assembly report Ist Create map file Creates a file showing with the memory space taken up by the application and a list of the global symbols PG5 WorkShop Chapter 2 Project management 05 07 04 2 2
65. failure in extension rack PCD6 The voltage monitor in the supply module of an extension rack PCD 2 or PCD6 detected an excessive drop in voltage In this case all outputs of the extension rack are set low within 2ms and XOB 1 is called If outputs from this dead extension rack continue to be handled set reset or polled by the user program in any CPU XOB 4 and or XOB 5 are also called XOB 2 Battery failure or low battery The battery is low has failed or is missing Information in non volatile flags registers or the user program in RAM as well as the hardware clock may be altered After prolonged non use of the PCD more than 2 months without supply battery failure can be indicated also but without leading to loss of data Even a new PCD which has never been used can show the same symptoms XOB 4 Parity error on address bus PCD6 XOB 4 can only be called if the PCD has extension racks The monitor circuit of the address bus has noticed a parity error This can either arise from a faulty extension cable a defective extension rack or from a bus extension module or else it is simply because the extension rack addressed is not present If there is a fault the wrong element could be addressed XOB 5 No response from I O module PCD4 6 The PCD s input and output modules return a signal to the CPU which has addressed them If this signal is not returned XOB 5 is called Generally occurs if the module is not present
66. i i lose Project Froject Directory Backup 4 PG5 Projects gt Restore a Description Prints My user komment Print Setup Check Create CPU Properties W Create CPU Help Cancel PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd G SAIA Project Manager exemple exemple Mel File Edit View CPU Online Tools Help Ji Ue Online l ve ES Hardware feris Software CPU folder Program Files Listing Files Project exemple Opened CPU exemple PCD Activated Messages kX Ready BUILD REQUIRED OFFLINE A The SAIA Project Manager window is already displayed The Project window shows the structure of the new project If this window is not yet displayed use the View Project Tree menu command Folders in the Project window contain project information which is arranged according to certain criteria fe The name of the main folder shows the project name and the number of CPUs used in the project Modules that are shared by several the CPUs can be stored in the Common Files folder Next are the CPU folders each CPU corresponds to a PCD Every CPU folder contains the following sub folders ofe Settings contains the configuration for the programming tool and the PCD ae Program Files contains the program module files fe Listing Files contains files generated during the program build Build They a
67. lines grey using the mouse and right click to display the context menu The Edit Data context menu allows you to modify the operand state value in the instruction selected STL Humber of free slots EE z BHHB1F STL T C 1400 8 Online Edit Data Type Address Units Tc fiano H Decimal Edit Data gt Current Value pS Hew Value BO STL Humber of free slot aa Hel Witt CI paaei7 STL TIC 1486 ma se The Edit Instruction context menu allows you to modify the mnemonic and address of the operand corresponding to the selected instruction line STH Car incoming PT x GAHI STH I0 000011 STH___I10 19 ox Edit Instruction O gt Cancel Help STH Car aming 9906811 STH Ijo Status flags can also be modified with the help of the Edit Status context menu ME x V ACCU 7 2 jf ero I Negative Cancel IW Positive Error JD index Hee PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 37 7 9 6 Viewing and modifying symbol states with the Watch Window Another useful way of testing and viewing the state of symbols in our example is provided by the Watch Window Press the Watch Window button on the SAIA Project Manager Then drag symbols from the symbol editor into the Watch Window Watch Window 1 Position mouse cursor in centre of symbol icon and press left hand button Symb Number oF Free
68. parameters been selected correctly with the Settings button Configuration of PCD memory These are the same parameters as those already given with the Hardware Settings of the Project Manager To adjust the PCD s clock Set SAIA PCD Clock x PC Clock SAlA PCD Clock Date 10 01 03 Date dd mm yy 10 01 2003 Time 11 23 51 Time hh mn 2 02845 Day of week 1 7 5 Week of year 1 53 Ea i Cancel 1 Select the Online configurator button in the SAIA Project Manager window Then select Clock button Copy to POD 2 Copy time from the PC to the controller with the Copy to PCD gt gt gt button or adjust the clock in the SAIA PCD Clock fields Help The History logs all hardware or software errors that occur during PCD operation This table is permanently updated even if the XOBs have not been programmed Consult the history when the CPU s Error lamp comes on History eee xi Reason Address Time Date CALL LEVELS o6 01 2003 oY CALL LEVELS 30 14 09 43 o6 01 2003 7 CALL LEVELS 30 14 09 43 o6 01 2003 7 CALL LEVELS 30 14 09 43 O6 01 2003 7 CALL LEVELS 30 14 09 44 O6 01 2003 gt gt gt CALL LEVELS 30 14 09 44 o6 01 2003 gt Y CALL LEVELS 30 14 09 44 O6 01 2003 7 CALL LEVELS 30 14 09 44 O6 01 2003 2 7 CALL LEVELS 30 14 09 44 o6 01 2003 gt Y CALL LEVELS 30 14 09 44 o6 01 2003 7 CALL LEVELS 30 14 09 44 o6 01 2003 oY CALL LEVELS 30 14 09 44 o6 01 2003 gt Y CALL
69. program Instruction list program Fupla program COB 0 0 RTIME R 1 ECOB Fbox Time Related Read time This program reads the time from the clock and copies the value into register R1 Time is represented in the following way R 1 R2 093510 09 o clock 35 minutes and 10 seconds 073030210 week 07 day 3 Wednesday the 10th of Feb 03 2003 PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 2 3 Interrupt inputs Some PCDs have two inputs called INB1 and INB2 Whenever there is a rising edge on one of these inputs the normal program cycle will be interrupted and the PCD will execute a special program block called XOB20 or XOB25 XOB20 for INB1 and XOB25 for INB2 These inputs are capable of a frequency up to 1000 times per second The example demonstrates how to count pulses from INB1 Instruction list program Fupla program COB 0 Main program 0 ECOB XOB 20 interrupt INB1 INC R2 increment the register R 2 EXOB Fbox Integer Add 1 PCD1 M120 130 PCD2 M120 150 PCD2 4 M170 PCD2 M480 4 Interrupt inputs INO IN3 PCD3 M and PCD6 M3 2 For more information see your PCD hardware manuals Limits imposed by the input filter protecting a normal digital input against interference and bounce from mechanical contacts prevent the input from counting pulses with a frequency higher than 50 Hz Interrupt inputs therefore represent an interesting alternative solut
70. program into Download the PCD s memory Program Download Program Exemple Fuplaz x Program File Name Ja PG5 Projects S amples Chapter 1 Quick Start FuplaSExemple Fupla2 e gt Download Destination CPU Cancel PCD2 M1 70 CPU 0 on COM PEU gt Selected Segments IY Code Segment M Tet DE Segment Download All Changed Blocks Gownrloadin Aun Options I Extension Memon Segment I First time Initialization Data Help Selected Segments First time Initialigation Data Only Program File Name By default this is the name of the program for the active CPU All Downloads the entire program Code Segment Text DB Segment Extension Memory Segment Changed Blocks Only downloads blocks COB PB FB SB ST TR XOB modified since the last Download This option is only used to save time with minor program corrections The Changed Blocks button can be used to display a list of changed blocks Download in Run Allows changed program blocks to be downloaded without halting program execution Proper operation of this option may depend on the corrections being made to the program Cannot be used for Fupla modules Selected Segments Only downloads segments defined under Selected Segments Code Segment Program Text DB Segment Text and DB 0 3999 Extension Memory Segment Text and DB 4000 7999 First time Initialisation Data Only Only downloads the Data d
71. start to finish After this time two scenarios are possible If XOB 11 has not been programmed the COB will be exited to process successive COBs up to the last one The error lamp will be on In the next program cycle the COB that ran out of supervision time will start up again with a new supervision time from the point where it broke off If XOB 11 has been programmed the COB will be exited to process XOB 11 At the end of XOB 11 the COB that ran out of supervision time will start up again with a new supervision time from the point where it broke off The error lamp will not be on because the error was foreseen and handled by the user program A supervision time of zero means that the supervision time has been deactivated PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 3 Program Blocks PB 0 to 299 5 3 1 Definition You may also work with Program Blocks PBs offer a good way to organize your program in a hierarchical manner PBs are only activated if they are called from a COB PB FB or SB Sequential Block There are two ways to call a PB conditional call or unconditional call Conditional calls depend on the result of a logical operation You can call the same PB several times in the program One PB can call another PB and so on up to seven levels of nesting Beyond the seventh nesting level the PCD will call error handler XOB 10 5 3 2 Example Realization of a two speed blinker dependin
72. the PG5 project Without a controller nothing can be known about this information It is therefore preferable to use the online configurator for checking PCD data and to configure them with Hardware Settings Online Configurator window 414 Online Configurator IOl x File Online Tools Options Help Online Settings Station 10 Socket 192 168 123 128 Go Offline Information PLD Type Program D ate Time Status Help PCD type Version Program Name Date Time Day Week Status Onlinesettings Online Settings PLD2 M1 is Version O10 Hardware Settings Web Dema 25 5 2004 Day 2 Information ae 42 Week 22 History Run Clock Run Stop Restart E vit PCD type reference number Version of PCD firmware User program name PCD clock date if no clock 1 1 92 PCD clock time Day of week 1 Monday 7 Sunday Week number Mode of operation Run Stop Halt Conditional Run Connection direct PGU or S BUS PG5 Workshop Chapter 8 Additional tools 05 07 04 8 12 Hardware Settings History Saia Burgess Controls Ltd If the information in red is not displayed or if a No response message box is displayed it is not possible to establish communications between the PCD and the Online Configurator If so please check e ls the computer correctly connected to the PCD with PCD8 K111 cable e Have communications
73. the text and DB Registers flags timers and counters are handled by the system and stored in a small RAM apart from the main memory DBs and texts on the other hand are stored in the main memory together with the user program If you want to use a FLASH Eprom or a normal EPROM for your main memory remember that when you are in run mode you can read from this memory but not write to it Therefore you cannot alter the content of your DBs for example your data login In most cases you will not bother with this but if you know that you are going to read and write from your DBs then make sure to use DBs which are stored in the extension memory gt address 4000 and up This is the extension memory and it is always RAM which means you can read and write to it Example declaration of DBs and text TEXT 10 Bonjour Text number 10 contains the string Bonjour TEXT 11 7 Hello Text number 11 is 7 characters long of which the last 5 are Hello and the first two are spaces DB 12 45 46 78 999 0 DB number 12 with the 5 integer values 45 46 78 999 0 DB 13 10 DB number 13 is 10 values long and they are zero cat start up DB 14 4 2 3 DB 14 is four values long The first two are 2 and 3 the second two are 0 PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 14 Saia Burgess Controls Ltd Exemple data logger in Fupla The following shows how easily values from an analogue card can be logged into DB 4010 Ev
74. to 80 characters long and are not case sensitive unless they contain accented characters MotorOn is the same as MOTORON but GR N is not the same as gr n Symbols have to start with a letter a z A Z a number will not be accepted Within the symbol numbers letters and underscores _ can be mixed as desired A symbol name cannot include a space character Reserved words cannot be used as symbol names 3 5 20 Reserved words The following words are reserved and cannot be used as symbol names Assembler instructions PUBL EXTN EQU DEF LEQU LDEF of e be b bre b te MACRO ENDM EXITM Command codes and abbreviated notations for different data types of the PCD O F R C T K M COB FB TEXT X SEMA DB Special instructions MOV N Q B W L D Conditional codes H L P N Z E All instruction mnemonics Predefined symbols Internal symbols reserved to the automatic resources allowance begin with an underlined char Exemple TEXT F Intern symbol __CSTART _ used with PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd Content 4 Program with FUPLA 4 1 Introduction 4 2 Preparation of a Fupla project 4 2 1 Create new project 4 3 Organization of a Fupla window 4 4 Editing Symbols 4 4 6 Add new symbol to Symbols list 4 4 7 Symbols addressing modes 4 4 8 Using a symbol from the Symbols list in an Fupla program 4 4 9 Local and global symbols 4 5 E
75. up program COB 0 Cyclical program 0 No supervision time STH Car_incoming Acar comes into the parking DYN Dynamise_incoming_car_signal On the positiv flank of incoming signal DEC Number_of_free_slots Decrement the number of free parking slots STH Car_outgoing A car leaves into the parking DYN Dynamise_leaving car_signal On the positiv flank of outgoing signal INC Number_of_free_slots Increment the number of free parking slots STL Number_of free slots If no more free parking slots counter state Low OUT Red_light Set the red light ECOB End of Cyclical program PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 31 1 1 Build All PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Building the program The user program is fully edited but not yet usable by the PCD It must be translated into a binary file This is what the programming tool does when the user activates the CPU Build menu or the Build button in the project manager or IL editor The Messages window tells us how the build is proceeding It will be noted that the build has assembly and linkage stages If the program has been edited correctly the build will end with the message Build sucessful Total errors 0 Total warnings O xi Global symbols 34 Linkage complete 0 errors 0 warnings Generating Block Information files Block Information Files complete Build successtul Total errors 0 Total warnings 0 Any error
76. will be executed only if the previous exchange of the data s is finished That s why we propose to treat IL data exchange with Graftec Editor Initial Step allows assigning the communication channel at the Restart Cold of the PCD Other Steps are executed in loop and step one supports one data package Every Step is separated by one Transition which tests diagnostic flag TBSY and defines if data Exchange is finished We are authorized to exchange data s defined by step which follows only if TBSY is Low Data Exchange using a Step Before to exchange data we must define address of the slave station in the register which is declared for this by text assignation Define the address of the slave station LDL R500 Register address with the slave station address 11 S Bus address LDH R500 Register address with slave station address 2 IP Node Data exchange between the stations is supported using two instructions STXM for writing data in the slave station SEND SRXM for reading data in the slave station RCV Each instruction contains four parameters Channel address number of data s to exchange address of the first data source and the destination PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 13 11 6 5 Write 8 Flags F 0 F 7 in the slave station F 200 F 207 STXM 8 Channel address 8 Number of the data s to exchange FO address of the first source data local Statio
77. 000 Daily Ti ee Oe ONTIME R2005 sappo_ Daily Ti Delete Line Delete All Address Comment Raste Daily Timer O32 1 Daily Timer Daily Timer 1 Position mouse cursor HMS R 2003 113245 Daily Timer PCD Clock with curr on a line in the window OFF TIME F 2004 182000 Daily Timer Switch off time F 2005 Press right hand mouse button S3000 Daily Timer 2 Edit the new address 8 3 3 Online display of data Select the Go On Offline button to view the value state of each symbol Address Go On Offline Daily Timer 032 Daily Timer EESAIA Watch Window Watter Distribution x HMS R 2003 113245 Daily Timer PCO Clock with curr OFFTIME R 2004 182000 Daily Timer Switch off time ON TIME R 2005 53000 Daily Timer Switch on time PG5 Workshop Chapter 8 Additional tools 05 07 04 gt SALA Watch Window Watter Distribution WE f M Ed Switch on time 8 10 8 3 4 8 3 5 Saia Burgess Controls Ltd Online modification of data It is also possible to modify the value of a symbol Daily Timer O 32 1 Daily Timer Daily Timer HMS R 2003 113245 Daily Timer PCD Clock with curr OFFTIME R 004 167000 Cail Time wich OFF Firme ONTIME R 2005 Insert Line Ins N e x Delete All Type Address Units Paste Ctrl R w 2005 Decimal Current Value it Data Ctr Edit Data Sangi Mew Value apoo Close
78. 07 04 Saia Burgess Controls Ltd 3 17 3 4 2 Grouping symbols together If desired symbols can be grouped together This makes the program easier to read Just use the right mouse button to add a new group to the symbol editor and then drag and drop the symbols you want into the folder Example The Group named LotOne contains several symbols Comment Loe COB 3487453 COB Y Lotone GROLIP Li Mewar Input New car arrived CI Car _Jeaving Input Car is leaved From the park Li Lot Full Cutout Parking place is Full Da Global Lot cok E E gt out Lotone Lot full ecob In the program the group name LotOne precedes the symbol name Lot_ful and both are separated by a point 3 4 3 Scope of symbols Symbols are normally known to one file only their scope is local AS soon as a program file is opened in an editor the symbol editor with the appropriate symbol list will also be opened Example Opening the program file named Lot src automatically opens the symbol editor with the same name HL La ing Input 1 L Lo Output 32 Ta Global o Lot PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 4 4 Local symbols Local symbols are only known to the one file to which they belong Instruction List program file src Fupla program file fup TT T TITI TT T fi i 3 4 5 Global symbols Global symbols are known to all the files in the CPU
79. 1001BLP 70L RAM 4 MBit 4502 71750 HM628512LP 5 KM684000ALP 5L KM684000BLP 5L Flash 1 MBit 4 502 7141 0 AM29F010 70PC Flash 4 MBit 4 502 7224 0 AM29F040 auf Sockel EPROM 256 kBit 4 502 5327 0 UPD2 7C256AD 10 M27C256B 10F 1 TMS27C256 10JL EPROM 512 kBit 4 502 3958 0 AM27C512 15XF 1 AMC27C512 15XF 1 AM27C512 90DC UPD2 7C512D 10 M27512 10XF 1 M27512 10F 1 EPROM 1 MBit EPROM 4 MBit 4 502 7126 0 4 502 7223 0 PG5 WorkShop Chapter 2 Project management 05 07 04 AM27C010 90DC NM27C010Q 90 M27C1001 10F 1 AM27C040 100DC M27C4001 10F 1 2 14 24 K Lines Saia Burgess Controls Ltd Hardware Settings Exemple xX PED Memory Password S Bus Serial Modem Prane ews TCPIP Gateway M Manual Memory Allocatior RSE ETI GRO ono Hon Huon CO a OOBOSS ANCA a R a T 24 4 32 shared Extension memory text DBs of each CPU STEC Anong S Code Test DB Extension CPU 4 24K Bytes K Lines K Eptes K Bytes Present CPU Ur T24 32 24 W CFU 1 E Extension Memory Initialization CPL 2 y E EMI Segment DPJ a E Action if Extension Memory CPU 4 Sy iia E i comupted batter Failure CPU 5 E i Normal Fully re trutialized crus E Sai Clear Totals 128K Bytes 24EB All data is set to zeros i None Available METO sults Data must be downloaded Save As Upload Download Cancel Help
80. 104 PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 3 11 3 The PG5 Project fe Project Fupla and Ether 5 Bus data exchanges 3 CPUs z fe TCP IP Settings Table Define Hardware Settings for im i every CPU PCD Program Files Listing Files l F Documentation Files HS Master station B PEDS M5540 IPNode 2 Station 11 HSS Slave station C PCOS M5540 IPNode 3 Station 12 Saia Project Manager The Saia Project Manager shows all the PCD stations in an application s Project and also the network communication parameters We will begin with adding a CPU to the Project for each of the Network Stations 11 4 Hardware Settings master slaves The configuration of Hardware Settings for a master and Slave are similar 11 4 1 Define PCD parameters Hardware Settings Master station A X PCE Mernary Password S Bus Serial Modem Profi S Bus TCPHIP Gateway PCD Hardware PCD Type Code T ext Estension Menor Size PLO M480 oz Bytes RAM Number of CPU s To Communications Modules Onboard Profi S N et Channel 10 Slot B1 None Slot Be PCD Fea TCP IP Channel id Save Ag Upload Download Cancel Help PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 11 4 11 4 2 11 4 3 Saia Burgess Controls SA PCD Type Define the CPU type Communication Modules If necessary indicate the type of the co
81. 11 12 13 ANH 14 Accu 10 11 12 13 14 ANH 15 Accu 10 11 12 13 14 15 OUT O32 Copies result of equation present in accumulator to output ECOB End of cyclic program PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Example programming a binary equation with a changed order of evaluation This example of a program performs the binary equation 033 11 12 14 13 It may also be represented by the following diagram 1 12 I4 33 m Bon T 13 It is sometimes necessary to change the order of priority of binary functions Generally we do this by putting brackets into the equations However the PCD instruction set does not include brackets The equation must therefore be divided into two smaller equations The first equation works out the result of the bracketed part and saves it temporarily to a flag while the second equation takes the interim result saved on the flag and calculates the final result COB 0 0 STH 11 First equation ANH 12 ORH 14 OUT FO Result of bracketed function FO 11 12 14 STH FO Second equation ANH 13 OUT O33 Final result O 33 FO I3 ECOB Other binary instructions also allow the accumulator to be used to modifiy the state of an output or flag Each instruction supports a different function Example SET O 32 If accumulator state is high output 32 will be for
82. 1400 Counts the number of free parking slots D Red_light O 32 Stops new cars at the entry 2 Keep mouse button down and drag symbol into Watch 3 Symbols with their Window comments and states values To modify the state value of one of the symbols in the window proceed as follows amp S SALA Watch Window Parking lot Parking lot swe OnE ea ed Number oF Free 1400 Red light O32 Insert Line Delete Line Dei OST Delete All Type Address Units Faste Coley tec E pa S Decimal E ZE eiae fo New Value ja Help Close 1 Position mouse cursor on value to edit Press right hand mouse button 2 Edit the new value PG5 WorkShop Chapter 7 Programming in IL 28 09 04 7 38 7 10 7 10 1 Saia Burgess Controls AG Commissioning an analogue module All program instructions presented up until now have made use of digital inputs or outputs putting their addresses or symbols in front of the mnemonic Example ANH 45 With analogue inputs or outputs however an acquisition routine must be used for the analogue value There are different routines for the different types of analogue module Descriptions will be found in the hardware manual of your PCD Example for PCD2 W340 analogue input modules If the PCD is equipped with a PCD2 W340 module which has 8 universal input channels the following routine may be used BA EQU O 96 Module
83. 2 2 5 Messages Saia Burgess Controls Ltd Messages window The Messages window provides information on the progress of a program build It notes the different stages of the build compilation assembly and linkage If the program has been edited correctly the build ends with the message Build successful Total errors 0 Total warnings O Messages x Extension memor size 0 bytes Global symbols 34 Linkage complete 0 errors 0 warnings Generating Block Information files Block Information Files complete Build successful Total eros 0 Total warnings 0 Any errors will be indicated with a message in red Double clicking with the mouse on these messages generally enables the error to be located in the application program Double click with the mouse on the error message Compiling Files Compiling d SPG5 Projects Chapter4 Chapterd4D ally Timer fu S FUP Error 60 Daily Timer fup Page 1 1 27 1 Bad label Error Compile failed d PG5 Projects Chapter Chapter D ally Timer fup Build Failed i The error is marked in red or with an arrow Correction of error E ONTIME OFFTIME as a PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 23 2 6 fas Downloading the program into the PCD If the build concludes without any error messages the Download Program button or the Online Download Program menu command can be used to load the
84. 2 of computer Define PGU protocol Cancel Help Channel S Bus USB Online Settings Exemple x Channel OK Name S Bus USB Setup e Cancel S Bus USB Connection CPU Number fo S Bus Station 254 M uto WM PGU Number of retries 3 Define S Bus USB protocol Note The USB interface is only available for the new CPU PCD2 M480 and PCD3 PG5 WorkShop Chapter 2 Project management 05 07 04 2 10 Saia Burgess Controls Ltd 2 3 5 Connection of PC to PCD Channel PGU RS 232 A PCD8 K111 cable provides the RS 232 link between the PC and the PCD For more information about this cable please see the PCD hardware manual LEE Poo Channel S Bus USB The USB interface is only available for the new CPU PCD2 M480 and PCD3 Checking the connection re The Online Configurator button or the Tools Online Configurator menu command Online allows the connected PCD s settings to be viewed If the information in red is shown Configurator then communications is working perfectly SAIA Online Configurator E iol x Fil Online Tools Options Help Online Settings COM1 PGU 38400 baud Go Offline Online Settings Infomation PO TBs PECANS Version MU Hardware Sethings Program 1_Farkin Date 19 5 2004 Day 3 Information Time ee we Wee
85. 3 4 18 4 9 4 9 1 Saia Burgess Controls Ltd Page export and page import Page export import is a complementary tool to the copy paste function but much more powerful It offers the following advantages Copying and pasting several pages Modification of imported symbols and addresses Possibility of creating a component library Page export Page export can be used to select one or more pages from a Fupla program and save them in a file along with FBoxes connections comments and symbols In this way parts of programs currently used in one or more files fxp can be brought together to form a component library that can be used to build future applications more quickly For example let us assume you often use daily weekly and monthly timers to switch a digital output on or off at a specific time in any day week or month You therefore create a program of several pages in which each page corresponds to one of the timers currently used and export the lot to a file Timer fxp Page Symbols Help Select pages to export Insert Before Insert BLE Export Pages Delete Save in 2 Chapt stay uted at be tt Clear Clear Page Page ha ie Al s Show Fos L E Pages ae T C Current Page Cancel First C OoOo eek Pages Previgus Enter page numbers andor page ranges Mext separated by commas For example 1 3 5 12 Help File name Timer Import port Files fap Cancel
86. 4 input 4 to Operands Instructions input ANL output ORL flag p Binary inversion LU ACCU Instructions Operands ANH input ORH output flag LU ACCU Saia Burgess Controls AG 7 5 3 Dynamisation Binary instructions generally use the low or high binary state to perform a binary function or modify the state of an output or flag Sometimes it is not the low or high binary state that interests us but the passage from a low state to a high state e g to increment a counter To detect a rising edge proceed as follows place the result of a binary equation in the accumulator and use the DYN instruction to find the positive change After the DYN instruction the accumulator state will be high if a positive change has been detected otherwise it will be low The flag used by the DYN instruction may only be used for a single dynamisation instruction This is because it is used to conserve the state for the next program cycle Example detection of a rising edge STH 10 io LF LF LH DYN F3 fo COM 034 O 34 Example detection of a falling edge STL 10 10 vy fypfy DYN F3 er ne COM 034 O 34 To help you see the influence of the DYN instruction on the program shown above we suggest you remove the DYN instruction and observe how the program behaves PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 19 7 5 4 Status flags
87. 43 o6 01 2003 7 CALL LEVELS 30 14 09 44 o6 01 2003 gt gt gt CALL LEVELS 30 14 09 44 O6 01 2003 7 CALL LEVELS 30 14 09 44 O6 01 2003 7 CALL LEVELS 30 14 09 44 O6701 2003 7 CALL LEVELS 30 14 09 44 O6 01 2003 gt Y CALL LEVELS 30 14 09 44 o6 01 2003 7 CALL LEVELS 30 14 09 44 o6 01 2003 2 7 CALL LEVELS 30 14 09 44 o6 01 2003 gt Y CALL LEVELS 30 14 09 44 O6 01 2003 BATT FAIL al 0 14 09 43 o6 01 2003 IF OVERFLOW 0 0 12 00 00 o6 01 2003 ERROR FLAG fre 6 14 09 44 o6 01 2003 Help Clear History eee Time and date Programme line Error counter Text Very last error Note fe Every CPU has his own history h The line BATT FAIL only exists on CPU 0 fe If the error can be assigned to a program line the line will be indicated Otherwise it will be displayed in hexadecimal fe XOB 0 is only called if it has been programmed PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 6 5 Description of XOBs XOB 0 Power failure in main rack The voltage monitor in the supply module of the main rack has detected an excessive drop in voltage In this case all outputs are reset as follow fe for the PCD4 immediately fe for the PCD6 after 1 5 ms XOB 0 is invoked and all CPUs are put into the HALT state From the moment when XOB 0 is invoked until CPU HALT is an interval of approx 5 ms During this time XOB 0 continues processing so that data can still be saved XOB 1 Power
88. 8 kByte E gt 1Mbit PCD2 M170 RAM 1 MBit PCD2 M170 1024 kByte No carriers PCD2 M480 RAM 1 MBit PCD2 M480 1024 kByte No carriers PCD3 M3020 RAM Onboard 256 kByte None No carriers PCD3 M3230 Flash backup 256 KB PCD3 M5440 RAM 512 KB 256 kByte None No carriers PCD3 M5540 Onboard Flash backup 256 KB RAM 512KB PCD7 R500 512kByte None No carriers FlashCard backup 512 KB PCD4_ 2 RAM 62256 4 502 54140 64 kByte RAM 2 RAM 1 Mbit 4 502 7013 0 256 kByte 172 kByte for RAM 2 EPROM 256 kBit 4 502 5327 0 64 kByte Memory E256 2 EPROM 512 kBit 4 502 3958 0 128 kByte PCD7 R310 E542 2 EPROM 1 MBit 450271260 256 kByte E1M PCD4 M170 RAM 1 MBit PCD4 M170 1024 kByte No carriers 2 28 kByte for all PCD2 M110 120 with hardware versions J or higher 128 kByte for all PCD2 M150 Memory size flash backup 1008 kByte for all PCS1 hardware version bigger or equal to E Jumpers R RAM E EPROM F Flash PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 13 If the PCD s memory size is unknown find the reference printed on the memory chip itself and use the table below to determine the stock number and memory size Speichergrosse Bestellnummer Referenz RAM 256 kBit 4 502 5414 0 SRM 2B256SLCX70 HY62256ALP 70 GM7 76C256CLL 70 MSM5256DP 70LL TC55257DPL 70L RAM 1 MBit 4502 7013 0 LP621024D 70LL SRM20100LLC70 HY628100ALP 70 GM76C8128CLL 70 M5M51008BP 70L TC55
89. 9 Saia Burgess Controls AG Instruction words for timers Integer value T 4 Binary state T 4 Temps Timers contain two values the integer delay time value and the timer s binary state To implement a delay time load the time value as a positive integer that will determine the length of the delay time in tenths of a second The controller will automatically decrement the time value until it reaches zero The timer s binary state is high while the time value is decrementing and goes low when the time value reaches zero Loading a delay time Reading the state of the timer LD T4 Use a binary instruction such as If the accumulator state is high timer T 4 will be loaded with a constant of STH T4 ANHT 4 ORHT 4 10 Otherwise the timer will keep its current value Example Send a one second pulse to output 36 for each rising edge at input 2 State diagram io L FF Integer value T 4 2 Binary state T 4 es E E 036 1s LE JS is L pC Corresponding program COB 0 0 STH 12 Detection of rising edge at input 2 DYN F2 sets accu state high LD T4 If accu is high load time delay for 10 units of time 10 STH T4 Copy logical state of time delay to output 36 OUT O36 ECOB A time base other than 1 10th of a second default value can also be set This can be done from the Software Settings PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Example Sen
90. A E 5 11 5 1 Assign the channel using SASI FDOX cccesccccccssesssesecccccsecsssssceescccsesesssneasccesessssseeneaces a lios Aseni Master CHANEL ensi O E unsclt danwomenestamiebenenoseduatennaen 6 Uoo Asen slaye Chinnes E Need ae rcaandend dealer nnaeenadaues 6 11 5 4 Principles of data exchange in a multi master NCtWOLK cecceesssseeceeceeseesseeeeecessesssaees 6 11 5 5 Data Exchange between master and slave Stations cccecsessssecceecessessneeeeecesssessneeeeeeeeesees 7 CEG DO a A E E E A R 8 EO LOTO rates ces A A EE EE EES EE EE E E REEE T AEE ll 11 6 1 Assign le master canal using SASI instruction s sssssoeseeeessssesesressssssssereesssssssereeessssssseres 11 WG Assign slave channel siscriricniirisircr nonnina eaea ai aaaeaii a ainei 11 11 6 3 Principles of data exchange in a multi master NetWOTK cceceseseeccececesseessneeeeeeeseneees 11 11 6 4 Data exchange between master and slave stations soensssosssssesseesssssssresessssserreesssssssrese 12 MUS MAAS Sasa E E E ses E ia tea otaneues 13 Io OAN FUNG T ae tices cant sacs E ote celhaie tadashi E 15 HN APP O i e E E E E E E EAT AA anata 15 11 7 2 Configuration of the Gateway PGU function sonnneeeeessssesseesessssseseeessssseseresesssssssressssssseree 16 11 7 3 Configuration of the Gateway Slave port supplementary slave c ccccccceesesssteeeeeeeeeees 18 1174 Communication TIMIDE gica casa eia se noneevnsae iieiea aR ENE
91. CPU This where S Net will create the master station s network control file This dialog box also allows the station name and address to be defined 12 6 Configuring slave stations 12 6 1 Configuring Input Output modules Slave 2 PCD3 17607 Parameters ES Station Parameters Modules Device Bus M Modular Mas Number of Modules i T Slot Installed Modules 0 Wd 44 Temperature Define Modules 1 E11 801 15 3007 Definemoduies Device Configuration OK Supported Modules Slot Installed Modules Cancel E16x 16D1 15 30 VDC E61x 8DI 15 30VDC galv sep A2xx 4 8D0 Relais A300 6D0 24 10 32VBC 4400 8D0 5 30 VDC 4410 8D0 5 30VDC galy sep A446x 1600 10 30VDBC B100 2D1 2D0 4D1 D0 Parameters Remove m Installed Module Configuration Length Format Consistency Type Mapping F Alarm0 Alarm Help For each input output module fitted in the slave station select the module type in the Supported Modules list and add it to the nstalled Modules list using the gt gt button Ensure that the Slot number corresponds to the slot where the module is actually installed use the up down Move arrows to change the slot PG5 WorkShop Chapter 12 Profi S IlO 01 12 04 Saia Burgess Controls 12 6 2 Configuring symbol names for remote data Module 1 byte s input Mapping Flag Register Number of Media g Ease Address Media Type M
92. Clr Err ref P 6 Channel ENDO a ref PSA Channel RCW E ref PSE Channel To ret PS Channel Ecv By Diagnostic Fbox If SASI lamp is red it is always possible to obtain a diagnostic while consulting the adjust window of the SAS Diagnostic function This Foox should be placed just below SASI Fbox PS8Channel Proti s Bus Waster Clr Err ref F56 Channel Diag Prof s Bus PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 11 11 6 11 6 1 11 6 2 11 6 3 IL program Assign the master channel using SASI instruction Mode Ether S bus Master Register with slave station address First address of the 8 flag range of the diagnostic register SASI TEXT 10 MODE EM R0500 DIAG F1000 R0501 ENDSASI SASI 8 Address of the communication channel 10 Address of the text with the assign parameters Channel assignation is done using SASI instruction which is placed in the beginning of the program initialization of the Graftec sequence or initialization block XOB 16 SASI instruction contains two parameters The address of the communication channel and the text address with all necessary channel parameters The parameters of the assignation text are different from one network to other also for master or slave station If the PCD exploits more communication channels define each channel using SASI instruction and assignation text According to network channel parameters can be
93. Fupla program ee Timer 0 2 ee ki Graftec Timer is zero second ne Timer Graftec End of transition IL program STL One_S_Timer Set the accu high at the end of the timer PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 21 6 12 8 Repeat the step and transition for the time were the pulse is off The step 2 and transition 2 are the same as step1 and transition 1 exept the output Three_pulses which is set low Fupla program a Load Timer off amp load time Fbox Graftec Load timer Binary Low Turn the output IL program RES Three_pulses Set the output low LD Pulse_ Timer Load the timer Pulse_ Time TR Fupla program 2 Wait an other Timer 0 i IL program STL Pulse_ Timer Activates the accu when timing shas ended Note Two different timers One_S_ Timer and Pulse_Timer have been used for ST TR 1 and 2 However to save available timer addresses we could just as well have used the same timer twice One_S_ Timer or Pulse_Timer because they are not used simultaneously but one after the other PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 22 Saia Burgess Controls Ltd 6 12 9 Decrement a counter Fupla program The counter is decremented in each program cycle The counter is only decremented if the binary input is high read help on FBox Remember An empty input field is always set Decrement Counter Dec Counter Fbox
94. Global or Local folder LY red_light Output o Parking lot Any new symbol defined directly from the IL editor will be added either to the global or local folder depending on settings in the Global symbols option See context menu Advanced Options of the Symbols window PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 13 7 9 7 5 1 Introduction to the PCD instruction set This section provides and overview of the PCD instruction set For more detailed information consult the full description of each instruction given in the manual Guide to instructions 26 733 or in PG5 help screens To obtain specific help about an instruction from the IL editor write the instruction put the cursor on itand press key F7 General help is also available with the menu Help Instruction List Help The accumulator The accumulator is a binary value whose value is set by binary instructions and a few integer instructions The PCD has just one accumulator which may be considered as a special kind of flag The state of the accumulator can be forced with the ACC instruction The ACC instruction also allows the accumulator to be forced with the value of a status flag see description of status flags Examples ACC H Forces accumulator state high ACC L Forces accumulator state low ACCC Inverts complements accumulator state PG5 WorkShop Chapter 7 Programming in IL
95. IO Network sia lt _ Listing Files Documentation Files The S Net configurator file is added to the master station in the same way as Fupla or IL files using File New selecting the Profi S lO Network File sio file type S Net configurator usage is similar for both Profi S lO and Profibus DP data exchange The only differences are e File extension of the configuration SIO DP e The supported devices in the network SIO Saia devices DP devices for Saia other suppliers e Bus timing profiles S Net or DP Defining stations on the network 6 S SAIA g D Slaves ae E PLO M480 Onboard Slave ie E PCDS M3xxx Onboard Slave oe E PCOS M5xxx Onboard Slave Foose B FPCD3 T 760 2 3 PCD3 T760 2 PCD3 T760 3 Slave station PCD3 T For each station select the station type in the device list and add it in the network with the gt gt button PG5 WorkShop Chapter 12 Profi S IlO 01 12 04 12 4 Saia Burgess Controls SA 12 5 Configuring the master station Master 1 SIO Master Parameters Xj Station Resources Device Bus PCO Type PCD3 MSs Profi 5 I0 Master Mame s10 Master Address f Associated CPU File CAPS Projects Profi SIO Network S I0 Master SI0 Master Spc New CPL Existing CPU Browse OF Cancel Help The only information which needs to be defined for the master station is the Associated CPU File which is the access path of the master
96. Introduire votre commentaire dans le champ Comment PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd N 3 i Edit Code F4 b Edit Element x Cut 5 38 05pm Copy Type Transition ka Paste a Humber o Delete Mame Comment E output on Code Editor Mone Edit pee Cancel Saia Burgess Controls Ltd 6 11 9 3 Insert a sequence 1 2 Select the button Transition mode Click on a step followed by a transition The editor will insert a new transition and a new step L diteur ajoute une nouvelle tape et transition 6 11 10 Delete a sequence Activate the button Select mode Click on the first transition of your sequence Click on the last step of the sequence you want to delete while holding the Shift key down Press the Del key PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 15 _ Turn the output off aqain Turn the output ott again Turn the output Turn the output ott again off again 4 6 16 6 11 11 Copy paste a sequence Copy a sequence 1 Activate the button Select Mode 2 Mark the start of sequence 3 Mark the last step of the sequence while holding the Shift key down 4 Select the menu Edit Copy 5 Activate the button Select mode 6 Click on the point where you want to insert the sequence T Select the menu Edit Paste Past
97. LEVELS 30 14 09 44 o6 01 2003 BATT FAIL al 0 14 09 43 o6 01 2003 IRF OVERFLOW 0 0 12 00 00 o6 01 2003 ERROR FLAG fre 6 14 09 44 o6 01 2003 Help lear History ie Notes e Each CPU has its own history e The BATT FAIL error only exists on CPU 0 e fan error can be traced to a line of the program it will be specified Otherwise it is displayed in hexadecimal e XQOB 0 only appears if it has been programmed PG5 Workshop Chapter 8 Additional tools 05 07 04 Date and time Line of program Error count Description of error Most recent error Saia Burgess Controls Ltd 8 13 8 5 EPROM programming PG5 supports the creation of binary or hexadecimal files for all types of standard EPROM programmers on the market From Project Manager select menu CPU Create Hex Files Create Hex Files Watter Distribution x PCO File Name for CPU 0 d PG5 Projects Chapter 4 Fupla examples atter Distribution atter Distribution PID File Hames for CEUs 7 6 Destination Directory d PG5 Projects Chapter 4 Fupla examples fatter Distribution Output File Mame e g xHeU HES sel HES Output File Format watter Distribution Intel HEX af EPROM Size Mot configured Help Hardware Settings i Cancel To create an EPROM file e Configure the Hardware Settings e Build the program e Select the Output File Format e Define Destination Directory and Output File Name e Press OK button Technical det
98. Module base address 32 for this example 4 Connect the PC s RS 232 interface COM port to the PCD s PGU connector PCD8 K111 cable should be used for this purpose 230 VAC 7 N B For more detailed information about hardware assembly and wiring please refer to your PCD hardware manual PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd 1 3 Editing the program 1 3 1 Software Installation Install the PG5 programming tool for SAIA PCD on the PC if this has not already been installed following the instructions supplied with the CD cd PG5 InstallationGuide_E htm 1 3 2 Starting the PG5 Start the PG5 s Project Manager Start gt Programs gt SAIA PG5 V 1 3 gt Project Manager SAIA PGS 1 3 mm Fi Fag Online Configurator 5 Project Manager F Online Debugger Jal Setup Extra Files 1 3 3 Opening a new project Before starting to write a new program a new or existing project must be opened that contains the necessary definitions a few configuration parameters and the files needed for the user program If the project does not yet exist select File New Project define the name of the new project in the Project Name field check the Create CPU option and confirm with the OK button Make a new project File Edit View CPU PIE a New Project Open Enter project name Project Hame Mew Project Open Project Example fim
99. Next Page buttons allowing movement from page to page in a Fupla block If either of the gt buttons is grey you are already on the first or last page of the block gt Goto Next Page PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 4 16 Saia Burgess Controls Ltd 4 7 4 Page documentation You are strongly advised to document each of your Fupla pages This is very useful when navigating through the pages of your program because page names and comments will be displayed in the Page navigator window The description is a way of leaving some useful information about the program that will make it easier to maintain x Page COB ModemHandling 273 56x54 Mame DTMF Comment DTMF command Description Let to modify a flag or register with a natel Page Navigator E COB 1 ModemHandling Page 3 CallBack Help E COB 0 MainProgram 4 7 5 Processing of program by the PCD The PCD processes the pages of each block from the top left of the first page to the bottom right of the last page For more L 6 L precise details on the order in which FBoxes are processed by the PCD select menu path Page FBox priorities PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 Saia Burgess Controls Ltd 4 8 4 8 1 4 8 2 Copy and paste Certain parts of a program may be repetitive It is not necessary to edit them again in full It is much faste
100. P sala IL Editor Interrupt inputs xob 13 src S 7B ioj xj pr File Edit Search wiew Project Online Tools Symbols Window Help _ e x Group Symbol Address Value Eley Li Reserved 12 dynamic registers al System Da Global ob 13 Symbols x JUger diagnostic Halt the program JUser program of PG5 WorkShop Chapter 5 Structures 05 07 04 9 13 Saia Burgess Controls Ltd Maintenance of your PLC fe Monitoring of batteries need to be changed every 3 to 4 years Fupla example With Fupla it is not even necessary to create an XOB 2 block It will be added automatically by the Fbox Special Battery The Battery_Failure output will be high for any battery problem ai ECEE IL Example If there is a PCD battery failure the battery lamp on the front of the PCD will come on and XOB 2 will then be called automatically at regular intervals In the above example XOB 2 loads a timer with a delay of 1 second As the exception block is called regularly the timer will be initialised frequently and will not have the chance to count down to zero The binary state of this timer will therefore be high for a battery failure falling to low approximately 1 second after the battery has been replaced E SAIA IL Editor Interrupt inputs xob 2 src B Ioj x pr File Edit Search wiew Project Online Tools Symbols Window Help a x x L Battery Failure Timer E ae A al System Ta
101. Printed in Switzerland 26 732 E8 07 2004 Subject to change without notice rgess QU Sdlo Smart solutions for comfort and safety Saia Burgess Controls Ltd Bahnhofstrasse 18 CH 3280 Murten Switzerland Telephone 41 26 6727111 Telefax H41 26 6704443 E mail pcd saia burgess com Homepage www saia burgess com Support www sbc support ch Saia Burgess Controls Kft Liget utca 1 H 2040 Budaors Telephone 023 501170 Telefax 023 501180 E mail office saia burgess hu Homepage www saia burgess hu Support www sbc support ch Your local contact
102. Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 15 The result of any binary equation is always saved in the accumulator The OUT instruction allows the content of the accumulator to be copied to an output or flag Example OUT O 32 Copies accumulator state to output 32 If accumulator state is high 24 volts will be applied to output 32 LU Operands If accumulator state is low zero volts will be output applied to output 32 flag Example programming a simple binary equation This example of a program performs the binary equation O32 10 11 12 13 14 15 It may also be represented by the following diagram Io i 032 24 VDC __ Relay 2 13 4 15 m A binary equation always starts with a STH or STL instruction which will then be followed by the necessary ANH ORH XOR functions Note that the ORH instruction has priority over ANH Each ORH instruction marks the start of a new line of contacts in the above diagram The partial or final result of a binary equation is always put in the accumulator The OUT instruction enables the accumulator result to be used to modify the state of an output or flag COB 0 Start of cyclic program 0 STH 10 Copies state of input O to accumulator Accu 10 ANH 11 AND function between state of accumulator and input 1 Accu 10 11 ORH 12 OR function between state of accumulator and input 2 Accu 10 11 12 ORH 13 Accu 10
103. The choice of network depends on the application s requirements These are the available S Net network types Profi S Bus fieldbus network based at the Profibus FDL standard Ether S Bus information network based on the standard Ethernet Serial S Bus network based on serial interface RS 485 232 S Bus Modem network based on analogue or digital telephone line Profi S lO fieldbus network based on the standard Profibus DP Profibus DP fieldbus network based on the standard Profibus DP The different networks are distinguished by their services technical characteristics and their application domains Supported services Although all the communication networks support the transport of PCD data as inputs outputs flags registers etc some also support the programming control and commissioning of the PCD systems through the network using the PG5 tools PG5 WorkShop Chapter 9 Saia Networks 01 12 04 Saia Burgess Controls 9 3 9 2 2 9 2 2 1 9 2 2 2 9 2 2 3 9 2 2 4 9 2 2 5 Design features Communications speed The communications speed defines the reaction time for the transfer of data between the stations If the amount of data to be transferred is large or if the reaction time must be short then the communication speed must be high Note that if the communication speed of the network is adjustable the same speed must be used by all stations on the network Maximum distance The distance between st
104. XOB 16 Coldstart XOB 16 is a coldstart block It is processed when the PCD is powered up or when a coldstart command is received from a programming tool XOB 16 is used to initialise all sorts of information before processing the program Once XOB 16 is finished the program will process COBs in acscending number order but will never return to XOB 16 XOB 16 cannot be restarted by the user program If a particular action has to be executable both by a COB and during initialisation this action must be written in a PB or FB which can equally be called from XOB 16 or from a COB XOB 17 18 19 Request to interrupt an XOB via S Bus These three XOBs can be used as interrupt routines It is possible to start processing them via the S Bus communications bus The instruction SYSWR or Fupla function Special execute XOB can be used to start them XOB20 amp XOB 25 Interrupt input change detected XOB 20 or 25 is called when interrupt input INB1 or INB2 of the PCD2 has detected a rising edge see PCD2 hardware manual for further details XOB 30 Loss of master slave connection with RIOs The connection is tested after each message sent by the master station to the slave station If the test is negative the CPU master calls XOB 30 This occurs for example when an online station is disconnected from the network or powered off PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 7 Sequential Blocks SB 0 to 31 96
105. You will find the Fboxes to write SEND or to read RCV data packets and also support different data formats binary integer floating point Data Block etc Binary input for activation The SEND or RCV Fbox can be resized to increase or decrease the number of inputs and outputs defining the data packet to be exchanged with another station The address of the Communication Channel used by data transmission Fbox is defined by the symbol shown at the top left of the Fbox which binds it to the SASI Fbox of the same name in which the channel address is defined This symbol can be edited by putting the mouse on the Fbox and selecting the context menu s Fbox Properties Name Each SEND and RCV Fbox has a binary input for activation of the data exchange If this input is permanently high data exchange will repeated as fast as possible lf a short pulse is applied to the input data exchange will be executed at least once but it is always possible to force it using the Execute button or by a Restart Cold the PCD with nitialization option of the adjust window Master station data present at the inputs of the SEND Fbox are sent to the Slave station defined in adjust window Whereas the data present at the output of the RCV Fbox comes from the slave station defined by the parameters of the adjust window address of the slave station source element and base address Only the master stations are programmed with the SEND and RCV Fboxes The s
106. Zero Error with the exception of the instruction for loading a register with a constant LD Differences between registers and timers counters Unlike counters the instructions for loading a constant into a register incrementing a register or decrementing a register are not dependent on accumulator state The register value to be incremented or decremented may be either a positive or negative integer Example Compare the contents of two registers and switch on three outputs according to the following conditions Registers O 32 O 33 O 34 RO gt R1 High Low Low RO R1 Low High Low RO lt R1 Low Low The compare instruction does a subtraction R 0 R 1 and sets status flags according to the result Registers P EROS RAL 1 RO R1 RO lt R1 CMP RO Perform subtraction R 0 R 1 status flags will be R 1 modified according to result of subtraction ACC P OUT 032 RO gt R1 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 25 7 5 9 7 5 10 ACC Z OUT 033 RO R1 ACC N OUT O34 RO lt R1 Word instructions for floating point arithmetic These instructions are used for calculating arithmetical equations using floating point format registers and constants Each arithmetical instruction starts with the letter F to indicate that it s a floating point instruction The operands of these instructions are always registers never constants If a constant is needed it must be loaded into a re
107. ails The EPROM contains not only the PCD program but also the Hardware Settings During power up Hardware Settings will be automatically copied from the EPROM to the PCD but only if the PCD has lost that information due to power failure from a faulty or absent battery When mounting the EPROM remember to position the PCD s memory jumpers correctly PG5 Workshop Chapter 8 Additional tools 05 07 04 8 6 Saia Burgess Controls Ltd Updating firmware Firmware Downloader Sometimes the program firmware has to be updated to benefit from the latest PCD product innovations For most controllers firmware can be updated by changing the EPROM Only the most recent PCD firmware can be reloaded in flash memory using a little utility accessed with the Tool Firmware Downloader menu of the Project Manager Firmware Download x File Help SAIA s Firmware Download Utility Code segment Address 6406528 Download instructions The ADD button adds a new firmware file blk to the list Files The most recent firmware files are available in directory FW on the PG5 distribution CD Use menu File Settings to adjust communications parameters to PGU mode Only mode currently supported Select firmware to download into PCD Connect PCD8 K111 cable to PCD s PGU port Power off the PCD then power on again With PCD2 M480 press the Run Halt button twice while the Run LED is still flashing Download the firmw
108. an give us more information s about the nature the communication error Display the binary content of the register and compare it with the descriptions of the PCD manual or the communication network manual PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 15 11 7 Gateway Function The Gateway feature is commonly used to allow two different communication networks to communicate together or adapt a programming tool PG5 ora supervision system Visi to use a different network that the one usually supported 11 7 1 Application PG5 Supervision Supervision il il ul TCP IP 1 cin Gateway S Profi Sbus The Gateway function creates a bridge between two networks for example to link an Ethernet network with a Profi S Bus network In this way the PCD systems exchange data on a common bus specific to the automation field and separated from information network of the company But the PCs running the PG5 software or the supervision system Visi can exchange still data with the PCDs PG5 Supervision a Interface USB ou S Bus modem il Gateway EEE E Ether S Bus The Gateway function can be used as an interface between a communications network and the external world For example to make modem or USB communication interfaces PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 11 16 Saia Burgess Controls SA PG5 Di Sa Supervision w a i ai TCP IP USB PG5 Supe
109. arameter values for the FBox output channel Write modification to PCD H Adjust Clock daily Switch Ott Channel state On Switch Off gt 1315 lt 13 15 Channel state Ott Modification of state of FBox output channel Ch It is also possible to write all adjust window parameters by selecting the Write All button If the corrected parameters are to be saved in the Fupla program for the next Build All close the adjust window with the Save button otherwise just use the C ose button 1 This may be different depending on the options defined in the adjust window Heavac 6 and the state of the Res input during a PCD coldstart PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls Ltd 4 33 4 14 7 4 14 8 Read on line parameters Sometimes the user may wish to read and save existing adjust parameters in the controller s memory for the next Build All This operation with transfer parameters from the controller s memory to the Fupla file Save parameters in the Fupla file H Adjust Clock daily Read All wite all Objects for HM Editor gt No Switch On gt 44 00 gt 11 00 Switch Of gt 14 00 lt gt 12 08 Channel state Off Read parameters from PCD memory cose _ Switch Off gt 12 05 lt E 1 705 Channel state or It is also possible to read all adjust window parameters by pressing th
110. are with the Start button A dialogue box indicates the progress of data transfer When data transfer is complete the PCD s Run Halt and Error LEDs will start to flash The PCD is reorganizing information in its memory Please wait a further minute before powering off the controller or continuing your work 0 PCD2 M170 PCD4 M170 PCD2 M480 PG5 Workshop Chapter 8 Additional tools 05 07 04 Saia Burgess Controls Ltd 8 15 8 7 User menus The Tools menu of the SAIA Project Manager window can be extended with shortcuts to your favourite programs Tools Online Configurator Online Debug Fil Data Transfer Firmware Download This menu has been added to the Too s menu with the command Customize Menu Disassembler Word Notepad Explorer Calculator Customize Menu Add on Tools Channels Options To add a shortcut proceed as follows Delete a menu option Create a new menu option Reorganize menu options Customize Tools Menu Menu Items Notepad E splorer Calculator Access path and filename Action Command C Program Files Microsott Office SO ices 4iN WORD EXE Arguments EI Working directory Help Cancel PG5 Workshop Chapter 8 Additional tools 05 07 04 PG5 WS K8 Tools E2 2 10 03 Saia Burgess Controls Contents M Salad INCEWOEKS S2NE1 EE A A AE AE EA AE 9 1 AE R A EEN E SE EEEE E E te
111. at T E E E E AA 9 2 OVS Of TCI OI AE E E OE ES T E EEA E E E A I TE E T OA TN 9 2 1 SUP OMS SL Ve ES os e E E R E nda E E E 9 2 2 NOSSO Fe AU an E Seren Ge naseseanaxmseueaeeancdan PG5 WorkShop Chapter 9 Saia Networks 01 12 04 9 1 9 2 9 1 9 2 9 2 1 Saia Burgess Controls SA Saia Networks S Net Summary Automation solutions often consist of several decentralized PCD controllers terminals and supervision computers connected by a communications network Each station controls part of the process and exchanges data with the other stations on the network To guarantee the flexibility of such a concept the PCD system supports several types of communications network Each network has its own capabilities so the user should choose the network which is most appropriate for the application The PG5 is an effective tool for implementing these solutions e Saia Project Manager provides an overview of the stations PCDs and their configuration parameters including the network s communications parameters e The Fupla or IL editor allows the programming of the data exchange between PCD stations on the network The programming examples described in the following chapters are all installed with the PG5 and serve as basis to test and understand the functionality of the data exchange across different PCD networks You will notice that some examples are very close to full practical implementations Choice of network
112. ations can be a limitation for stations which are a long way apart The maximum distance cannot be exceeded without amplification of the electrical signals using a repeater or switch Hub Generally the maximum distance also depends on the communications speed The higher the speed the shorter the distance Reducing the communications speed can often be a solution for crossing greater distances Communications protocol The protocol is the message format used for data exchange between stations on the network We can compare the protocol to the language used when two people speak to each other they will only understand each other if they speak the same language Likewise two stations can only exchange data if they use the same protocol The protocols of some communications networks are official standards This is a great advantage when equipment from different manufacturers must communicate Field busses and sensors often use the standard Profibus DP protocol On certain communication networks like Ethernet or Profibus FDL it is possible to support data exchange using different protocols on the same physical network But in all cases the two communicating stations must use the same protocol Data exchange master slave or multi master mode A master slave network is composed of one master station and several slave stations The master station controls the exchange of data between the slave Stations A multi master network is compose
113. base address in PCD ACC H ACCU must be high LD R100 Defines the measuring channel 0 7 2 MUL R 100 K 32 Calculates R100 control byte ADD R100 including K 264 release bit R 100 SET BA 15 Triggers A D conversion BITO 9 Sends control byte R100 _ including release bit BA 0 to W3xx BITIR 12 Reads the 12 bits of the measurement 0 4095 into R 77 BA 0 R77 RES BA 15 Stop A D conversion The PCD2 W340 is a universal module It supports measurement of ranges 0 10V 0 2 5V 0 20 mA and Pt Ni 1000 temperature sensors A bridge must be selected on the module to define the measurement range Resolution is 12 bits equating to 4095 distinct measured states The routine shown above enters the channel defined in register 100 and supplies a raw measurement to register 77 For this module with a resolution of 12 bits that corresponds to a measured value between O and 4095 The user then has the task of converting the measurement into a standard physical unit PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG 7 39 7 10 2 Example for PCD2 W610 analogue output modules Outputs work in a similar way to inputs If the PCD is equipped with a PCD2 W610 module which has 4 universal analogue output channels the following routine may be used BA EQU O 96 Module base address in PCD ACC H ACCU must be high LD R100 Defines output channel 0 6 2 BITOR 2 Transfer
114. c COB HOI Conditional Run Input 4 Machine in Conditional run HI Normal Run Input L Machine in normal run HI OilPump Gutput OilPump E LC wastePump o 35 Turn on the WastePur WastePump o 35 Turn on the WastePuny a Es Global Global Pump conditional Run Input 4 Machine in Conditional run HEI Normal Fun Input 7 Machine in normal run HLI OilPump ese OilPump LC WastePump nine eT Turn on the WwastePump f Ta Global E Pump fe l i i If you have already started a list and would simply like to add a symbol just click on the last symbol press nsert and another symbol field will be opened PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 21 3 5 2 Adding several symbols to the symbol editor You can add a range of symbols to your list if you want Just enter the symbol name with the first and the last element number as shown Drainpumps1 8 O 32 Pumps in building F 8 is the number of symbols O is for output and 32 is the start address of the range you are entering Press Enter and the symbol editor will complete the list Symbol Editor FUPLA test Group Symbol Address alue Comment a L Y Drainpumps1 8 0 32 Pumps in building E Symbol Editor FUPLA test Group S ymbal Address alue Comment 4 E SO ee ee eee Th C Drainpumps 1 Output a2 Pumps in building F E C raimnpumpsz Output a3 Pumps in building F C raimpumps3 Output a4 Pumps in building
115. ce or initialization bloc XOB 16 SASI instruction contains two parameters communication channel address and address of the text with all the necessary channel parameters Text assignation parameters are different from one communication network to other same as for slave or master station If the PCD exploit more communication channels de each channel must be defined using SASI instruction and assignation text Depending of the network channel parameters can be completed with Hardware Settings 10 6 2 Assign slave channel No SASI FBox is necessary for the slave station in the Profi S Bus network All definitions necessary are already present in the Hardware Settings 10 6 3 Principles of data exchange in a multi master network A multi master communication network has more than one master station Master Stations are the only stations authorized to read or write the data of the other master and slave stations Data exchange between slaves is not allowed With a Multi master communication mode data exchange is carried out between the masters in the network Only one master at a time holds a token which authorizes it to exchange data with other master or slave stations on the network When the master has finished transferring the data the token is passed to the next master which is then free to exchange data with the other masters or slaves The token circulates automatically between the master stations the slaves never have the toke
116. ced high Otherwise the output will remain in its current state Instruction SET RES COM RES O 32 If accumulator state is high output 32 will be forced low Otherwise the output will remain in its current state LU Operands output COM 0 33 ned If accumulator state is high output 33 will be inverted high Otherwise the output will remain in its current state 4 ACCU PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 17 This example shows differences between the instructions OUT SET RES and COM Example COB 0 0 STH 10 OUT 032 STH 10 SET O 33 STH 11 RES O33 STH 10 DYN F1 COM O 34 ECOB Copy I O to O 32 Save high state to output 33 Save low state to output 33 On rising flank of 0 Invert state of output 34 Some binary instructions end with the letter H or L Instructions that end with L will invert the state of any information before performing their function Examples STH 4 Copies state of input 4 to accumulator Accumulator state is high if 24 volts are applied to input 4 STL 4 Copies accumulator Accumulator state is low if 24 volts are applied to input 4 ANH I 5 Performs a logical AND function between the accumulator state and the state of input 5 ANLI5 Performs a logical AND function between the accumulator state and the inverse state of input 5 inverse state of PG5 WorkShop Chapter 7 Programming in IL 28 09 0
117. ck and compared This option should not normally be selected because it doubles the program download time Run program after successful download Automatically puts the CPU into Run after a program download Caution this option should only be selected if the program is working correctly and there is no possible risk to people or property if it fails Go online after successful download Automatically puts the CPU online after the download Copy user program to FlashCard after download Automatically copies the program to the FlashCard Warn if a running program will be stopped Downloading a program can stop the PCD Selecting this option allows a warning message to be displayed before the PCD is stopped Do not clear Outputs on download or restart This option can be useful with HEAVAC applications It prevents ventilation or lighting from being switched off while a program is being downloaded It should not be selected with other applications Load program onto Flash card If your PCD is equipped with a Flash card the Online FlashCard menu command allows a program loaded in the PCD s RAM memory to be copied to the flash card and vice versa This can be supported automatically by selecting the appropriate download option PCD2 M170 PCD2 M480 PCD4 M170 and PCD3 PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 25 2 7 2 7 1 2 1 2 Block List view View window Information d
118. ck on the FBox to display the context menu Select menu item FBox Properties Define a symbol name for a group of parameters linked to the selected FBox FRox Properties Adjust Parameters FRox Properties Mame Daily T imer The name will be used as group for internal symbols defined by the macro Dailyimert En Ch Build the program and open the symbol editor A new System directory is now visible It contains a list of the PCD s system symbols Rebuild All With the HEAVAC library all system symbols corresponding to adjust window parameters are grouped under A HVC name where name is the FBox name Symbols re x FR 4 GROLIP K Hye EE Daily Timer 1 EJ Channel LE oNnTime Li OFFTime al System Ta Global E Daily Timer HC Now it is just a question of using these new symbols in the Fupla program 4 AYO Daily Timer ONTime eee 4 AYO Daily Timer OFF Time PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls Ltd 4 35 4 14 10 Define adjust parameter addresses Define adjust parameter symbol as described earlier and add address as follows Position mouse pointer in centre of icon press right hand mouse button select menu item Hide lock absolute address Restore Move Size Minimize 2 arme fro gt x Close Alt F4 Eo o lt E Hide lock absolute address CO Maximize
119. d down each time input 6 receives a signal These counts will be activated on the rising edge of the input signal The counter can be zeroed with a high at input 2 The initial count will be loaded with 3 Charger le Incrementer le compteur avec compteur avec p an ee l entr e 5 Lecture et affichage du LD C35 INC C35 compteur 3 LD C35 oe 0 Valeur enti re a Valeur binaire K Q est a l tat haut si le compteur contient une valeur non nulle STH C35 Solution Instruction list program Fupla program COB 0 Cyclic organization block 0 STH 11 If input 1 equals 1 LD C35 then load counter 35 3 with 3 STH 12 If input 2 equals 1 LD C35 then load the counter 0 with zero Fbox STH 15 If there is a rising edge Counter Up down with preset and clear DYN F13 at input 5 INC C35 then increment counter 35 STH 16 If there is a rising edge DYN F14 at input 6 DEC C35 then decrement the counter ECOB PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 3 5 Text and data blocks Main memory NV TEXT DB 3999 Extension memory NV 4000 PCD4 6 7999 PCD2 5999 PCD1 4999 PCD2 M480 PCD3 M 8191 Text characters strings and data blocks DBs are non volatile Text is used for messages on displays text for transmission to a pager initial strings for modems etc DBs are used for data logging tables etc Technical information Where are saved
120. d Comment Quick method 1 It is also possible to enter variables for the different information fields from the Group Symbol field This is more practical and quicker See example below Aly Enter ws _ gt LC DailyTimer Daily Timer Syntax to follow symbol_name type address comment If the new symbol has been defined using the above syntax pressing the enter key on the keyboard will automatically place information in the correct fields Quick method 2 Group Symbal Addressjvalue Comment Daily Timer o 32 Daly Timer gt Group Symbol Address Value LC Daily Timer Output Daily Timer Dail Timer New symbols can also be added from the program margin To do this edit the symbol name and definition with the following syntax below symbol_name type address comment Pressing the enter key on the keyboard with automatically place the new symbol on the Symbols list but only if the symbol definition is correct and only if the Automatically add entered type value to the Symbol Table option has been selected menu Tools Options in the IL editor PG5 WorkShop Chapter 3 Fuplal 22 09 04 Saia Burgess Controls Ltd 4 4 2 Symbols addressing modes A symbol definition does not necessarily include all the information presented below We distinguish between three types of addressing Absolute addresses Group Symbol Address value Comment Daily Timer The data is defined only with a ty
121. d Written The Definitions list shows where the symbol is defined e g where its IL EQU statement can be found The References list shows where the symbol is used in the program For blocks gt gt indicates where the block itself can be found To view the program where the symbol is used select the definition or reference and press the Goto button Filter Ctrl T Default Filter X 3 iol xi Find HMS A 2003 PCD Clock with curent time Cross reference List Definitions 1 ett ar es Daily Timer sy5 3 Print References 3 Daily Timer fbd 20 Fupla Block COB COB 3487COD Page 1 Written Daily Tirner fod 25 Fupla Block COB COB 3467COD Page 1 Daily Timer fod 30 Fupla Block COB COB_348 COD Page 1 PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 27 2 8 a Configurator Program backup The result of any PCD program modification is sometimes uncertain For example you may not be sure whether the available source files are the latest version you may be unfamiliar with the installation etc To avoid any concern this might cause the entire contents of the PCD s memory can be saved and restored if there s a problem The Online Configurator s Tools Upload All command allows the entire PCD s memory to be saved in a single file including the program hardware settings values of registers flags counters DBs and texts
122. d a Gateway Master Port should be defined then all is automatically supported by Gateway function PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 17 If the message received by the Gateway Slave Port is not for the local station the Gateway then data is re transmitted via one of the sub networks connected to the Gateway Master Port according to the address ranges defined for the sub network Example Gateway USB Profi S Bus PG5 Supervision USB PCD3 M5540 Gateway slave port Station Master B PCD2 M480 nan nd Profi S Bus address 21 Station Master A Gateway m E LLL S Bus Station Number 11 Profi S Bus address 20 mas S Bus Station Number g a MAGE Per Profi S Bus PCD3 M5540 Fij Station Slave C Profi S Bus address 22 S Bus Station Number 12 Hardware Settings of the Master A station IY Profi S Bus Master Gateway Settings defined on Profi S Bus page Channels lot Onboard Channel 10 5 Bus Stations fo to 253 S Bus Timing The USB Gateway is an exception it doesn t need any parameters for the Gateway Slave port only the Gateway Master port must be defined Don t forget to download the new configuration into Master A Online Settings of the project CPU xi ele x Name S Bus USB Ch amp Online Settings Slave station C xj S Bus USB Name S Bus USB Channel E Connection S Bus USB Name S Bus USB Set
123. d a one second pulse to output 37 with a 5 second delay for each rising edge at input 3 State diagram Corresponding program COB STH DYN LD LD STH XOR OUT ECOB 13 Integer value T 2 Binary state T 2 Integer value T 3 Binary state T 3 fi 2 i 2 s L _ I ese 037 is L 0 0 3 F3 T2 50 T3 60 T2 T3 O 37 _ _ _ _ liM PG5 WorkShop Chapter 7 Programming in IL 28 09 04 7 21 1 22 Saia Burgess Controls AG 7 5 6 Instructions for counters Integer value C 35 Binary state C 35 B Hs Time Like timers counters also have two values the integer count value and the binary state of the counter To implement counting load the counter with a positive integer value Unlike timers counters are only incremented or decremented by instructions in the user program The counter s binary state is high when the count value is greater than zero and goes low when the count value reaches zero Loading a counter Reading the state of a counter LD C 35 10 Use a binary instruction such as If accumulator state is high counter 35 will be loaded with a constant of STH C 35 ANH C 35 ORH C 35 10 Otherwise the counter will keep its current value Incrementing a counter Decrementing a counter INC C 35 DEC C 35 If accumulator state is high counter If accumulator state is high counter 35 will increment by one unit 35 will decrement by one unit Othe
124. d of several master stations and several slave stations Each master station can exchange data with other master or slave stations In both cases direct data exchange between slave stations is not allowed Application domains Some networks are designed for specific uses For example Profibus DP is a protocol oriented towards the machinery domain The protocol of this network is well standardized and a lot of compatible equipment from many suppliers allows data transfer on the same bus as used for the motor commands etc The Ether S Bus network is more oriented towards supervision systems OPC servers or can simply be used by the PG5 programming and commissioning tools Serial S Bus provides an easy way to connect PCD systems It is a very economical network supporting the same services as Ether S Bus via RS 485 but also through analogue and ISDN telephone lines S Bus Modem PG5 WorkShop Chapter 9 Saia Networks 01 12 04 9 4 Saia Burgess Controls SA Communication network S Net Services Ether S Bus Profi S Bus Serial S Bus S Bus Modem Profi S lO Profibus DP PCD Yes Yes Yes Yes No Programming Data Exchange Characteristics Max 10 and 100 Mbd 12 Mbd a 12 transmission speed Max distance without repeater or switch Hub Cable type 4 twisted pairs 1 twisted pair 1 twisted pair lei 1 twisted pair Protocol i i i i Normalized ISO Exchange mode Multi Master Multi Master Master Slave Multi Master Mas
125. de and code obtained after a build to be viewed on a single IL page Show The white lines represent the original source code with symbols and comments Hide Code The grey lines represent the code produced by the build with the addresses of operands and program line numbers f Parking lot src rh a de K 10 x Cyclical Organisation Block Cyclical program No supervision time Hogan pangas 866616 Car_incoming A car comes into the parking 860611 IjO Dynamise incoming car signal On the positiu flank of incoming sii Hbb812 F 7502 Humber_of_free_slots 4 Decrement the number of free park 860013 Car_outgoing A car leaves into the parking 860014 IjO 1 Dynamise leaving car signal On the positiu flank of outgoing sii apa5 F 7503 Humber_of_free_slots F Increment the number of free park BHG616 C 1466 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 33 7 9 2 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Go On Offline Run and Stop Online mode allows communication with the PCD to check the mode of operation Run Stop Step by step Any information needed to test the program can also be displayed Press Go On Offline button El amp Supply 24VDC Put controller into run mode with Run C Run butt ii Error At the same time note the RUN lamp located on the front of the PCD When the Run button is pressed the RUN
126. dit Search View Project Online Tools Symbols Window Help x E Groupi Symbol Address alue LC ShortTimev alue Constant 5 0 55 LC LongTimeY alue Constant 15 1 55 w L0 Tempo Timer m 5 ah System Bb Global clano Condition SIF Condition is high L ShortTime THEN Call PB ShortTime H LongTime ELSE Call PB LongTime ShortTime Tempo IF tempo is low Tempo load it with a short value ShortTime alue Output invert the output LongTime Tempo IF tempo is low Tempo load it with a long value LongTime alue ft Output invert the output PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 9 5 4 5 4 1 5 4 2 Function Blocks FB 0 to 999 Definition Function blocks are nearly the same as PBs Like PBs FBs also contain program parts that can be called from other blocks This call can be conditional or unconditional The unique difference is that FBs give you the possibility to call the block with parameters whereas with PBs you cannot FBs offer an ideal solution for developing libraries of programs that can be used for different projects thereby reducing commissioning times FBs with parameters can only be called from an IL program Function block calls can be nested within each other to a maximum of 7 levels Beyond 7 nesting levels the PCD will call an XOB 10 Example with a call to a function The following example shows an FB that makes an output blin
127. diting a Fupla function 4 5 1 FBox selector 4 5 2 Edit FBox 4 5 3 Edit stretchable FBox 4 5 4 Edit logical inversion 4 5 5 Dynamization 4 5 6 Comments 4 5 7 FBox Help 4 6 Editing links between FBoxes 4 6 6 Connect functions first solution 4 6 7 Connect functions second solution 4 5 3 Erase a line or a function 4 6 4 Rules to follow 4 7 Editing Fupla pages 4 7 1 Insert page 4 7 2 Delete a page 4 7 3 Page navigation 4 7 4 Page documentation 4 7 5 Processing of program by the PCD 4 8 Copy and paste 4 8 1 Copier coller une partie de programme 4 8 2 Copy and paste symbols 4 9 Page export and page import 4 9 1 Page export 4 9 2 Page import 4 10 Editing a first Fupla program 4 10 1 Objective 4 10 2 Method 4 10 3 Programming 4 11 Building the program 4 12 Downloading the program into the PCD 4 13 Finding and correcting errors Debug 4 13 1 Go On Offline Run Stop Step by step 4 13 2 Display symbols or addresses 4 13 3 Display symbol state with Fupla 4 13 4 Display symbol state with Watch window 4 13 5 Setting the PCD clock 4 14 Adjust windows 4 14 1 Types of adjust parameter 4 14 2 Initialization of HEAVAC FBox PG5 WorkShop Chapter 3 Fuplal 22 09 04 CON OOF BW W 4 1 4 14 3 4 14 4 4 14 5 4 14 6 4 14 7 4 14 8 4 14 9 4 14 10 4 15 4 15 6 4 15 7 4 15 8 HEAVAC FBox with adjust parameters Mini HEAVAC application Parameters after download program Writing parameters on l
128. dow There is no risk of forgetting to correct a margin in the program and creating an error that is hard to find Syntax for symbol names The first character is always a letter followed by other letters numbers or the underscore character Avoid accented characters 0 Differences of case upper or lower have no significance MotorOn and MOTORON are the same symbol Type Defines the symbol type input 1 output O register R counter C timer T text X DB Address Each symbol type has its own range of available addresses Inputs and outputs dependent on I O modules inserted in PCD Flags F 0 F 8191 Registers RO R 4095 Timers counters T C 0 T C 1599 Comment The comment is linked to the symbol and can be viewed instead of the user comment linked to each line of program code Toggle with the button View User or Auto Comment View User or STH Flag Copy the Flag state into the accu Auto Comment gt STH Flag sControl the incrementation PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 Saia Burgess Controls Ltd 4 4 1 Group Symbol Address Value Comment Ey HL DailyTimer o 32 Daily Timer ME Add new symbol to Symbols list Simple method To add a symbol to the list open the Symbols window position the mouse in the middle of the window and right click to select the context menu nsert Symbol Then fill in the fields Group Symbol Type Address Value an
129. e When the power is switched on the PLC must zero a register that serves to count pulses INB1 at a maximum frequency of 1 kHz No special program is necessary within the COBs Coldstart If INB1 is high the PLC stops the task COB it is working on and starts to process the XOB 20 that corresponds to the Editor Interrupt inputs XOB 16 Once the PLC has finished the XOB it returns to the point in the program where the event occurred COB 2 Editor Interrupt inputs PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd Example Turn on your PCD take out the battery and the error LED will light up If your program had included an XOB 2 see table the LED would not have come on and XOB 2 would have been executed instead 5 6 2 All the XOBs of the PCD family XOB Description Priority 0 Power problem in the main rack PCD6 or 4 Watchdog PCD1 2 1 Power problem in the extension rack PCD 6 2 2 Battery low 2 4 Parity error on the I O bus PCD6 1 5 No response on a module I O PCD4 6 1 7 Overload of the system due to multiple events 3 8 Instruction not valid 4 9 To many active tasks Graftec 1 10 To many PB FB levels 1 11 Watchdog COB 3 12 To many index registers used 1 13 Error flag is set 1 14 Interruption cyclic 3 15 Interruption cyclic 3 16 PCD cold start 4 17 S Bus telegram 3 18 S Bus telegram 3 19 S Bus telegram 3 20 Interrupt input INB 1 3 20 I
130. e 23 78 2883 File Logic src SENDSKIP If a comment extends to several lines it is not always necessary to start each line with a semi colon Instead the comment can be edited between two assembly instructions skip and endskip These tell the assembler to disregard all text which appears between them The View User or Auto Comment button can be used to view either the user comments attached to each line of the program or the automatic comments attached to each symbol used as an operand 3TH Flag Copy the Flag state into the accu _ gt STH Flag Control the incrementation PG5 WorkShop Chapter 7 Programming in IL 28 09 04 7 3 2 7 3 3 7 3 4 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Page format of instruction lines If the Auto Format while Typing option is selected pressing the keyboard Enter key will automatically format each line of the program on the page See menu Tools Options in the IL editor Column widths can also be configured If page formatting is not appropriate it is also possible to mark a few lines or all the lines in a file with the mouse and reformat them with menu Tools Auto Format Edit organization block IL file for a small program Start of COB zero Sequence of Supervision time deactivated instruction Example of logic equation processing within block O 32 gt End of COB zero The SAIA PCD programming language is structu
131. e 20 0 OlPumpProg jProgrambloc cont Find Ctrl F i MOBS Exception Organization Blacks apacer epee ace comers hie Print Ctrl F 3 5 14 Arranging your symbols Symbols are listed in the order you enter them This means that symbols entered at the same time will stay together even when new symbols are added later PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 30 Saia Burgess Controls Ltd 3 5 15 Rearrange in List View You can rearrange your symbols by simply changing from Group view to List view Simply click on one of the tabs in order to arrange them by Name Type Address or Comment Comment Find of Filter LC Normal Fun Set the machine in run Show WastePurnp GROUP C on Output 42 Set the pump i MRI Maele Da ee E ac meek ele Cross t 4 Exparic Comment Gollaps D acme MMP S0DE0F1F ormal Run npu et the machine in run Move Up HE Normale Input 3 Set th hine i Move Down HEJ WastePump OM Mukpuk a2 Set the pump CJ WastePump On Delay K Constant 300 Start delay Sdvanced HLI WastePump Services hours R Delay until the next maintenan L wastePump GROUP List View Group View Da Global Test symbols eee SU ENED Display with filter When you change back to Group View the old order is re established If you have a lot of symbols in your list it is sometimes convenient to display only certain types or only symbols with a certain name Symbol
132. e Read All button It is also possible to read all adjust parameters of all FBoxes in the Fupla file in PCD memory with the menu path Online Read Fbox Adjust parameter Project Online Mode Block Page Symbols Help w Go Offline Run Step by Step Stop Restart PCD Status Read FBox Adjust Parameters Write FBox Adjust Parameters Restore default parameters Even after numerous parameter modifications it is still possible to restore the default parameters These are the parameters as defined when the FBox was inserted in the Fupla page for the first time Adjust Clock daily on ae Ioj x Read All Write all Set Defaults Into Help Save Close Objects for HM Editor gt ho Switch On gt 11 00 lt E ft oo Switch Off n gt 12 00 lt gt 315 Off Channel state Recall standard FBox parameter It is also possible to restore all default adjust window parameters by selecting the Set Defaults button PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 4 34 Saia Burgess Controls Ltd 4 14 9 Define symbols for adjust parameters Sometimes it is necessary to read or write adjust window parameters from the Fupla program the communications network or the supervisory system This is possible if symbols have been defined for flags or registers corresponding to parameters displayed in the FBox adjust window To define these symbols right cli
133. e initial step and choose the Fupla editor Edit Code Select Language IL Instruction List Cancel f Function Block Diagram Fe Help PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 19 6 12 4 Prepare the symbols First we will draw up a list with all the elements we are going to use in the symbol editor Enter the elements as shown in the picture below alia Skart_3 pulses Input makes the sequence start B Three_pulses Gutout will blink three times HO Number oF pulses K Constant Constant gives the number of pulses L Pulse Counter Counter Counter counts the number of pulses LOI Pulse_Time K Constant Duration of a pulse in 100rms LC Pulse_Timer Timer Timer measures the pulse time i One 5S Timer Timer Da Global PULSE 6 12 5 Edit the program code Next load the counter PulseCounter with the constant Number_of_pulses equal to 3 Fupla program Use the FBox Graftec Load counter Remember do not take counters or timers from the other families They are designed to run in a cyclic program only File Edit View Project Online Mode Block Page Symbols Help For Help press F1 Block ST 0 IL program R SAIA IL Editor Gfdf PULSE IStep 0 m oO x ar File Edit Search View Project Online Tools aE window Help la x G 25 sf Ready Ln Col 13 A D a S te e laor a i Fg LD PulseCounter Humber of pulses PG5 Wor
134. e particular applications Gateway 10 5 3 Assign slave channel No SASI FBox is necessary for the slave station in the Profi S Bus network All definitions necessary are already present in the Hardware Settings 10 5 4 Principles of data exchange in a multi master network A multi master communication network has more than one master station Master Stations are the only stations authorized to read or write the data of the other master and slave stations Data exchange between slaves is not allowed With a Multi master communication mode data exchange is carried out between the masters in the network Only one master at a time holds a token which authorizes it to exchange data with other master or slave stations on the network When the master has finished transferring the data the token is passed to the next master which is then free to exchange data with the other masters or slaves The token circulates automatically between the master stations the slaves never have the token and so cannot read or write the data of other stations in the network PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 7 10 5 5 Data Exchange between master and slave stations PS Channel Communication channel Prof 5 Bus Waster 3 Cir Err used by Fbox ref PS8 Channel ae ref PSBChannel User controlled data exchange between stations is done using Fupla Fooxes placed on the Fupla pages chosen the Fbox Selector
135. e station SEND SRXM for reading data in the slave station RCV Each instruction contains four parameters Channel address number of data s to exchange address of the first data source and the destination PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 13 Write 8 Flags F 0 F 7 in the slave station F 200 F 207 STXM 10 Channel address 8 Number of the data s to exchange FO address of the first source data local Station F200 address of the first destination data slave Station Read a register R 25 of the slave station R 125 SRXM 10 Channel address 1 Number of the data s to exchange R25 address of the first source data local Station R125 address of the first destination data slave Station Note Only the master stations are programmed with STXM and SRXM The slave stations must only be assigned with the communication channel Waiting the transmission end de using the transition STL F 1003 Verify that TBSY is in Low state Le Assignation text defines a range of 8 diagnostic flags for communication Third flag will go in the high state during the data transmit and in low state when exchange is finished 10 6 5 Diagnostics Channel assinations In the case of the communication problem verify if the channel assignation is donne correctly Analyse the program step by step and verify that the SASI instruction doesn t display a flag error If the channel as
136. ect 6 4 2 Create a new Fupla or IL file 6 4 3 Call the SB from a COB 6 4 4 Create a new Graftec file 6 5 SB organisation 6 5 1 SB list 6 5 2 Add a SB in the list 6 6 General structure of an SB 6 7 Rules of evolution 6 8 Transitions TR 0 to 1999 6 9 Steps ST 0 to 1999 6 10 Typical sequential block structures 6 10 1 Simple sequence 6 10 2 Alternative branching OR 6 10 3 Simultaneous branching AND 6 10 4 Jump over a sequence 6 10 5 Repeata sequence 6 11 Edit a sequence 6 11 1 Toolbar Graftec 6 11 2 Edit a simple sequence 6 11 3 Edit a connection 6 11 4 Draw an alternative task OR 6 11 5 Close an alternative task 6 11 6 Edit a simultaneous Task AND 6 11 7 Close simultaneous task 6 11 8 Add a comment 6 11 9 Insert a Sequence 6 11 10 Delete a sequence 6 11 11 Copy paste a sequence 6 12 Write your first sequential block 6 12 1 Open the file 6 12 2 Draw the basic structure 6 12 3 Choice the IL or Fupla editor 6 12 4 Prepare the symbols 6 12 5 Edit the program code 6 12 6 Howto program a transition 6 12 7 Using timers in an SB 6 12 8 Repeat the step and transition for the time were the pulse is off 6 12 9 Decrement a counter 6 12 10 Alternate branching PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 O COMO ONNDD OOO TA A O OQ na na N gt O gt na nananana O MM NM DN NM gt na A ee ea ee ee A ee No oant PHBH BWW W RO NO RO NO NBO amp a aa NM NBO
137. ed in different ways Symbol entry from the keyboard The symbol name is entered in full from the keyboard for each instruction that uses it This method might allow a symbol name to be edited with a typing error which would only become evident when the program was built Symbol entry by selective searching POD Clock with current time L De Daly Timer HL ONTIME Switch on time HE OFFTIME Switch off time Ctrl Space C E gt ONTIME If only the first few characters of the symbol name are entered from the keyboard pressing the Cirl Space keys at the same time displays a window showing a list of all the symbols which start with the letters which have been typed The required symbol can then be selected either with the mouse or the keyboard arrow keys 7 4 and confirmed by pressing Enter Symbol entry by drag and drop Group Symbol Address Value ee 60000 Switch on kime Position mouse cursor on symbol press left mouse button and hold down gt ONTIME e Drag mouse cursor into Fupla margin Release mouse button This way of using a symbol excludes any possibility of typing errors In the Symbols window position the mouse cursor on the definition line of a symbol press the left mouse button and keep it down Drag the mouse cursor into the Fupla editor and release the mouse button The symbol chosen is automatically added at the place indicated by the mouse cursor PG5 WorkShop Chapter 3 Fup
138. edia Definition Media Mumber Media Name Set Defaults Cancel Help For each module in the nstalled Modules list select the module and press the Media Map button to define symbol names and media types for the module s data If necessary a base address for the first flag or register in the master station can be defined But the easiest way is to leave the Base Address field empty so that dynamic addresses are used 12 6 3 Configuring I O parameters Slot Installed Modules 0 W 45 44 Temperature 1 Elis 801 15 30V00 Edit Parameters Hame Unit Sensor type channel 0 Measurement type channel 0 Sensor tyoe channel 1 Measurement type channel 1 Parameters Sensor type channel 2 Measurement type channel 2 Sensor type channel 3 Measurement type channel 3 x Cancel Value 1710 C gt Thermo element Type J Internal cold junction comper PT 100 2 Wwire measurement PT 100 2 wire measurement PT 100 2 WIE Measurement 4 4 4 4 With some modules such as analogue measurement modules additional parameters should be defined for selecting units sensor types etc These are configured by selecting the module and pressing the Parameters button PG5 WorkShop Chapter 12 Profi S IlO 01 12 04 12 5 12 6 12 7 12 8 Configuring the network Bus Parameters x Standard Advanced Baud Fate Profile 1 5 MEd 5 Met Note Cancel Help
139. eed must be the same for all stations on the network S Bus Profile Transmission timings are grouped in three profiles S Net DP or user defined With the user defined profile you can define your own timings using the Bus Parameter button The profile must be identical for all network stations The S Net Profile is necessary when using RIO PCD3 T76x in the network 10 4 4 Download Hardware Settings in the CPU 10 5 Online Settings Master station 4 X Cancel S Bus USB CPU Number jo S Bus Stations 254 uto Iv PGU Number of retries 3 With the new systems PCD2 M480 and PCD3 the Hardware Settings can be downloaded via a USB connection It is necessary just to define Online Settings with the channel Profi S Bus PGU Download the parameters to the PCD using Download button on the Hardware Settings window Fupla Program 10 5 1 Assign the channel using SASI Fbox a E p ME Fbox properties bind SEND fotl 2 GUs aster Pot 2 GUS aster Clr Err Clr Err and RCV Fboxes to the ref Channel ref Hetwork 1 channel definition END amp ENO ref Channel ret Metwork 1 END END Assignment is done using a SASI Fbox placed at the beginning of the Fupla File Each communication network needs its own SASI Fbox because the parameters are different depending on the network the same for Master or Slave stations If the PCD uses more communication channels define each channel using corresponding SASI Fbox Then p
140. eeeeessessaeeeeeeesenes 5 Wo TO TF 00 asec psi tga ev aces esate ergo ne Dance ean nd ple eG Gate O 5 10 5 1 Assign the channel using SASI FbOX sseseeseeessesessesssssssssreesssssssssreesssssesseeesssssssreressssssssrens a 1032 Asri Masterin ensin O E uct danwomunestawiebenenoceduatunses 6 Oan Asen slaye Chinnes E aaa Ned e dealer nnaenadantes 6 10 5 4 Principles of data exchange in a multi master NCtWOTK eceeceesssseeceeceeseesseeeeeeeeseessaeees 6 10 5 5 Data Exchange between master and slave Stations ccccccessscccccecessessneeeeeceeseessneeeeeeeeeseees 7 Oae D OS A EE E E R 8 IOO ALLO TO E A EA E A E E E E NEE AE ll 10 6 1 Assign master channel using SASI instruction seeseesssssesseeessssseseresessssseseeesssssssresssssssse 11 10 602 Assign slave channel esscr ennas ccstecenPetsempinatwcnaesvoncucneacactucede santo senauoseennaceninuenoes 11 10 6 3 Principles of data exchange in a multi master netwotK ssesoseessssessereesssssesreresssssssrees 11 10 6 4 Data exchange between master and slave stations soensssosssssseseesssssssresessssseseeesssssssrese 12 Woo MAAS arated ects seven ata tec ct E neat muneam tau otaneees 13 TOL GATEWAY FUNGI ae E E E E 15 O AP O i E E E E E EO ET AEA anata 15 10 7 2 Configuration of the Gateway PGU function cccccesscecceeceesesnseeeeceeeessesneeeeeeesenseenaaes 16 10 7 3 Configuration of the Gateway Slave port supplementary slave c cccccccss
141. een the different functions The colour of these links defines the type of data purple for binary Boolean information blue for integers and yellow for floating point numbers Data which is different in type or colour cannot be linked together without first being converted to a common type FBox Standard Converter If the program uses several pages the Page Navigator window allows pages to be deleted and helps you move around the program structure quickly PG5 WorkShop Chapter 3 Fuplal 22 09 04 4 5 4 6 Saia Burgess Controls Ltd 4 4 Editing Symbols Show Hide Symbols Editor a EL Hms R PCD Clock HC Daily Timer Output 2 Daily Timer EL ONTIME R 60000 Switch on time HLI OFFTIME R 19000 Switch off time a System Da Global Daily Timer The Symbols window contains a list of all symbols used in a program It can be viewed with the Show Hide Symbol Editor button or via the menu command View Symbol Editor Each line defines all the informations relative to an input output register and constitutes a symbol Symbol A symbol is a name that indicates the address of an input output flag register It is advisable to use symbol names when editing a program rather than the direct address of a flag or register This allows correction of an address or data type from the Symbols window Instead of having to copy the correction to each margin of the program it is only necessary to correct it in the Symbols win
142. eesssesessesneaeeeeeeeeeeeeseeeseseeseessegensgaas 2 L22 Onera Ona nane EEEE EEEE eRe ee ner eee error eee 2 Lo TOP OT a AE a E E E AA 3 12 4 Defining stations on the netwoTK asssosooooeeeeeennenesssssssssssssserorerereesesssssssssssoeserereressesessssssssesssssss 3 PZ COn oine TS maS er Sai Ol eina Ta sed E A EO EA 4 12 6 Configuring slave STATIONS ccccccsececccccceeceeceeeeeeeeeeeeeeeneneaeeeeeeeeeeeeeeeeeeeseesesaaaeaeeeeeeeeeeeeeeeeseeseeeeees 4 12 6 1 Configuring Input Output Modules ec cccesccecececesssssseeeeeceessesesseeeceecesseessaeeeeeeeeeseessaaees 4 12 6 2 Configuring symbol names for remote data cc cccesscccceceessessnececeeecesseseseeceeeeeeseeessnaees 5 2 63 Coniaoirineg VO Para mic ers ecciesie a E E a a 5 l2 Coni eine THC NAWO R iii E T a N E 6 12 8 Using network symbols in Fupla or IL ProQrams iccccccccccccccccccccccccceccesescesessusseceeeeeeeeeeeseeseeesessesnaaas 6 T PICT yO IO aa TEE EE AENEA NENEA AEE 7 PG5 WorkShop Chapter 12 Profi S IO 01 12 04 12 2 12 12 1 12 2 Saia Burgess Controls SA Profi S lO This example shows how remote binary and analog inputs and outputs from the PCD3 T7xx RIO are used Profi S IO network example Memory image SIO Master Temperatureo 4 R Alarm0 7 F RemoteOutputo 7 F PCD3 M5540 SIO Master 1 Profi S lO Remote IO PCD3 T760 SIO Slave 3 Remote IO PCD3 T760 SIO Slave 2 PCD3 A400 8 bina
143. efaults Last Volatile Flag 3000 volatile and are set to zero at start up Dynamic Space Double mouse click First Last Address Address Used Free Volatile Flags 2500 2000 jo Eo Nontolatile Flags 7500 e J1 2 690 PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 3 2 Saia Burgess Controls Ltd Registers 32 bit value Integer 2 147 483 648 to 2 147 483 647 Floating point 9 22337E 18 to 9 22337E 18 R NV non volatile 0 4095 16383 PCD2 M480 PCD3 M A register can contain floating point or integer values Registers are extremely useful for arithmetic operations or operations with analogue values such as measurement and regulation tasks Up to 4096 registers are available All registers are non volatile In Fupla the lines connected to a register have different colours depending on content yellow lines for a floating point value and green lines for an integer value An integer value cannot interact with a floating point value For example they cannot be added together One of the values must be converted into the format of the other value and then added How to use registers in your program The following example adds the number 113 to the content of register 12 and puts the result into register 54 R 54 R 12 113 Instruction list program Fupla program COB 0 0 ADD R12 K 113 Fbox Integer ADD R 54 Setup registers Dynamic resource allocation is a powerful feature introduced t
144. er All the necessary FBoxes can be found in the Standard group of the FBox Selector window Time related Read time Integer Is greater or equal to Binary Xor PG5 WorkShop Chapter 3 Fuplal 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 4 23 4 24 4 11 Build All Saia Burgess Controls Ltd Building the program Before the fully edited program can be read and executed by the PCD it must be built or converted using the CPU Build menu command or the Build button The Message window shows the results of various stages of the program build Compiling Assembling Linking etc If the program has been correctly edited the build function concludes with the message Build successful Total errors 0 Total warnings 0 Messages x Extension memor size 0 bytes Global symbols 34 Linkage complete 0 errors 0 warnings Generating Block Information files Block Information Files complete Build successful Total eros 0 Total warnings 0 Any errors that arise are indicated with a red message By double clicking the mouse button the error can easily be located in the user program Double click mouse button on error message Messages Compiling Files Compiling d SPG5 Proects Chapterd Chapter yD aly Timer fup S FUP Error 60 Daily Timer fup Page 1 1 27 1 Bad label Error Compile tailed d PG5 Projects Chapter4 Chapterd D ally Timer fup Build Failed
145. ery PCD2 M170 O 24 VDC O Battery O WD O RUN O HALT O ERROR i 230 VAC Si PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd 1 5 1 2 3 PCD equipment 1 Insert the 3 0 V lithium battery supplied 2 Plug aPCD2 E110 module into socket 1 addresses 0 to 15 3 Push the module towards the middle of the device until the end stop and engage latch This provides 8 digital inputs for 24 VDC with addresses 10 to I7 Only inputs 10 to 14 will be used 4 Plug a PCD2 A400 module into socket 3 addresses 32 to 47 as previouslydescribed This provides 8 digital outputs O32 to O39 for 24 VDC 0 5 A Only output O32 will be used 1 2 4 Wiring 1 Connect the 24 VDC supply to screw terminals 20 and 23 The following supply voltages are allowed 24 VDC 20 smoothed or 19 VAC 15 full wave rectified 2 The four inputs used are connected according to the hardware description of the PCD2 E110 module Connect the 4 push button switches to terminals O to 3 Terminals 8 and 9 are connected to the power supply negative 3 floor 2 floor 1 floor Ground floor 24 VDC Module base address 0 for this example 3 Connect terminal 0 to the relay coil terminal 8 to the 24 VDC supply positive and terminal 9 to the supply negative 3 floor 2 floor 1 floor Ground floor 24 VDC a eal oritatatatstelr sta aolarlazlaslaslaslasla7 AAA TAASAHASIANA N ti
146. ery time the Store signal is received the analogue value is read and then written to DB 4010 H SAIA Fupla Editor modem1 Test_DB fup E 2 1B iol x Fie Edit view Project Online Mode Block Page Symbols Help See ane TCC oe resell DB Ful Size of DB Ey Add Edit Data Block DB 4010 V Definition x Address Value ca Sire I a BL_3DDDEE45 COB C tS Zg Glob Test DE Ready Block COB BL_3DDDEE Double mouse click Fboxes Analogue module PCD2 W2 Data blocks DB Logger Example sending an SMS in Fupla The following shows how to send an SMS message using the binary state of a digital input or flag The message is defined in text 10 Note the black triangles in the lower left hand corners of the FBoxes in this example They indicate that these functions have an adjust window with parameters for the destination pager or modem number The adjust windows can be viewed by double clicking the mouse pointer in the centre of the FBox B SAIA Fupla Editor modem1 Test_SMS fup File Edit view Project Online Mode Block Page Symbols Help a aay ss _i cn E J e Double clicking on the FBox displays the adjust B parameters S ot bx Edit Text Text 10 Address Value COB IV Definition Text Size Character Set _ Default ANSI A C DEM Fixed characters C GSM Pomen m Symbols Double mou
147. escribed below First time Initialisation Data This option authorizes the initialisation of certain Datas during a program build Datas initialised by the program download are defined as follows symbol type address initialisation_value Group Symbol Address Value Ee EL Symbol 10 314 First time initialisation value 314 LC Symboli 11 Datas not initialised with the program download can be initialised at every coldstart by code in XOB16 PG5 WorkShop Chapter 2 Project management 05 07 04 2 24 2 6 1 2 6 2 Saia Burgess Controls Ltd Download options Download options can be defined with the Tools Options menu command or the Options button on the Download Program dialog box They allow the program download procedure to be personalized Download Options x Download General W Download program only if changed I Warn if a running program will be stopped T Do not clear Outputs on download or restart Downoad in Run Verify all PCD memory writes Aun program after successful download l Go online after successful download Copy user program to FlashCard after download Download program only if changed These define the default settings for the Download Program dialog box see previous page Changed Blocks and Download in Run These define the default settings for the Download Program dialog box see previous page Verify all PCD memory writes All View written to the PCD will be read ba
148. ess Controls Ltd 4 2 Preparation of a Fupla project For the preparation of an example it is advisable to create a new project to contain the files for editing the Fupla program 4 2 1 Create new project In the SAIA Project Manager window select the menu command File New Project and create a new project G SAIA Project Manager File Edit View CPU Online Tools Help Mew Open Mew Project Open Project Close Project Backup Restore Print Prink Setup Properties 1 Chapter 6 5pj 2 DAPGS Projectsaaaiaaa 5 Exit j New Project Ctrl Project Hame Chapter4 Project Directory D PGS Projects gt Description Learn to draw programe with Fupla IY Create CPU Help Cancel x To create a new program file in this project click on the New File button or use the right mouse button New File PG5 WorkShop Chapter 3 Fupla 22 09 04 Settings Program Files Listing Files Documentation File Add Files Paste tobi Delete All Files Print Cuan EE File Hame x Daily Timer Directory DAPGS Projects Chapterd Chapter File Type Instruction List File src Grattec File sfc RIO Network File ra FS Network File pre DP Network File do LON Network File lori Description W Linked W Open the file now Help Cancel PG5 WS K4 FUPLA E2 16 05 03
149. etwork Example Gateway USB Ether S Bus _ PG5 uh Supervision USB PCD3 M5540 T ile Station Master B Station Master A Gateway slave port IP Node 2 conver lla IP address 192 168 12 129 IP address 192 168 12 128 Gateway zi E AN T S Bus Station Number 10 a aa Gateway Master port Ether S bus PCD3 M5540 LLL Station Slave C IP Node 2 IP address 192 168 12 130 S Bus Station Number 12 Hardware Settings of the Master A station I TCPVIP S Bus Master Gateway Settings defined on TCP IP page ChannelSlot Sct B2 Channel 8 S Bus Stations fo to 253 S Bus Timing The USB Gateway is an exception it doesn t need any parameters for the Gateway Slave port only the Gateway Master port must be defined Don t forget to download the new configuration into Master A Online Settings of the project CPU x ele x Name S Bus USB Ch amp Online Settings Slave station C xj S Bus USB Name S Bus USB Channel E Connection S Bus USB Name s B us USB Setup CPU Number fo Cancel Connection S Bus USB S Bus Station fi 0 L CPU Number b eee Number of retries 3 se S Bus Station 1 CPU Number 0 Help Number of retries S Bus Station j2 Auto PGU Number of retries 3 To make a USB communication with each PCD the Online Settings should be configured with USB channel and S Bus station number PG5 WorkShop Chapter 11
150. even possible to modify the name and value of each symbol Marking the symbols and putting them in a group is the fastest way to change the names of all symbols in an imported program The context menu nsert Pre group allows the symbols selected to be put in a group with the name of your choice Marking all the symbols and renumbering them is also a fast way of changing the addresses of symbols in imported pages The context menu item Renumber allows the addresses of selected symbols to be changed either using an address offset or from a base address The FBox List displays lists of symbols linked to a group of FBoxes These symbols give access to internal FBox information such as the addresses of adjust window parameters This list allows modification of names that are attached to FBoxes from imported pages PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 4 20 Saia Burgess Controls Ltd Returning to our little example we propose importing symbols from the daily timer component into a Heating group For each new daily timer define a different group name In this way component symbols that are used more than once will belong to different groups and will not give rise to any addressing problems when the program is built Page Import S Page Properties System Symbols Global Symbols Local Symbols JOFFTIME ME Switch off time T ONTIME B 60000 Switch on time Piau T inver a Ren
151. f programming experience Fupla editor fup Allows programs to be drawn in the form of function plans and contact diagrams Requires no programming experience Many libraries are available for the rapid implementation of HEAVAC applications and communications networks modem Lon Belimo EIB etc Graftec editor sfc This is a tool for structuring programs in IL instruction list and Fupla Particularly suitable for sequential applications with waits for internal or external events It is the ideal tool for programming machines with beadepeed and commands for motors actuators etc Next mouvement HMI editor i E Ply F Allows configuration of dialogue with PCD7 D1xx et PCD7 D2xx terminals installed in addition to PG5 BES unl el S Net editor dp lon rio itOM OMen Supports configuration of communications networks lil pate Profibus DP LON and SRIO oh TE Mee a HS Master kea PAP E Fo PTEE RE a ET PA a iiis o mm e ij m 4 woe eee SS a PCO Slave 7 PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 19 2 3 10 Files linked 2 3 11 Program Files Libraries Fup Right click on the fileand i A Floor 1 fup select Linked on the Jf 3 Ground Floor Fup context menu Files represented by this icon with an arrow are linked together to form the program and are downloaded i
152. f the division is placed in R5 R5 is then copied to R6 and R6 is then converted to an integer value How to use constants in your program Instruction list program Fupla program COB 0 Cyclic organization 0 block LD R4 load 100 into R4 100 COPY R4 convert the integer value R35 from integer to IFP R35 floating point 0 LD R36 Load0 25into36 POX nteger Move 2 5e 1 Converter Int to float FDIV R35 __ divide the value by a A Converter Float to Int 0 25 R 36 R5 and place the result in R5 COPY R5 convert the result back to R6 integer FPI R6 0 PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 3 4 Timers and counters 31 bit value 0 2 147 483 648 T C Vivolatile NV non volatile 0 31 1599 Timers and counters can have values between 0 and 2 147 483 648 31 bits and they share the same address range O to 1599 Usually addresses 0 to 31 are dedicated to the timers and addresses 32 to 1599 are dedicated to the counters The user can of course configure personal settings Timers have a default time base of 100 ms i e the system decrements each timer by one every 100 ms The timebase can be changed in the Software Settings where timer counter addresses can also be configured Timers are volatile counters are not Timers and counters can only contain positive values Their value can be changed by loading a new value with the LD ins
153. format 8 4 Online configurator 8 5 EPROM programming 8 6 Updating firmware Firmware Downloader 8 7 User menus PG5 Workshop Chapter 8 Additional tools 05 07 04 OM ONDOAATAHR HR HBR A WO O 8 1 PG5 Workshop Chapter 8 Additional tools 05 07 04 Saia Burgess Controls Ltd Saia Burgess Controls Ltd 8 Additional tools 8 1 Introduction The PG5 provides you with several additional utilities for a variety of services PG5 Workshop Chapter 8 Additional tools 05 07 04 8 3 8 2 8 2 1 8 2 2 8 2 3 ZA F Quick Data Upload Saia Burgess Controls Ltd Data transfer utility Using data transfer This tool is used to save PCD data states values in an ASCII file dt5 or to restore them from the file into PCD memory The following data is transferred with this tool inputs outputs flags timers counters registers data and text blocks Caution The PCD program and hardware configurations are not saved by the Data Transfer utility To save the program hardware configurations and data it is advisable to back up the program See description of Project Manager Start up Data Transfer Start up the program with menu Start gt Programs gt SAIA PG5 V 1 3 gt Data Transfer 5 Project Manager a Boon Programs Online Configurator a Firmware downloader FR Online Debugger Save data with Quick Data Upload Quick Data Upload xX Start End Units Glos 0 4095 Decimal
154. fy that the PCD is equipped with the necessary communication hardware e Verify that the stations are connected to the network and are powered on e Verify the network wiring e Verify that the firmware version supports Ether S Bus PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 11 14 Saia Burgess Controls SA Data s are not exchanged in the network Assignation Text defines a range with 8 diagnostic flags for the communication Fifth Flag TDIA Transmitter diagnostic will go in the high state during the data transmit error Step by step test of the communication program allows determining the instructions STXM and SRXM in error Attention if the communication error occurs then the diagnostic flag TDIA stays in high state until the diagnostic register will not be reset to zero Possible corrective actions in the master station Verify the parameters of the instructions STXM and SRXM in error Verify that the slave address is present in the network Possible corrective actions in the slave station For every instruction STXM and SRXM in error read the slave station number and verify concerned stations e Verify if the Hardware Settings are defined correctly e Verify if the PCD is equipped with necessary communication hardware e Verify if the stations are connected to the network and are powered on e Verify the network wiring e Verify if the firmware version supports Ether S Bus Diagnostic register Diagnostic register c
155. g on the logical state of input Condition Fupla program xi _Group Symbol Type Adddress Value Comment aS H BL_sDEDFF47 COB HE waitTime R Selected Wait time for the blinker condition input Rt Select the blink output speed a ShortTime PB Define the short time in the register WaitTime FC LongTime PB Define the long time in the register WaitTime HE output Output 32 LC ShortTime alue Constant 5 0 55 LC LongTime alue Constant 15 1 55 Grong eS ee SATA Fupla Editor PB Clignofup adalat O O SAIA Fupla Editor PB Cligno fup WI File Edit Yiew Project Online Mode Block Page Symbols Help gt 4 a eet e AM phortTimeValue a f PB LongTime A 8 SAIA Fupla Editor PB Cligno fup v l pLongTimevaue E a Wattime bt E Re zi If the logical state of digital input Condition is low the PCD will call PB ShortTime and transfer a constant ShortTimeValue of 5 to register WaitTime If not the PCD will call PB LongTime and transfer a constant Long TimeValue of 15 to register WaitTime The WaitTime register defines the length of the pause between two changes of blinker state Blink To ensure initialization of the WaitTime register during a cold start the blinker must be positioned after both PB calls PG5 WorkShop Chapter 5 Structures 05 07 04 5 8 Saia Burgess Controls Ltd IL program GP sala IL Editor PB IL cligno src pr File E
156. ght the symbol in the editor Press the nsert key to enter the symbol incrementing it by one This can be helpful if you have a string of inputs or outputs and need to change their physical address location in the software You only have to change the first one and all the others will follow Symbol Editor FUPLA test Group Symbol Address alue C ee ee ee EL DrainPurnps1 Pumps in building F LC DrainPumps2 DramPurnps1 1 Pumps in building F HLI DrainPumpsd DrainPumps 2 Pumps in building F HL DrainPumps4 DrainPumps 3 Pumps in building F LI DrainPumps5 DrainPumps1 4 Pumps in building F DrainPumps6 DrainPumps1 5 Pumps in building F LI LI DrainPumps DrainPumps1 6 Pumps in building F LI DramnPumps6 DramPumps r Pumps in building F Tal Global Hewsedit PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 23 3 5 4 3 5 5 3 5 6 Importing symbols from EQUATE statements If you have old PG4 3 Instruction List files containing EQU or DOC statements then simply mark the statements and import the corresponding symbols with menu path Tools Move EQUs and Docs to Symbol Table The symbols are then moved from the program file into the symbol list P SAIA IL Editor Big 56 cligo src Syntax Check uto Format short long tempo Options Programme clignoteur 2 pitesses E O Ln 3 Col 1 INS OFFLINE a Importing symbols from another ap
157. gister and then the register can be used in the floating point instruction Addition Subtraction Square root FADD RO FSUB RO FSQR R 100 R 1 R 1 R 101 result R 3 R3 RO0 R1 R 3 R3 RO R1 FMUL RO FDIV RO FCMP RO R 1 R 1 R 1 R 3 R3 RO0 R1 R 3 R3 RO R1 Arc tangent FSIN R10 FCOS R10 FATAN R10 R 11 result R 11 result R 11 result Exponent Natural logarithm Absolute value FEXP R20 FLN R20 FABS R30 R 21 result R 21 result R 31 result Status flags All the above instructions modify the status flags with the exception of the LD instruction for loading a floating point format constant Initialize a register LD RO 3 1415E0 RO Pl Conversion of integer and floating point registers The PCD has separate instructions for arithmetical operations on integers and floating point numbers If an application program has to add or multiply two registers one containing an integer and the other a floating point number it is necessary to convert the registers either to integer or floating point before performing the arithmetical operation Convert integer fltg point Convert fltg point integer IFP RO integer gt float FPI R 0 float gt integer 0O exponent QO exponent PG5 WorkShop Chapter 7 Programming in IL 28 09 04 7 26 Saia Burgess Controls AG 7 5 11 Index register Each COB has a rather special register the index register The content of the index register can be checked wit
158. h SASI Fbox corresponding to the channel According to the network the communication channel parameters can be partially defined from the Adjust Window of the SASI Fbox and to be completed in the Hardware Settings The Channel number is always defined in the Adjust Window of the SASI FBox The channel number depends from PCD Hardware and on the communication hardware used slot B1 B2 serial interface PCD7 F PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 11 6 11 5 2 11 5 3 11 5 4 Saia Burgess Controls SA Assign Master channel EF Communication s SASI S Bus Master IP SASI 5 Bus Slave IP SASI 5 Bus IP Extended IP Channel IP Channel S Bus Master IP Clr Err Master station Master Slave station timing definitions The assignment of the Master channel is done by combining the Hardware Settings with one of the Fboxes above Adjust window parameters Channel Defines the channel number connected in the network Depends from the PCD and his hardware Timing The Timeout is general defined with the value by default 0 and will be adjusted only for the particular applications Gateway Assign slave channel No SASI FBox is necessary for the slave station in the Ether S Bus network All definitions necessary are already present in the Hardware Settings Principles of data exchange in a multi master network A multi master communication network has more than one master station Master Station
159. h the following instructions SEI K 10 SEt Index register Loads the index register with a constant of 10 INI K 99 INcrement Index register Increments the index register and sets accu State high as long as Index register lt K 99 DEI K 5 DEcrement Index register Decrements the index register and sets accu State high as long as Index register gt K 5 STI RO STore Index register Copies index register to register 0 RSI RO ReStore Index register Copies register 0 to index register Many PCD instructions support the use of the index register This register allows indirect addressing of registers flags inputs outputs timers etc used by instructions in the program These instructions are the same as those normally used but have an additional letter X Example Registers are non volatile memory This means they keep their information when the power supply is cut or if there is a cold start If we wish to make a range of 100 registers volatile we would have to initialise these 100 registers with a value of zero during a cold start To Initialise a register with zero we can use the following instruction LD R 10 K 0 If we have 100 registers R 10 to 109 to initialise we would have to write this instruction 100 times changing the register address each time That would be rather tedious to do Another solution would be to initialise the index register with an index of zero and implement a program loop to load the first
160. hange still data with the PCDs PG5 Supervision i Interface USB ou S Bus modem Profi S Bus The Gateway function can be used as an interface between a communications network and the external world For example to make modem or USB communication interfaces i i i Gateway B PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 16 Saia Burgess Controls SA PG5 PG5 Supervision Supervision Supervision o o m m Te as a2 TCP IP ji tf i 1 Gateway OK i l 2 parallel Gateways ee the OK Profi S Bus 2 cascaded Gateways not OK S Bus To respect the communication timings we cannot define two cascaded Gateways functions But it is possible to define two parallel Gateways on the same network PG5 Supervision iu Gateway slave port saat tee ke D T D 1g J ger CEE EEE LEE LEE CEE S Bus Profi S Bus TCP IP If necessary a Gateway can make a bridge between to several communication sub networks 10 7 2 Configuration of the Gateway PGU function Definitions Gateway slave port Hardware Settings Master station A PLD Memory Password S Bus Serial Modem Profi S Bus TCRAIFR Gateway Serial S Bus Master Gateway Definitions Gateway Master port It is easy to configure the Gateway function it doesn t need any program only some parameters in the PCD Hardware Settings Generally only a Gateway Slave Port an
161. he channel when the PCD is powered up PG5 WorkShop Chapter 3 Fupla 22 09 04 Saia Burgess Controls Ltd Contents 5 Program structures 5 1 Introduction 5 2 Cyclic Organization Block COB 0 to 15 5 2 1 Definition 9 2 2 Example 5 2 3 Add a structure 5 2 4 Supervision time 53 Program Blocks PB 0 to 299 5 3 1 Definition D 3 2 Example 5 4 Function Blocks FB 0 to 999 5 4 1 Definition 5 4 2 Example with a call to a function 5 5 View Structure 5 6 Exception Block XOB 5 6 1 Definition 5 6 2 All the XOBs of the PCD family 5 6 3 Use of XOBs 5 6 4 History Table 5 6 5 Description of XOBs 5 7 Sequential Blocks SB 0 to 31 5 8 Tableau r capitulatif PG5 WorkShop Chapter 5 Structures 05 07 04 O ONN NOAA H FW O O O _ Nanananana N OUN N 5 1 PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd Saia Burgess Controls Ltd 5 Program structures 5 1 Introduction The success of a good program lies in its structure It simplifies the program and makes it quick to maintain and develop The SAIA PCD programming language is a structured language which uses different organisation blocks to hold the application s instructions Each block type provides different services for the user These organisation blocks are available cyclic organisation blocks COB function blocks FB program blocks PB exception organisation blocks XOBs and sequential
162. he keyboard for each instruction that uses it This method might allow a symbol name to be edited with a typing error which would only become evident when the program was built Symbol entry by selective searching Group Symbol Address Comment T e er LL Car incoming Input Gets high when a EL Car_oukgoing Input i Gets high when a O Red fight Gutpuk 32 Stops new cars 2 O Number of Free_slots Counter Counts the mur HC Dynamise_incoming_car_ sional F Flag detects the LC Dvnamise leaving car_ cho a Set detects the Ctrl Space C eTe See signal F Flag di sth Dyn gt DYH Dynamise leaving car signal If only the first few characters of the symbol name are entered from the keyboard pressing the Ctrl Space keys at the same time displays a window showing a list of all the symbols which start with the letters which have been typed The required symbol can then be selected either with the mouse or the keyboard arow keys 1 4 and confirmed by pressing Enter Symbol entry by drag and drop Position mouse cursor on symbol press left mouse button and hold down E gt lt i Type dressy Comment ag detect gt sth DynamiseCar_Leaving Release mouse button This way of using a symbol excludes any possibility of typing errors In the Symbols window position the mouse cursor on the definition line of a symbol press the left mouse button and keep it down Drag the mouse curso
163. he user program by double clicking on the error message Messages x Extension memor size 0 bytes Global symbols 34 Linkage complete 0 errors 0 warnings Generating Block Information files Block Information Files complete Build successful Total eros 0 Total warnings 0 Downloading the program into the PCD Download The user program is now ready All that remains is to download it from the PC into the PCD This is done using Project Manager s Download Program toolbar button or the Online Download Program menu command B4 Download Program If any communications problems arise check the configuration settings Settings Online and Settings Hardware and the PCD8 K111 cable connection between the PC and the PCD PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd 1 5 Finding and correcting errors Debugging The first version of a program is not always perfect A stringent test is always needed Program testing is done using the same editor that was used to write the program 1 Press the Go On Offline button El z oer 24VDC 2 Start program with the Run button s fe Observe the RUN LED on the PCD at the same time When the Run button is pressed the RUN LED on the PCD should turn on because the PCD is now executing the user program When the Stop button is pressed 6l RUN LED on the PCD should turn off because the PCD has stopped executing the program When the editor i
164. hese manuals e Profibus DP 26 765 e Profi S IO in preparation e Example Profi S lO project installed with your PG5 PG5 WorkShop Chapter 12 Profi S IlO 01 12 04 Technical data and ordering information Technical data Operating system Windows 95 B Windows 98 second edition Windows NT 4 0 SP5 Windows 2000 Windows XP TCP IP must be installed TAPI 2 0 must be installed IBM compatible PC Pentium 150 or better 32 MB RAM or more 30 MB free hard disk CD ROM drive PCD instruction set All 150 PCD instructions are supported Standard FBoxes The PG5 has over 250 standard Fboxes Modem Basic modem configuration and communication are implemented in the PG5 Libraries with more extensive modem functions such as SMS and Pagers are also available Programming languages Instruction List IL FUPLA FBD and GRAFTEC SFC CPUs supported All SAIA PCD models are supported excluding the xx7 Series Compatibility PG3 and PG4 programs can still be used with PG5 Communication TCP IP SATA S Bus PROFIBUS DP PROFIBUS FMS and LONWoRKs communication are present in PGS Ordering information Type Description PCD8 P59000 M9 Complete PG5 package The package contains a licence diskette documentation and the program on CD ROM PCD8 P59000M1 PG5 demo package The package contains the full version of PG5 but the printing of program files has been disabled and processing restricted to programs no greater than 2000 lines in size
165. ical organisation block COB At the entrance the sensor Car_incoming delivers a pulse each time a new vehicle enters The rising edge of this signal must be detected to decrement the free space counter At the exit a second sensor Car_outgoing delivers a pulse each time a vehicle exits The rising edge of this signal must be detected to increment the free space counter If the parking lot is full the counter s integer value will indicate zero available spaces The counter s logic state informs us of this situation when it is low The red lamp at the entrance to the parking lot must therefore be illuminated PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 7 30 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Address Comment I LEI Car incoming Input Gets high when a car comes into the parking Le Car outgoing Input i Gets high when a car leaves the parking LL Red light utpuk a2 Shops new cars at the entry LE Number of Free slots Counter Counts the number of Free parking slots LI Dynamise_incoming_car_signal F Flag detects the rising edge of the car incoming L Dynamise_leaving_car_signal F Flag detects the rising edge on the car leaving s A System Da Global Parking lat XOB 16 Program executed at start up ACC H LD Number_of_free_slots Initialize the free slots counter 8 with the value 8 unconditionally EXOB End of start
166. ick Start Fup Quick start with SAIA PCD and Fupla Chapter 3 Hardware resources Chapter 3 Hardware resources Chapter 3 Hardware re How to use inputs output and PCD clock Chapter 3 Software resources Chapter 3 Software resources Chapter 3 Software res How to use flags timers counters registers constans texts and DB Chapter 4 Fupla examples Chapter 4 5x gt T Search Subdirectories Fupla examples Chapter 4 Fupla examples 5p How to program with fupla editor Chapter 5 Program structures Chapter 5 Program structures Chapter 5 Program struct Howto use PB FB OB Chapter 6 Graftec Graftec Chapter 6 Graftec 5pj How to use Graftec editor Chapter 7 Rap Instruction List programmingChapter 7 Instru How to use Il editor Creating a new project To create a new project use menu command File New Project define the name of the new project in the Project Name field select the Create CPU option and confirm with the OK button File Edit View CPU Mew G New Project Open Name of new project Project Hame Mew Project Open Project New Project Marne tela i P lose Project Project Directory Backup A PG5 Projects gt Restore D ti escriptian rr sa Brief description of contents Print My comment Print Setup Properties M Create CPU Help Cancel PG5 WorkShop Chapter 2 Pr
167. ild all or Build 1 Compile Instruction list programs Object and listing files 3 Link PCD file ee 4 CPU Create Doc umentation command Download program PCD controller as AA Wal gt Printer fm il TT 1 Compilation converts graphical files into instruction list files fod src hsr 2 Assembly produces binary object files obj and an assembly report Ist which can be printed or used for troubleshooting certain assembler errors 3 Linking combines object files obj to form a single executable file pcd for downloading into the controller 4 Documentation can be generated with the Project Manager s CPU Create Documentation menu command The result will be available in the Documentation Files folder PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 21 2 4 1 Rebuild all Rebuild All and Build The Rebuild All button or menu command CPU Rebuild All starts the compilation assembly and linkage of all files linked for the active CPU The Build button or menu command CPU Build does the same job but only for files which have been modified since the last build This saves time when building large programs Build options More can be done by setting the build options with the menu command Tools Options Options r i Build Download General Directories Create Listing files lst Stop build on first
168. in the Watch window Select the Watch window button on the Project Manager window Then drag symbols from the symbol editor to the Watch window 1 Place mouse pointer in centre of symbol icon Press left mouse button button Watch Window HC Hms SALA Watch Window Online Rate 04s oj x LE OFFTIME LC ONTIME PCD Clock with current time Daily Timer Daily Timer ONTIME Switch on time OFFTIME Switch off time 2 Keep mouse button depressed and drag symbol into watch window 3 Symbols with their comments and states PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls Ltd 4 27 To test the proper functioning of our daily clock example we will now modify the turn on off instructions ONTIME and OFFTIME and observe the state of the Daily Timer output To edit an instruction proceed as follows Insert Line Ins x Delete Line Del Online Edit Data xj Delete All Type Address Units Paste Ctrl R Decimal 1 Place mouse pointer Current Value Edit Data on value to edit Press E0000 right hand mouse button New Value 43000 2 Edit new value Help Close 4 13 5 Setting the PCD clock When a PLC is commissioned its internal clock is not always at the correct time To adjust it proceed as follows 1 Select the Online Configurator button on the Project Manager window Then select Clock 2 Copy the time fr
169. ine Read on line parameters Restore default parameters Define symbols for adjust parameters Define adjust parameter addresses Commissioning an analogue module Acquisition of an analogue measurement Example for PCD2 W340 analogue input modules Example for PCD2 W610 analogue output modules PG5 WorkShop Chapter 3 Fupla 22 09 04 Saia Burgess Controls Ltd 31 31 32 32 33 33 34 35 36 36 3 38 Saia Burgess Controls Ltd Program with FUPLA 4 1 Introduction The Fupla editor is the simplest fastest introduction to programming PCD controllers The name Fupla means FUnction PLAn a graphical programming environment in which the user draws programs with the aid of hundreds of functions These functions are organized into libraries covering the basic applications with more specialized functions added for certain professional domains The special libraries include a HEAVAC library for heating ventilation and air conditioning a modem library for networking PLCs to exchange data via telephone line analog ISDN GSM GPRS the messages SMS Pager and DTMF Other libraries for communications networks LON EIB or Belimo products are available too The great advantage of Fupla lies in the fact that the user can put a PCD into service without having to write a single line of code and without any particular programming knowledge PG5 WorkShop Chapter 3 Fuplal 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 Saia Burg
170. information to be identified e Symbols used by a program are listed in the Symbols window e The program can be displayed visually on line and tested step by step PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 5 7 3 1 View Symbols or Values gt View User or Auto Comment Editing a line of code Label Mnemo Operand Comment Increment a register STH Flag Copy the Flag state into the accu DYN DFlag On a positiu flank of the Flag set the accu eigh JR L Hext 1f the accu is low jump to the label Next INC Register Increment the register Hext HOP sHo instruction IL program lines are formatted into 4 columns Label Represented by the colour red the label is a symbol name for a program line This is useful for program jumps JR L Next Mnemonic Represented by the colour blue the mnemonic or program instruction defines the operation to be performed on the operand input output flag register Operand Represented by the colour black the operand defines the data type input output flag register and address The View Symbols or Values button allows either the operand address or its symbol to be displayed STH Flag _ gt sm Fe Comment User comments are shown in green and begin with a semi colon They appear to the right of the mnemonic and operand but may also occupy a whole line SSKIP Author Dupont Fred Dat
171. ing up the program he _ EL Regulation LI Summer Control Program for sammer time O winter Control Program for winter time HC Maintenance Control Program for mainten C Light_Contral I Init Initialise your parameters C Test _Install Test your installation L Diag_Instal Installation diagnose PG5 WorkShop Chapter 2 Project management 05 07 04 2 26 2 7 3 Global Symbols View List view 2 1 4 Saia Burgess Controls Ltd List of symbols Menu commands View Global Symbols and View View List display the symbols used by the program Global Symbols displays the Symbol Editor which defines the symbols shared by all files of the active CPU These symbols can be edited here View List view displays all the symbols used by the active CPU This list is not editable Symbols which are never used are not shown in this view Symbol _ Type Address Dai Tma Daily Timer fbd Daily Timer f Daily Timer fbd POD Clock with curent time OFFTIME Daily Timer fbd Switch off time ON TIME Daily Timer fbd Switch on time Cross Reference The Global Symbols and View List views offer the possibility of selecting a symbol and showing its cross reference list i e a list of all program locations where the symbol is used Each entry shows the file name and block in which the symbol selected is used with a line or page number too It also shows if the could be changed at that location with the wor
172. ion for this kind of application They bypass the need to use PCD2 H1 or PCD4 H1 counting cards which have a maximum counting frequency of 10 to 160 kHz depending on module type PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 3 3 3 1 Internal resources softwares Flags 1 bit of information 0 1 F NV non volatile 0 8191 A flag memorizes one bit of information There are 8192 flags F O is the first flag By default the flags are non volatile This means that if you turn off the PCD when the flag is at 1 it will still be at 1 when you turn the PCD back on assuming your battery is good Any volatile flags will be reset to O if the PCD is turned off If one or more volatile flags are required they can be configured in the Software Settings This is explained below The following example writes a high 1 to flag number 11 as soon as input 1 or 3 is high Boolean equation F 11 11 13 How to use flags in your program Instruction list program Fupla program COB 0 0 STH 11 ORH 13 l OUT F11 Fbox Binary Or ECOB By default flags are non volatile To make them volatile they must be specified as such in the Software Settings see example Setup flags 4 Station EST PCD2 _ J Settings Software Settings Main CPU a x Registers Texts DBs TimerCounters Flags Directories Advanced W Volatile Flags Flags up to this address are Set D
173. isplayed by this window is only available if the program build ends successfully Organization block structure The SAIA PCD program is a structure of different organization blocks in which the user stores programs for the application Each block offers a particular service cyclical programming COB sequential programming SB sub programs PB functions with parameters FB exception routines XOB After building the program the Block Structure view button or the View block Structure menu command can be used to view the overall structure of the organization blocks that make up the program The example below shows a program made up of blocks COB 0 COB 1 XOB16 PB 10 PB11 and FB 156 Note that COB 0 conditionally calls three sub blocks PB 10 11 and FB 156 The call condition is indicated in brackets Call condition H Accu 1 L Accu 0 BR COBs Cyclic Organization Bl COB 0 Regulation PB 10 H Summer Control Program For sommer time ee PB 11 L Winter Control Program For winter time l FB 156 H Maintenance Control Program For maintenace time os PB 12 Test_Install Test your installation PB AS Diag Instal sInstallation diagnose ke COB 1 Light_Contral Fl XOBs Exception Organization Blocks E SOB 16 Init Initialise your parameters List of organization blocks The Block List view button or the Block List menu command displays the list of all blocks mak
174. ittle black triangle For example a pulse counter cannot be incremented when its with clear Otherwise what would happen if the UP signal remained at one for any amount of time The counter would be continuously incrementing itself for as long as the UP signal remained one It is for this type of application that certain digital inputs have been dynamized Therefore only the positive edge of a UP signal will increment the counter It is sometimes necessary to add dynamization to the TL input or output of an FBox We then use the Binary Dynamize function Comments Comments can be inserted with the program 1 Select the Place comment button et 2 Position the comment on the program page then press the left mouse button 3 Write the comment Daily Timer 4 Press the ENTER button FBox Help To obtain a full description of any function select the FBox in the FBox Selector and then press the F1 key Another solution would be to position the mouse pointer on an FBox in the program and double click on the left mouse button For rapid identification of an unknown FBox found in a program call up the FBox Selector window position the mouse pointer on the unknown FBox and single click on the left mouse button The FBox Selector window will then display the function selected in the program PG5 WorkShop Chapter 3 Fuplal 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 4 6 4 6 1 4 6 2 4 5 3 4 6 4 Saia Burgess Contro
175. k The FB is called twice Its first call makes output 64 blink at a rate of 1 5 seconds Its second call makes output 65 blink at a rate of 3 seconds FB 1 Start FB tempo DEF 1 T Address of timer delay DEF 2 W Pause between two blinker inversions blinker DEF 3 O F Blinker address STL tempo If timer state is low LDL tempo initialize timer with parameter 2 delay COM blinker invert parameter 3 EFB End FB COB 0 0 CFB 1 Call FB for first time T 1 15 O 64 CFB 1 Call FB for second time T 2 30 O 65 ECOB PG5 WorkShop Chapter 5 Structures 05 07 04 5 10 Saia Burgess Controls Ltd 5 5 View Structure Once you have built your program you can view its block structure Click on the Button Block Structure View located on Project Manager s toolbar This will display the structure showing which COB calls which PB FB or SB The display below is for the FB example on the preceding page It shows that FB1 is called by COB O twice 4 chapter4 PCD A C Settings Programm Files Listing Files PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 6 Exception Block XOB 5 6 1 Definition Exception blocks are programs that are called automatically as soon as a particular event occurs Each hardware or software event is linked to an XOB These events cannot be modified by the user However the user is free to program the action to be taken inside each XOB Exampl
176. k 21 History Statys Rur Clock Help Run Stop Festart SAIA Communications Driver x Mo response If not the No response error message will be displayed Check the Online Settings and the cable PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 3 6 ES Hardware 2 11 Hardware Settings The Hardware Settings folder allows definition of the PCD controller s memory and communications parameters Hardware Settings Exemple a xj PCD Memor Password S Bus Serial Modem Pome Bus TEFAF Gateway PCO Hardware PCD Type Code T est Memon Size PCD 126K Bytes RAM EPFROM v Number of CPUs Extension Memon Size EPROM Size ji None 128K Bytes Cancel Help Save Ag Upload Download When a controller is used for the first time or after adding new memory to the PCD its memory must be configured There are two ways of selecting the parameters of the above window The first way is to select the Upload button and read View directly from the controller the The second way is to define the window s information with the help of the tables shown on the next two pages The above example corresponds to the lines marked in bold on these tables The table below shows information about the memory jumpers These jumpers must be set on the PCD s CPU card For more information please see the hardware manual
177. kShop Chapter 6 Graftec Programming 05 07 04 6 20 Saia Burgess Controls Ltd 6 12 6 How to program a transition A transition is repeated endlessly until the end of transition is active ETR Fupla program or the accumulator instruction list program In transition O we will wait inside the transition until the input Start_3_ pulses goes high Open transition 0 and add the program as shown below Fupla program T Wait tor the Starta _p signal start_i_ pulses FBox Graftec End of transition IL program STH Start_3 pulses Copy the information Start_3 pulses into the accu 6 12 7 Using timers in an SB Proceed as follows activate the output and load the timer into the step then go to the wait transition which polls the timer until the end of the delay timer 0 Fupla program Timers and counters from the Fupla library are not designed for use in SBs They are designed for COBs which are executed cyclically over and over again If you want to use timers or counters inside an SB use the ones from the Graftec family They are especially designed for sequential blocks because you can load them in one step and query their state later on from another step or transition hree pulses Turn the output on amp load timer Load Timer Fbox Graftec Load timer Binary High IL program SET Three_pulses Set the output high LD One_S_ Timer Load the timer Pulse Time Wait on the timer decrementation
178. l Book 1 S YMBOLNAME TYPE 2 Input Input 3 inputi Input 4 Cutout Cutout 5 Input Input Inputs Inout 6 inp p Idlal H Sheeti Ready Save in Pras Projects Programm Files E AND GATES txt Save as type Ae PG5 WorkShop Chapter 3 PCD Resources 05 07 04 File name My_symbols txt COMMENT 10 And gate input 10 11 And gate input 11 42 Result of input 11 AND 12 12 And gate input 12 13 And gate input 13 Cancel 3 33 3 34 Saia Burgess Controls Ltd In the PGS symbol editor select the context menu Advanced Import Symbols then select the file and import it If any difficulty is experienced check that the Exel file has been properly closed Look ir ee Local Disk D e c EJ CAFI temp data Tools FFE AND GATES2 bet Piss Projects El My Symbols Ext Program Files Expand all Import Symbols PythonTest Collapse ll Export Symbols Exe pork Symbols To Clipboard Move Up atri p Move Down Gtr HEowm Delete Unused Symbols File name M y Symbols twt Ey Options Group Symbol Address Value k LL cop_sas6eces COB ELI Inputo Input 10 4nd gate input 10 LI Inputi Input 11 4nd gate input 11 LI GutpukO utpat 4 Result of input 11 AND 12 ea notz and gate input 12 LC Inputs Input 13 and gate input 130 Sal Global AND_GATES2 PG5 WorkShop Chapter 3 PCD Resources 05 07 04
179. l be sent to output 65 This signal will have a duration of 2 5 seconds Integer value Binary value Solution Load the timer LD T 1 25 Value displayed by the output t of the XPluse FBox fo Value displayed by the output Q STH T 1 Instruction list program COB 0 0 STH 14 DYN F 12 LD T1 25 STH T 1 OUT 065 ECOB Fupla program organization block 0 time out time If input 4 sees a rising edge load the timer1 with 2 5 seconds scopy timer state to the output O65 APulse In TY a j Fbox Time related Exclusive pulse Technical information Timers in the SAIA PCD are decremented at a rate defined by the Software Settings Timer Time base normally 100ms The actual time defined by a constant which is loaded into a timer changes if the time base is changed This means that if the time base setting is changed then all timer load values must also be changed To overcome this problem the time data type can be used to declare timer load values If a time value is used then the linker calculates the actual timer load value according to the time base settings Format T nnnS MS ELI BL_3DE3935A HC DelayTime LOB K Constant T 100MS5 100 millisecondes K Constant T 36005 PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd Example Counter A counter will be programmed to count up each time input 5 receives a signal an
180. lace the mouse over the SASI Fbox and using the context menu select Fbox properties define a different Name for the Fbox of each channel This name allows binding the exchange Fboxes SEND and RCV with SASI Fbox corresponding to the channel PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 6 Saia Burgess Controls SA According to the network the communication channel parameters can be partially defined from the Adjust Window of the SASI Fbox and to be completed in the Hardware Settings The Channel number is always defined in the Adjust Window of the SASI FBox The channel number depends from PCD Hardware and on the communication hardware used slot B1 B2 serial interface PCD7 F 10 5 2 Assign Master channel Communication SASI Profi 5 Bus Master H SASI Profi 5 Bus Extended FSE Channel PSE Channel Prof 5 Bus Master Cdi Err Master Station Master Station with timings definitions The assignment of the Master channel is done by combining the Hardware Settings with one of the Fboxes above Only the communication channel and the timings of the Master Channel can be adjusted from the Fbox Other parameters are all defined in the Hardware Settings Adjust window parameters Channel Defines the corresponding channel of the serial interface connected in the network Depends from the PCD and his hardware Timing The Timeout is general defined with the value by default 0 and will be adjusted only for th
181. lal 22 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls Ltd Local and global symbols The symbol definition window has two folders Global and Local E E Parking lot PCD2 M170 Z Fr xam Files Listing Files Documentation Files Ta Global 7 Parking lot Definition Local symbols appear in a folder that bears the name of the file using them These symbols may only be used within that file Parking lot src The global symbols that appear in the Global folder may be used by all files in the CPU Parking lot src and Ventilation src Make Local Global If necessary symbols in the Symbols window can be moved from the local folder to the global folder and vice versa xj Mark symbol s HEI Daily Timer HLI OFFTIME Select context menu Z System EH Global Daily Timer Advanced Make Global or Make Local with right hand erences Decta mouse button sien Make Local Use Local Declaration The symbol is moved into bl i eee L Daily Timer Output 32 the Global or Local folder 2 Al System Pal Global Daily Timer N B Any new symbol defined directly from the Fupla editor will be added either to the global or local folder depending on settings in the Global symbols option See context menu Advanced Options of the Symbols window PG5 WorkShop Chapter 3 Fupla 22 09 04 Saia Burgess Controls Ltd 4 11 4 5 Editing a Fupla function 4 5 1 FBox selector
182. lamp comes on The PCD is executing the user program When the Stop button is pressed the RUN lamp goes off The PCD stops executing the user program After Stop note the line shown in red It indicates the instruction at which the program stopped The number in square brackets represents the integer value of counter 1400 Then further right states are displayed for the accumulator status flags and index register DYN Dyunamise leaving car signal On the positiu flank of outgoing signal 866015 DYH F 7503 IHC Humber of free slots Increment the number of free parking slots gagail INC C 1468 3 AG 26 HB P1 EG TA8888 PG5 WS K7 ProlL E1 19 09 03 1 34 Saia Burgess Controls AG 7 9 3 Step by step mode If the PCD is in run mode mark the first line to observe in step by step mode and select the Run to Cursor button The PCD stops when it reaches the line with the cursor Begin step by step program Run to Cursor execution by pressing the F11 key or one of the buttons below If the program calls any PBs FBs or SBs it is not always necessary to step through them in with step by step mode The following three options are available e Enter the block and step through it e Process the called block in run then continue in step by step after returning to the block that made the call exit it rapidly in run mode and then continue in step by step mode after returning to a e If the program has entered a block whose
183. lave stations can only be assigned with the communication channel According to the Fboxes used the adjust window allows the definition of the slave stations to which data can be sent from the master station SEND or from which slave stations the Master can read data RCV Adjust window parameters Profi S Bus Address Defines the number of the Profi S Bus slave station Source destination station Defines the number of the S Bus slave station PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 8 Saia Burgess Controls SA Source destination element Defines the type of the data to write or read from the slave Source destination address Defines the start address of the data to write or read in the slave The number of the exchanged data values depends on the number of the inputs or outputs of the SEND or RCV Fbox 10 5 6 Diagnostics om If the program is Online a green or red LED is displayed at the top right of the SASI SEND or RCV Fbox Green indicates that the data transmission is OK red indicates an error Correct functionality All the Fbox are green data exchange are done correctly PS 8Channel Proti S Bus Master Clr Err ret PS8Channel EMD ret PSA Channel ROW reft PSB Channel T reft P 8 Channel pev pev No data can be exchanged in the network SASI Fbox SEND and RCV are red no data can be exchanged in the network PSE Channel Proft 5 Bus hlaster Clr Eri ref F56 Cha
184. le the functions Memory S Bus Gateway Modem and Password are not required However it is important to select the correct PCD type and size of memory fitted The PCD2 M170 is always supplied with a standard equipment of 1024 Kbyte RAM Hardware Settings exe gem FCD Memor Bus Select PCD type PCO Hardware PCD Type Code T ext Extension Memory Size PEDA M IO 1024K Bytes RAM z Number of CPU E A With certain PCD types a setting is required for the user memory equipped Click Download Download Upload Cancel Help Download all parameters to the PCD Download Hardware Settings Exemple Hardware Settings File Mame d PG5 Projects Chapter 1 exemple exemple Shi Download To PCD Deas PCD2 M170 on COM FAU gt Which Settings W Memon Allocation the user program is deleted e E E S E A E EE E E S N E O N a T E E T M S5 Bu ial Modem Profi S Bus TCPAIF Gateway Passyyoed E Help Ckeck Memory Allocation too e PG5 WorkShop Chapter 1 Quick Start 05 07 04 1 10 Saia Burgess Controls Ltd 1 3 5 Adding a program file PCD user programs are stored in one or more fioles There are several ways of adding a program file In the Project window select Program Files click the right hand mouse button to display the context menu and select New new file Project x m 3E Project exemple 1 CPUS
185. lp Cancel Objects for HMI Editor uo zf SwitthOn gt fno Be ewicnor feof Channel state 4 14 4 Mini HEAVAC application To try out the operation of adjust window parameters we can once again use the daily clock program presented at the beginning of this chapter However this time we will achieve it with the help of the HEAVAC library The two FBoxes described above are the only ones we need Create the program as set out below then execute Build All Download Program and Go Online Rebuild All fam Download Program Go Online If the program is extended with several other HEAVAC FBoxes the nitialisation HEAVAC 6 FBox must be positioned once only at the top of the first Fupla page PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 4 32 Saia Burgess Controls Ltd 4 14 5 Parameters after download program Adjust Clock daily ae E O x Read All White all Set Defaults Info Help Close Objects for HMI Editor uo Switch On EHn se cE Channel state oi 7 The middle column shows switch on and switch off parameters for the daily clock as defined during programming As a general rule1 these will be the same parameters used in the PCD and displayed in the right hand column switch on switch off parameters and state of output Ch 4 14 6 Writing parameters on line During on line testing it is possible to edit new switch on and switch off p
186. ls Ltd Editing links between FBoxes Connect functions first solution 1 Click on the Select Mode button on the toolbar k q 1 2 Point onto the FBox then press the left mouse button 3 Keep pressing the mouse button as you drag 7 the FBox towards a neighbouring FBox 4 The FBoxes are linked as soon as the two 2 connections touch ga 3 y Connect functions second solution 1 Click on the Line Mode button on the toolbar ES 1 2 Position the mouse pointer at the start of the link and click on the left mouse button 3 Click on the left mouse button at each change of direction 4 When the target point of connection is reached click one last time on the left mouse button This will link together the two points 5 To interrupt editing a link press the right hand mouse button 2 3 Erase a line or a function Select the Delete Mode button on the toolbar and then select links and FBoxes to be deleted x Another faster solution is to mark out an area and delete that Press the mouse button Keep pressing and slide the mouse Release the mouse button s Select the Edit Delete menu path AOUN Rules to follow The creation of loops is not permitted They will result in Y an error message Page 1 Error 55 Loop back detected E g 2 Direct connection of the left margin to the right margin is not permitted It is necessary to use an FBox Binary Move or Integer Move w Right hand margin s
187. lusive pulse Demus binary selection pe Start delay Mux integer selection Store delay Demus integer selection Chronometer i Cycle time User Standard pplication User The first function required in this example serves to switch on the lighting in response to a short pulse from a stairway switch This is an OR function which is found in the Binary family in the Standard library The second function Off delay defines the 5 minute period during which the lights are on It is found in the Timer family in the Standard library Further information on the chosen FBox can be found by right clicking on the function in the FBox Selector window and choosing the FBox Info context menu command When a function block has been selected from the FBox Selection window the left hand mouse button is used to place it in the edit window between symbol columns With certain function blocks such as OR logic the number of inputs can be selected This is done by dragging the mouse vertically and clicking the left hand mouse button when the number of inputs is correct PG5 WorkShop Chapter 1 Quick Start 05 07 04 Connecting function Use this method when connection points are aligned horizontally _ Press the Select Mode button Place the mouse pointer over the FBox and press the left hand mouse button Hold the button down and drag the FBox horizontally until the connection is made Do not release the mouse button
188. mation and to verify the proper functioning of a program or FBox PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 4 30 4 14 2 Saia Burgess Controls Ltd Initialization of HEAVAC FBox When using certain FBox libraries such as the HEAVAC ap oO FBox must always be positioned at the start of the Fupla file library s common tasks to be managed such as initialisatior Pr 5 REX program has been downloaded or after a PCD coldstart P Err FBox HEAVAC Init Initialization HEAVAC 6 After any program download and PCD coldstart the Res input of this FBox and the adjust parameters shown below have an important influence on initialisation of the adjust parameters for all the other HEAVAC FBoxes in the program i he parameters are setto default values Reset manual Pre Reset Automatic Reset gt Activated Automatic Reset Reason Evaluate Reset Input gt Downloading the program and the automatic Reset parameter With the Active option the adjust parameters of all HEAVAC FBoxes will be initialised with the values defined by the program With the Not active option all existing parameters in the PCD will be preserved Res input and the Evaluate Reset input parameter If the status of the reset input is high the adjust parameters of all HEAVAC FBoxes will be initialised with values defined during programming Depending on the option selected for the Evaluate Reset input parameter the Res i
189. mber Analogue FBoxes are expandable The user can define the number of measurement channels required by an application If some measurement channels are not used or if an extra channel is added the context menu Resize FBox can be used to adjust its dimensions However an FBox can also be defined with the maximum number of channels even if they are not all used The Add field allows the base address of the analogue PED W3 module to be defined This address indicates where the l module has been inserted in the PCD 0 16 32 Analogue measurements are available at FBox inputs i O toi 7 They can be connected directly to other FBoxes or the values can be saved to a register Saving a value to a register is a good solution particular when the value is used on several different pages of the program Attention Be careful never to define more than one FBox per analogue module and never to insert the analogue module at the PCD watchdog address 255 Otherwise the value supplied by the module may be incorrect PG5 WorkShop Chapter 3 Fupla 22 09 04 Saia Burgess Controls Ltd 4 37 4 15 2 Example for PCD2 W340 analogue input modules If the PCD is equipped with a PCD2 W340 module which has 8 universal input channels the user can take one of the following FUPLA FBoxes and define the required number of measurement channels PODS Wod PODS Wad Err Ert Add Add FBoxes PCD2 W3 PCD2 W34 PCD2 W34 with error
190. mment using the Block Properties menu In instruction list IL programs the block is defined by instructions which enclose the program code HF EXAMPLE_COB srct il PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 5 5 2 2 Example Here you have an example program shown both in IL and FUPLA which makes output 64 blink at a rate of 1 5 seconds The program is written in COB O which is then followed by other COBs 1 to 15 IL program Fupla program COB 0 Start COB 0 0 Supervision time START UP STL T 1 IF timer T1 0 LD T 1 load it with 1 5 s 15 COM O64 and toggle the output 64 D ee A ECOB COB 0 ends here n aa it COB 0 a COB 15 _ Next block sE qe NOP ECOB Next COBs Fbox Blinker Blink delay T 5 2 3 Add a structure A Fupla file may contain several program blocks which can be added deleted or edited using the Block menu Symbol used to define block Block no 0 15 If not defined block numbers will be dynamic Block Properties Block name EL 3DEG3E 44 Block number lL Type C 306 f COB 7 p g i swpervision time 01 sec E Comment Block type e e d 0 Transition Cancel Help PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 2 4 Supervision time The supervision time allows the definition of a maximum time for processing a COB from
191. mmunication modules inserted in the slot B1 and B2 of the PCD2 M480 Define S Bus station number in the Network Hardware Settings Master station 4 x PCO Memory Password S Bus Serial Modem Profi S Bus TCPIP Gateway W S Bus Support 5 Bus Station Number j 0 EPR Master _station A SbusStatior Save Ag Upload Download S Bus Station Number S Bus station number is common to all communication channels of the PCD Define communication channel of the Ether S Bus Hardware Settings Master station A O O O O OOZ O OSOS x PCO Memory Password S Bus Serial Modem Profi S Bus TCP IP Gateway J TCPAF Slot B2 Channel IF Node fi 5 PRJ Master_station_4 IPNode IP Address fis2 TE fz 128 FGU Port I Subnet Mask 255 255 255 fo Slave z Default Router E jo E jo Network Groups Save As Upload Download Cancel Help IP Address Ether S Bus station number connected to channel IP Node TCP IP node number The Node is used in the SEND and RCV Fbox es to define a Slave station with witch the data s has to be exchanged PGU Port or Slave Define the channel as slave or PGU This definition can be accumulated with master function adding a SASI Fbox in Fupla program Slave PGU Supports data exchange with master stations supervision systems and terminals It also supports the PG5 programming tools Slave Supports only da
192. n F 200 address of the first destination data slave Station Read a register R 25 of the slave station R 125 SRXM 8 Channel address 1 Number of the data s to exchange R25 address of the first source data local Station R125 address of the first destination data slave Station Note Only the master stations are programmed with STXM and SRXM The slave stations must only be assigned with the communication channel Waiting the transmission end de using the transition STL F 1003 Verify that TBSY is in Low state Le Assignation text defines a range of 8 diagnostic flags for communication Third flag will go in the high state during the data transmit and in low state when exchange is finished Diagnostics Channel assinations In the case of the communication problem verify if the channel assignation is donne correctly Analyse the program step by step and verify that the SASI instruction doesnt display a flag error If the channel assignation isn t donne correctly then the communication will not work Possible corrective actions in master or slave station e Verify the Hardware Settings e Verify that the Hardware Settings have been downloaded into the PCD e Verify that all stations use the same profile S Net DP e Verify that all stations communicate at the same speed e Verify that the defined communication channel with the Hardware Settings and SASI instruction are identical Same channel number e Veri
193. n the machine looks for COBs in the program and processes them in numerical order COB 0 COB 1 COB 15 regardless of the order in which they appear in the file After the last COB the program will start again from COB 0 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 1 7 7 3 5 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 All the blocks for sequential programs SB subroutines PB and functions FB are called by the user program with the instructions CSB Call SB CPB Call PB and CFB Call FB The user program therefore determines when and in what order SBs PBs and FBs are processed All exception blocks are automatically called as soon as the particular event concerned occurs These events are unpredictable and may happen at any time The order in which they are processed cannot be defined Each hardware or software event is linked to a distinct XOB These events cannot be modified by the user However the user is free to program which action to take within each of the XOBs Rules to follow when editing blocks Even though blocks can be written in any order the following rules must be followed IL file IL file e Blocks cannot be written inside other blocks They must always follow each other e No program instructions may be defined outside a block with the exception of symbol definitions texts and data blocks PG5 WS K7 ProlL E1 19 09 03 7 4 Show Hide Symbols Editor i View U
194. n and so cannot read or write the data of other stations in the network PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 12 Saia Burgess Controls SA 10 6 4 Data Exchange between master and slave stations Initial Step channel assignation Step data exchange Transition wait end of the data exchange Data exchange between the stations is the sequential program The assignation of the communication channel is treated only once data exchange in the network will be executed only if the previous exchange of the data s is finished That s why we propose to treat IL data exchange with Graftec Editor Initial Step allows assigning the communication channel at the Restart Cold of the PCD Other Steps are executed in loop and step one supports one data package Every Step is separated by one Transition which tests diagnostic flag TBSY and defines if data Exchange is finished We are authorized to exchange data s defined by step which follows only if TBSY is Low Data Exchange using a Step Before to exchange data we must define address of the slave station in the register which is declared for this by text assignation Define the address of the slave station LDL R500 Register address with the slave station address 11 S Bus address LDH R500 Register address with slave station address 21 Profi S Bus Address Data exchange between the stations is supported using two instructions STXM for writing data in the slav
195. nd counters Example Create a time base that inverts an output once every second This example uses three instructions The first STL uses the accumulator to put in it the timer s inverse state The following two LD and COM depend on the accumulator They will only load the time base and invert the output if the accumulator has previously been set high by the instruction STL COB 0 0 STL T 1 If the timer state is low the accumulator state will be high LD T 1 load time delay with 10 units of time 10 COM O38 invert output state ECOB PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 7 24 7 5 8 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Word instructions for integer arithmetic These instructions are used for calculating arithmetical equations using integer format registers and constants Each arithmetical instruction has several lines and applies operands to registers or constants but the result will always be placed in a register Addition Subtraction Squareroot_ _ ADD RO SQR R 100 R1 R 101 R 3 R3 RO R1 18 Multiplication MUL K5 DIV RO R 1 R 1 R 3 R3 5 R1 R 3 R3 R0 R1 R 4 Reste Increment s_ i Decrement Initialize register INC RO RO RO 1 INC RO RO RO 1 LD RO K19 RO 19 Status flags All the above arithmetical instructions modify status flags according to the result of the operation Positive Negatif
196. ng in IL instruction list 2 7 1 Chapter summary 2 7 2 Preparing an IL project 3 7 2 1 Create new project 3 7 2 2 Create new IL file 3 7 3 Organization of an IL edit window 4 7 3 1 Editing a line of code 5 7 3 2 Page format of instruction lines 6 7 3 3 Edit organization block 6 7 3 4 Sequence of processing for instructions and blocks 6 7 3 5 Rules to follow when editing blocks T 7 4 Symbols window 8 7 4 1 Add new symbol to Symbols list 9 7 4 2 Operand addressing modes 10 7 4 3 Using a symbol from the Symbols list in an IL program 11 7 4 4 Local and global symbols 12 7 5 Introduction to the PCD instruction set 13 7 5 1 The accumulator 13 7 9 2 Binary instructions 14 7 5 3 Dynamisation 18 7 5 4 Status flags 19 7 5 9 Instruction words for timers 20 7 5 6 Instructions for counters 22 7 5 1 Accumulator dependent instructions 23 7 9 8 Word instructions for integer arithmetic 24 7 5 9 Word instructions for floating point arithmetic 20 7 5 10 Conversion of integer and floating point registers 20 7 5 11 Index register 26 7 5 12 Program jumps 27 7 6 Editing a first application program 29 71 Building the program 31 7 8 Load program into PCD 32 1 9 Debugging a program 32 7 9 1 Viewing compiled code 32 7 9 1 Go On Offline Run and Stop 33 7 9 2 Step by step mode 34 7 9 3 Breakpoints 35 7 9 4 Online modification of the program 36 7 9 5 Viewing and modifying symbol states with the Watch Window 37 7 10 Commissioning an analogue module Error Bookma
197. ngthy calculation program elapses the COB will be abandoned to continue from the start of the next COB The release point is automatically stored in memory together with the ACCU status When the original COB is next invoked it will continue from the release address 1 If this technique is used XOB 11 should not be programmed as otherwise time is wasted when the timeout is not actually an error A further programming technique timeslice is explained in Other programming techniques PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd XOB 12 Index Register overflow The size of the Index Register is 13 bits 0 to 8191 This is sufficient to reference all element addresses If a program contains an indexed element which falls outside its address range then XOB 12 is called For example the indexed Flag 8000 is referenced and the Index Register contains 500 such that flag 8500 would be referenced which lies outside the Flag s address range of 0 8191 XOB 13 ERROR flag set Many instructions in the PCD instruction set can set the Error flag see the Reference Guide line FLAGS If an error should arise apart from setting the Error flag XOB 13 is also called so that any general arrangements alarm error message to a printer etc can be made XOB 13 is always called when the Error flag is set irrespective of whether the cause is a calculation data transfer or communications er
198. nnel ENL ref PSB Channel RCV ref PS8 Channel T ret PS Channel pev gt pev gt PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 9 Possible corrective actions in master or slave station e Verify the Hardware Settings e Verify that the Hardware Settings have been downloaded into the PCD e Verify that all stations use the same profile S Net DP e Verify that all stations communicate at the same speed e Verify that the defined communication channel with the Hardware Settings and SASI function are identical same channel number e Verify that the PCD is equipped with the necessary communication hardware e Verify that the stations are connected to the network and are powered on e Verify the network wiring e Verify that the firmware version supports Profi S Bus Only some Fboxes do not exchange data SASI Fbox and some SEND and RCV Fboxes are red The Fbox in green exchanges the data correctly PS6 Channel Prof 5 Bus Master Clr El ref PSB Channel END ret PSE Channel REW E ref PSB Channel To ref PS Channel ECV e Possible corrective actions in the master station Verify the parameters of the adjust window of the red SEND and RCV Fhox Verify that the slave address is present in the network Possible corrective actions in the slave station For every red SEND and RCV Fhox view the slave station number and verify the concerned stations e Verify if the Hardware Settings
199. nput will only be taken into account in case of a PCD coldstart or during runtime always Green red LED Some FBoxes have a simulated LED that can display three different colours grey when the controller is off line green or red when the controller is on line Green signifies that everything is functioning properly red indicates an error generally caused by information at FBox inputs or by the selection of unsuitable adjust parameters For more detailed information please consult the guides regarding FBox errors N B Within the HEAVAC library you will find different versions of the initialisation function Initialisation HEAVAC 4 6 Version 6 is the most recent We recommend the use of function 6 for all new applications PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls Ltd 4 31 4 14 3 HEAVAC FBox with adjust parameters The C K_D FBox allows a daily clock to be produced just like oO r in this chapter but with a single FBox available in the HEAV The FBox output can be switched on or off according to tim En Ch window FBox HEAVAC clocks Daily clock The parameter Objet pour HMI editor is only used in the presence of HMI terminals If this option is not used keep the proposed standard parameter Input En allows the clock function to be disabled If En is low output Ch will remain inactive p Adjust Clock daily Read All white all Set Defaults Info He
200. ns or instruction list A sequential block SB starts with an initial step the symbol for which is a double square It represents the start of the program This is where the program will start when the block is called for the first time coldstart 6 7 Rules of evolution Sequential blocks have a strict syntax A sequential block always starts with an initial step then transitions and steps must alternate all the time So you must never have two steps or transitions connected together a E L4 e o L a he pa Z Right Wrong PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 10 Saia Burgess Controls Ltd 6 8 Transitions TR 0 to 1999 1 Was the Into button tuched Put into a transition any part of a program that has to run repeatedly until a certain situation occurs for example o wait for a character from a serial port amp wait for the end of a timer fo wait on an end switch The transition always ends with an E TR FBox The transition is repeated continuously if the ETR FBox input is low or if the ACCU is low at the end of an instruction list transition Example flag 2 is toggled with each program cycle until input O is high Fupla program IL program HE SEDITS2 transition 1 File Edit View Page Wlede Resource File Edit Search Wrew Project Tools Bal seel Help Djaja s Hele ola aul 2 Transiton toggles FlagZ until 2 Input comes to nigh COM The STH inst
201. nterrupt input INB2 30 No connection with RIO If an error occurs and the corresponding XOBs have not been programmed the error LED on the front of the PCD will come on and the user program will continue its work If an error occurs and the XOBs have been programmed the error LED on the front of the PCD will remain off and the exception routine will be called A prioritising mechanism ensures processing of the most important XOBs Priority level 4 is highest PG5 WorkShop Chapter 5 Structures 05 07 04 Saia Burgess Controls Ltd 5 6 3 Use of XOBs Help find errors in your program configuration errors in module addresses more then seven program levels more then 32 active transitions in a Graftec structure never ending loop error in a mathematical operation errors in communication co a ar a a Fupla example Use of all available tools for the systematic location of a user program error With Fupla it is not even necessary to create XOBs They are added automatically by the Fbox Special Diagnostic XOB Diagnostic information is available on the function outputs error counter XOB number program line number A Adjust ZOB Diagnostics pos Humber gt 13 Error flag Fupla Editor Interrupt inputs Double click with the mouse to display the adjust parameters 7 IL example The IL program s diagnostics supply the same information as above in registers Rdiag 0 12 G
202. nto the PCD s memory Files represented by this icon without an arrow are not part of the program They files are ignored and are not downloaded to PCD memory This can be useful for modules which are linked for commissioning tests but which should not be present in the final program Common files Mark file hold left hand mouse button down Common Files Te Libraries Fup H Lighting_management PCD H E Settings Program Files Z Program Files i i E Bim Ea Floord Fup gt a Ea a Libraries Fup ola Ground Floor Fup a E Floor 1 Fup Drag mouse over program folder a B Ground Floor Fup Files in the Common Files folder can be copied pasted or just dragged into the program folder of the CPU that uses them Note the two dots at the start of the copied or dragged file name This path means that the file is in a folder which is one level up The file can be edited from the common files folder or from the program files folder of the CPU In either case the user is modifying the same file and corrections will apply for all CPUs linked to it PG5 WorkShop Chapter 2 Project management 05 07 04 2 20 Saia Burgess Controls Ltd 2 4 Building the program The PCD cannot process programs directly after editing in Fupla IL Graftec S Net or HMI Files must first be prepared using the different stages set out in this diagram Source files Graphical programs Rebu
203. nts in the SB Enter a name in the field Name We recommend that a name be entered for each SB This will be helpful when navigating through your SBs If you do not enter a name the list will just display the number Mode Block Page Help Mew E x SC Delete l Open Properties Properties SB Block List x Name Number PU LSE fo Comment Help Cancel Add a SB in the list As mentioned you can have several SBs in one file To add additional SBs to a file open the SB Block List window displayed above and click on the button New The New SB window will be displayed with the next available SB number Enter a name for the SB and click on OK This will add the SB to the list You can then select the SB you want by highlighting it and clicking on the button Open This will display the initial step for the selected SB Now we can structure the sequence elements for the SB SB Block List xX Open SB 1 Openb ainG ate Properties New SB Lt i Te Ween E 2 OpenM ainG ate f e Comment Help Help Cancel Clase PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 9 6 6 General structure of an SB 4 w Nital step IST Transition TR Step ST The Graftec editor allows the structure of sequential blocks to be edited as a sequence of steps and transitions into which the user writes code in the form of graphical functio
204. o free you from having to specify a fixed address for every resource that you need Dynamic resources are used by defining a symbol name for a resource without specifying an address You will not need to change these settings until you start to write large programs with a large number of registers Station EST PCD2 4 7 Software Settings Station Est Registers Texts DBs Timer Counters Flags Advanced Dynamic Space Set Defaults First Last Address Address Used Free 3500 jas jo ps Tents jeooo fass fo 500 Mets Blocks 3500 Tagag M Paar Registers mouse click If assembly errors arise such as Auto allocation overflow for type R dynamic space settings must be increased PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 9 3 3 3 Constants 32 bit value Integer 2 147 483 648 to 2 147 483 647 Floating point 9 22337E 18 to 9 22337E 18 Constants are fixed values that do not change during the program They are written into a register Exemple fixed coefficients like n Pl 3 1415 The next example loads register R4 with a fixed value 100 Then register R4 is divided by 0 25 Because register R4 contains an integer value and we want to divide it by a decimal value 0 25 you have to convert R4 to a decimal value We copy R4 into R35 a register we are sure is not being used convert R35 to a decimal value and then divide R35 by 0 25 The result o
205. o the PCD use Fbox SASI Profi S Bus Extended PS8Channel Profl S Bus Ex Clr FAdd soo a fi E Err 10 8 Other References For more information s you can also refer to the following manuals e Instruction Guide 26 133 e Profi S Bus in preparation Example of the project Profi S Bus installed with your PG5 PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls Contents COMMEG IAG A A PE A AOE A ESEA S AE EAA E E A 1 11 Ether S DUS csicsncsscsascotassssdcsdutcaccasseosseccdecastancsenionstisd esadssddacastinscevensesssadesdsiesdesdancisededentsavanstesassccastcsioce 2 dlid Ether S Bus network Example ceccarnsserronrniiniisrri einn iin a a A EE Z 11 2 Examples of the Data Exchange in Ether S Bus cccccccccsceseessnceceeceecceeeeessessesesssaaeaaeaeeseeeeseeseeeeees 2 ES EE E EEEE AA nonsense aa gioco na sac A A E E PE E 3 1l 4 Hardware Settings master SIAVECS icccccccccccccccccccecccceceseensnneaeeeeeeeeeeceeeeeseeseesesesaaeaeaeeeeeeeeseeeeeeseseeeseees 3 HAr Demme PCD parametelS sssi E E 3 11 4 2 Define S Bus station number in the Network c ccccccccccsssessceeceeceessessneeeeeeeeeseesnseeeeeeeeseeas 4 11 4 3 Define communication channel of the Ether S Bus 2 0 0 0 ccc ccececccccceeesssnseeeeeeeeesessneeeeeeeeesees 4 11 4 4 Download Hardware Settings in the CPU eccecccccceecsssssaceeeeceeseesseeeeeeeeessessaeeeeeeesenes 5 Ie TO AT VO aaa cats psi slg cites O ENA ne Paver ecm nd ple a
206. oject management 05 07 04 2 8 Saia Burgess Controls Ltd 2 3 The Project window ef Project City Hall 4 CPUS Projekt Common Files Tree ae Libraries Fup oe oa Se Garage_ doors POD Heating control PCD a t Lighting _management PCD a Software Poan gles ir Floor a E Ground Floor Fup Listing Files oe Documentation Files ai Ventilation _controal PCD4 Folders in the Project window group together project information according to certain organizational criteria 2 3 1 Project folder T The main folder shows the project with its name and how many CPUs it includes To modify information in this folder select the folder with the mouse and show the context menu with the right hand mouse button New CPU Import CPU Paste wE Imports a CPU from another PG5 project or from an old PG4 project Copy Project View or edit the project name and description Find Ctrl F Print Ctrl F Alt Enter Properties 2 3 2 Common folder Common Files beeen E Libraries fup The Common Files folder is provided to hold modules common to more than one CPU in the project To add a program file select the folder and use New File from the context menu The Add Files item in the context menu can be used to import any type of PG5 program file but can also import the application s commissioning and maintenance documents in Word Excel etc These files a
207. ol or the automatic doors of an underground garage Project City Hall CPU lighting management CCE beee CCE OE SJPERSHE i CIPO i ft Network Ci 6 8 anaes CL raemenmears mera CPU garage g Eii doors i j ai f e a sevesceegretees n CPU ventilation CPU heating control control The PG5d programming tool unites in a single PG5 project all the PCD CPUs that belong to any one particular application A green triangle identifies the active Project CPU All instructions for building BE Project City Hall 4 CPLIfs downloading and testing the program H E Common Files use the configuration and program a Garage_doors PCD files of the active CPU i Heating control PCDI 3 Lighting_management PCD _ Settings _ Program Files Listing Files DE Documentation Files H S Ventilation_control PCD4 PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd j SAIA Project Manager City Hall Lighting_management File Edit wiew CPU Online Tools Help H Garage_doors PCDI Heating control PCD1 l Lighting _ management PCD o H A Settings Program Files m E Floor 1 Fup Ground Floor Fup Listing Files Documentation Files Linkage complete 0 errors 0 warnings Generating Block Information files Block Information Files complete
208. om the PC to the PLC with the Copy to PCD gt gt gt button or adjust clock settings in the SAIA PCD Clock PC Clock fields Copy to PED gt gt gt Help PG5 WorkShop Chapter 3 Fuplal 22 09 04 S4l4 PCO Clock Date 10 01 03 Time 11 23 51 x Date dd mmruy f 00172003 Time hh mm ss 0 28 46 Day of week 1 7 5 Week of year 1 53 2 i Cancel PG5 WS K4 FUPLA E2 17 05 03 4 28 4 14 Off line mode On line mode Description of k daily parameter Saia Burgess Controls Ltd Adjust windows some FBoxes identified by a black triangle in one corner st number of adjustable parameters These adjustable parame with the HEAVAC library and also with other FBox libraries HEAVAC clocks daily clock Parameters in the adjust windows define variables in the same way as input links but with additional benefits such as individual parameter descriptions on line correction simplicity of use etc To display the adjust window double click with the left hand mouse button on any FBox that has a black triangle Switth On Switch Off Channel state On line parameter The adjust window has three columns Adjust parameter description column Describes the use of the parameter Additional information is available if the description ends with three dots double click on the text with the left hand mouse button Off line parameter value column This value wa
209. or help during the debugging process All elements to be used are therefore listed in a central tool called the Symbol Editor The term symbol is used rather than element to emphasize the fact that each element has a name symbol In addition giving all resources a name makes the program easier to read Elements of a resource Type of symbol Here you specify what kind of resource you are using For example Input or Register Comment Add a long comment to every resource It Name of resource can be up to 80 eneleeters 209 makes the program easier to read Address value C et HE MormalA ur 1 ies Is in normal ruri 4 Hz Cond Aun M Ee Machine i in conditional 5 H OilHigh Oil Level is too high L Emergency T Emergency stop on the H intermediat lag F HE OilPurnp T 20 Cilpurnp LJE DilPumpFrog COB 3 a al Network Shared Project_Shared W Qilpump x Address Value The PG5 must be told which input or output is to be assigned to this symbol In the case of internal resources everything but inputs and outputs it is not necessary to specify an address The system itself will choose one This is called auto allocation Filename to which symbols belong Symbols are not known to files other than this Global symbols from this list are known to all CPU files PG5 WorkShop Chapter 3 PCD Resources 05
210. orts up to 32 branches Above 32 branches the PCD calls XOB 9 see chapter 5 6 10 4 Jump over a sequence Alternative branching can be used to skip a sequence thereby allowing the conditional processing of that sequence 6 10 5 Repeat a sequence Repetition of a sequence is also possible with alternative branching For example a counter is initialised with a number of program loops You then enter a simple sequence of any length decrement the counter and if the counter has not reached zero the loop is repeated PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 13 6 11 6 11 1 6 11 2 6 11 3 Edit a sequence Once you open a new Graftec file the initial step is displayed The execution of an SB always starts from here New elements can be added to the drawing either with the toolbar or the keyboard Toolbar Graftec Zoom mode Transition mode Select mode Page mode Sa IStep mode SAIA Grattec Nalito Temon D ca ed ke G le a L E Mixed Step mode mode At the start of this chapter we created a file PULSE sfc Open this file go to the SB list and load the SB OpenMainGate Do the following exercises EY Edit a simple sequence 1 Select button Mixed mode 1 7H 2 Move pointer onto the initial step and 3 click the left mouse button 3 Move pointer onto the new transition and click the left mouse button again 4 Follow this format
211. ow allows the user to reserve address ranges for registers counters timers and dynamic flags During the program build these addresses are automatically assigned to dynamic symbols defined by the user program and Fupla FBoxes A dynamic symbol is one for which no absolute address has been defined Dynamic symbol l LE Hms R HI DailyTimer Output PCD Clack with current time Daily Timer It is not always necessary to change the dynamic addresses The default settings are usually adequate for most applications However if an error message like this appears during the build of a large program Fatal Error 368 Auto allocation dynamic space overflow for type R then it will be necessary to extend the dynamic address range for the media type shown in the error message If the controller is equipped with EPROM or Flash memory the RAM Texts and RAM View Block dynamic ranges will also have to be configured to addresses from 4000 upwards so that these Texts and DBs will be in writeable RAM memory PG5 WorkShop Chapter 2 Project management 05 07 04 2 16 Saia Burgess Controls Ltd Software Settings Daily timer H C x Registers Tesxts DBs Timer Counters Flags Directories Advanced Set Defaults Timer Counter Partitian and Timebase Last Timer 31 Counters begin after this address Timer Timebase f p 10 10 000 ma Dynamic Space First Last Address Address Used Free
212. owing programs documentation and material CD PG5 version 1 3 Documentation CD 26 803 1 x PCD2 M170 controller 1 x PCD2 E110 module with 8 digital inputs 1 x PCD2 A400 module with 8 digital outputs 1 x PCD8 K111 programming cable to dH All the necessary instructions for installing PG5 1 3 on your computer are provided on the PG5 version 1 3 CD see under CD PG5 InstallationGuide_F htm Please also note that all the English names of menus instructions options and buttons present in the PG5 program are reproduced in Italics in this manual We wish you every success with your training and with future projects involving SAIA PCD products Your partner Saia Burgess Controls Ltd an other PCD may also be suitable PG5 WorkShop General 01 12 04 Saia Burgess Controls Ltd Contents 1 PCD Quick start 1 1 Introduction 1 2 Preparing the hardware 1 2 1 Example Stairway lighting 1 2 2 Connection diagram 1 2 3 PCD equipment 1 2 4 Wiring 1 3 Editing the program 1 3 1 Software Installation 1 3 2 Starting the PG5 1 3 9 Opening a new project 1 3 4 Configuration 135 Adding a program file 1 3 6 Opening a file 1 3 7 Editing a program 1 4 Running and testing the program 1 4 1 Building the program Build 1 4 2 Downloading the program into the PCD Download 1 5 Finding and correcting errors Debugging 1 6 Correcting a program PG5 WorkShop Chapter 1 Quick Start 05 07 04 DAO oOAaAAHKR HR BWW
213. p using the number of lines JR L Next JR L 1 INC 2 R10 INC R 10 Next NOP NOP The jump must always occur within a current block COB PB never outside it If necessary the jump may be implemented always or only under a predetermined binary condition such as the accumulator state or that of a status flag Syntax for an unconditional jump instruction Mnemonic Label Description JR Jump always implemented on line JPD corresponding to label JPI Syntax for a conditional jump instruction Mnemonic Condition Label Description JR H If accu is high JPD L If accu is low JPI Z If status flag Z is high P If status flag P is high N If status flag N is high z If status flag E is high PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 7 28 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Example Count pulses from a binary input binary with a register relative jump Unlike counters the instruction to increment a register does not depend on accumulator state It is thereful practical to use a jump instruction to increment a register when only that is necessary COB 0 0 STH F1 Copy flag state to accumulator DYN F2 Force accu state high on a positive flank of flag F1 JR L Next If accu state is low jump to label Next INC R10 2 Next NOP ECOB The instructions STH and DYN read information from flag F 1 and set the accu state high for a
214. pe and address e g 32 and an optional comment Using absolute addressing directly in the program is a disadvantage when changing the type or address The user program will not be updated by changes made in the symbol list Changes must be made manually for each margin of the program It is therefore preferable to use symbol names with optional dynamic addressing Symbol names Group symbal ddressi value Comment i ae LU Daily Timer Output Daily Timer The data is defined with a symbol name type address and optional comment Correction of symbol type or address is supported from the symbol list and each user program margin automatically updated if the symbol is changed Dynamic addressing Address alue Comment PCD Clock with This is a form of symbolic addressing in which the address is not defined The address is assigned automatically during the program build The address is taken from an address range defined by the Software Settings See Project Manager N B Dynamic addressing is available with flags counters timers registers texts DBs COBs PBs FBs and SBs However absolute addresses must always be defined for inputs outputs and XOBs PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls Ltd 4 9 4 4 3 Using a symbol from the Symbols list in an Fupla program When a program is edited symbols already defined in the Symbols window may be us
215. plication Alternatively symbols can be imported from another program Electro CAD Visi Plus and used inside your project This makes documentation consistent throughout the project and labels in your electrical drawings will be the same as in the program code Simply use the export function in your CAD to export the symbols into a text file and import them into the symbol editor again Adding a symbol while typing your program IL You can simply write your program and each time you enter a new symbol add type address comment to the line When you press Enter the symbol definition will be moved into the list Example SAIA IL Editor Symbol_Test main src q gt 10 x pr File Edit Search View Project Online Tools Symbols Window Help e x ed ee ee AAAA By n o m symbols k Dal Global Main JARY comment symbols itn 3 Col 13 INS OFFLINE STH NewSymbol R Any comment 4 b Ready Ln 9 Col 69 INS OFFLINE Ui PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 24 Saia Burgess Controls Ltd 3 5 7 Adding a symbol while typing your program in Fupla The Fupla editor works in exactly the same way You can enter new symbols to the Symbol List directly from the Fupla input output field Syntax symbol type address comment H SAIA Fupla Editor Symbol_Test Main fup File Edit wiew Project Online Mode Block Page Symbols Help
216. positive flank or low in the absence of a flank Depending on accu state the instruction JR either jumps to the line corresponding to the label Next or increments the register with the instruction NC The letter L indicates the condition for implementing a jump in this example the jump will only be implemented if the accumulator state is low Example Solution with an indirect jump COB 0 0 LD R2 Load line number into register Next STH F1 Copy flag state to accumulator DYN F2 Force accu state high on a positive flank of flag F1 JPI L 2 If accu is low jump to line number donea with register 2 INC R10 Next NOP ECOB The indirect jump offers great flexibility The program can itself modify the line number to which it will jump PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 29 7 6 Editing a first application program Count the number of spaces left in an 8 space parking lot and illuminate a red lamp when it is full The red lamp comes on when the parking lot is full Red_light O 32 Vehicle entrance Vehicle exit Car_incoming 0 Car_outgoing 1 When the PCD powers up we assume that all parking spaces are available We must therefore start by initialising the free space counter with the value 8 This initialisation takes place once only when the PCD starts up We will therefore program it in the cold start block XOB 16 The remaining program functions will be carried out by a cycl
217. r 6 Graftec programming 05 07 04 PG5 WS K6 GRAFTEC E2 21 05 03 Saia Burgess Controls Ltd 6 14 2 Edit a page Create a page Let to create a page from a sequence 1 Select the button Select mode 2 Click on the first step of your sequence 3 Press the Shift key and click on the last step of your sequence 4 Select the menu Page Create Open a page Display the content represented by the page symbol 1 Select the button Select mode 2 Click with your mouse on the page 3 Select the menu Page Subpage Supress a page Replace the symbol page by the whole sequence 1 Select the button Select mode 2 Click with your mouse on the page 3 Select the menu Page Expand PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 25 SGRAF32 PULSE sfc Efe er klai Eti palling Er Set the counter Eubpaga F ta 3 Vail for the Start signal Turn the output on amp load timer Turn the output off amp load time Vail an other second Decrement Counter 3 o Aa Create a new Page SB j Page Zs SGRAF32 PULSE sfc File Edit View Search Mode Project Online Page Help Dark oe OO a Q Beate 1 maakia Erter Ealla Br Subpage FS Set the counter 0 Wat for the start signal Counter 0 0 4 F Expand the content of a Macro Step 6 26 Saia Burgess Controls Ltd PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls AG Contents 7 Programmi
218. r into the IL editor and release the mouse button The symbol chosen is automatically added at the place indicated by the mouse cursor Drag mouse cursor into IL editor PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 7 4 4 Saia Burgess Controls AG Local and global symbols The symbol definition window has two folders Global and Local A Sonor e Parking jee PCD M170 Zi Progam Files Pprking lot ste AF ch ventilatio im E SFE Ta Global 7 Parking lot ne Files Documentation Files Definition Local symbols appear in a folder that bears the name of the file using them These symbols may only be used within that file Parking lot src The global symbols that appear in the Global folder may be used by all files in the CPU Parking lot src and Ventilation src Make Local Global If necessary symbols in the Symbo s window can be moved from the local folder to the global folder and vice versa Mark symbol s Group Symbal a _ FL Car incoming Input Car _oukgoing Input LOI Red fight Gutput LE Number of Free slots Counter Select context menu Advanced Make Global or Make Local with right hand mouse button ELI Dynamise incoming car signal F Dynamise leaving _car_signal F 4 al System Da Globl Make Global Advanced Make Local Use Local Declaration Symbals x Group Symbol The symbol is moved into As the
219. r port The Gateway Slave port is a way to access the network from outside If necessary a second or the third Gateway Slave port can be defined Hardware Settings In general the PCD supports only one slave PGU channel But the new PCD2 M480 and PCD3 Mxxxx controllers may support more PGU port on the same PCD The configuration of the second Gateway Slave PGU is supported by the Hardware Settings Example add a second Gateway Ether S Bus Profi S Bus TEFAF W TERAP Slot B2 Channel 8 IF Hode 13 5 PRAJ Master station 4 PNode IP Address f 32 Ig f 68 f 2 1130 PGU Fort M Glave Subnet Mask 255 255 J255 lave M Default Router jo fo l jo jo Network Groups La PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 19 The second Gateway Slave port PGU is added configuring the Hardware Settings with the node and TCP IP address If the controller is a PCD2 M480 the communication module should also be defined in the PCD s Slot B2 with PCD7 F65x Ethernet module Fupla or IL Program With old PCDs and also the new PCD2 M480 and PCD3 Mxxxx it is possible to use a supplementary SASI Fbox instruction and add a second Gateway Slave port this Gateway slave port without PGU functionality will not support the PG5 programming tools but only a supervision system terminal Only reading and writing PCD data are supported registers flags etc Example Fupla add a third Serial
220. r to duplicate them by copying and pasting and then adapt them as required Copier coller une partie de programme 1 Click on the Select Mode button 2 Mark the area to be copied Press the left mouse button With button still pressed slide mouse Release left mouse button 3 Add an FBox or connection to the selection Press the Ctrl key Keeping the Ctrl key down select the connections and FBoxes to add 4 Copy the selection with the Edit Copy menu path or with the Ctrl C keys Paste a copy of the selection with the Edit Paste menu path or the Ctrl V keys 6 Position the copy on the Fupla page Position mouse pointer in middle of copy Press left mouse button With button still pressed slide mouse Copy and paste symbols Click on the Select Mode button 2 Mark a list of symbols Position mouse pointer on first symbol Left click with mouse Position mouse pointer on last symbol Press Shift key Keeping Shift key down left click with mouse 3 Copy the selection with the Edit Copy menu path or with the Ctrl C keys 4 Position the mouse pointer on a free part of the margin 5 Paste a copy of the selection using the Ctrl V r Plo O O Edit Paste menu path or the Ctrl V Diameter keys Four e be b be r Four The Ctrl key allows non consecutive symbols to be selected PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 16 05 0
221. re of less interest to the inexperienced user Opening an existing project A project that already exists can be opened using the File Open Project menu command This searches for all project files 5pj in the project directory and displays them in a list Double click on the project in the list or select the project from the list and press the Open button Alternatively press the Browse button and find the Project or CPU file directly PG5 WorkShop Chapter 1 Quick Start 05 07 04 1 8 Saia Burgess Controls Ltd 1 3 4 Configuration Before you can work with a CPU in the project configuration parameters must be defined so that the programming tools and the generated user program will work with the PCD Under Online settings parameters can be set for communication between the PC and the PCD Several possibilities are available For this exercise the default protocol PGU will be selected followed by the PC s serial port number COM Select PGU protocol Online Settings exemple Channel Lane i i COM PAU 3600 Connection Click on Setup CPU Number jo Dont Close D Channels FGU PGU Protocal Port e Baudrate faeo Protocol P8o0 Select the PC s serial port RS232 to be connected to the PCD Cancel Help PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd The PCD is configured using Hardware settings In this examp
222. re stored with the PG5 project and can be opened by double clicking on them Note Common files use the same ocal symbols in each CPU which uses the file but the CPU s own Global symbols are used so global symbols used in a common file can be different for each CPU PG5 WorkShop Chapter 2 Project management 05 07 04 Saia Burgess Controls Ltd 2 3 3 IILI m Leama 2 3 4 CPU folder Each CPU folder contains the configurations and programs for one controller in the project To modify information in a CPU folder right click on it to show the context menu CPUs can be copied and pasted inside project Activates the CPU _ Set Active Ctrlt Enter green triangle T Copy Chrl ic Delete Del Prints the CPU View Edit the CPU name and description Properties Alt Enter Settings Online lige Online The Settings Online folder allows the CPU s communications parameters to be defined A number of communications protocols are supported PGU S Bus Ethernet etc However only the PGU and S Bus USB protocol allows direct communication with the PCD that does not require configuration in the PCD s Hardware Settings Channel PGU RS 232 Online Settings exemple Channel Cancel COM1 PGO 3600 Channels Pau Press button CPU Number 0 PGU Protocol Port z Baudrate 3600 Protocol P800 Define serial port RS23
223. red using organization blocks in which the user writes application programs Each block provides a particular service cyclical organization blocks COB for cyclical programs sequential blocks SB for sequential programs program blocks PB for subroutines function blocks FB for subroutines with parameters exception organization blocks XOB for exception routines Blocks are delimited by a start instruction and an end instruction For example the instruction COB marks the start of a cyclic organization block which ends with the same instruction preceded by the letter E for end ECOB All program code belonging to this block must be placed between the instructions COB and ECOB never outside the block Even the smallest PCD program will always have a COB Other blocks may then be added as required Sequence of processing for instructions and blocks Within each block the PCD processes program instructions line by line from the start instruction to the end of block instruction The order in which instruction lines are written within an organization block is important However the order in which the organization blocks themselves are written is not important Different rules define the sequence of block processing In a PCD coldstart the programmable controller first looks for XOB 16 the coldstart block If it is present it will always be processed first regardless of whether it is at the beginning or end of the file The
224. register with zero incrementing the index Therefore for each loop we load zero into a different register R 10 R 11 R 109 At the 100 loop the index counter reaches the maximum index value K 99 and forces the accumulator state low This allows the loop to be exited so that the rest of the program can be processed XOB 16 Cold start block SEI KO Index 0 LOOP LDX R10 Load register address 10 index 0 with zero INI K 99 Increment index and modify accu state JR H LOOP lf accu is high program jump to label LOOP EXOB COB 0 Cyclic organization block 0 ECOB PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PGBOBSAKLHETEPLoEL E119 09 03 03 Saia Burgess Controls AG 7 27 7 5 12 Program jumps The IL instruction set has three program jump instructions They allow a sequence of instructions to be processed according to a binary condition binary or program loops to be implemented for repetitive tasks indexing Jump instructions JR Jump relative Jumps a few lines forward or back from the line containing the JR instruction JPD Jump direct Jumps to a line number counting from the start of block COB PB JPI Jump indirect As JPD but the line number is contained in a register The jump destination is generally indicated by a label that defines a line of the program However it is also possible to define a relative jump with the number of lines to jump forward or back Jump using a line label Jum
225. reviously have been entirely cyclic created from a list of graphical functions or instructions that are processed one after another by the PLC as quickly as possible from program start to end then it returns to the beginning of the task for a new cycle Cycle time The time required to process a program cycle is fixed It corresponds to the sum total of execution times for each instruction and function This is what we call the cycle time of a program Generally the cycle time amounts to a few milliseconds If information at a digital input changes state digital outputs dependent on the input states can be updated with a refresh time that is almost instantaneous The delay is in fact equivalent to the cycle time Cyclic programs belong to structures of the types COB PB FB or XOB PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 6 6 4 6 4 1 6 4 2 Exit Help Saia Burgess Controls Ltd Make a new Graftec file As an example we recommend the creation of a new project in which we are to prepare files for editing Graftec programs For graphical programming prepare one Fupla file and a second Graftec file For instruction list programming prepare one IL file and a second Graftec file Create new project From the SAIA Project Manager window select the menu File New Project and create the new project G SAIA Project Manager File Edit View CPU Online Tools Help I l Mew G
226. rk not defined 7 10 Commissioning an analogue module Error Bookmark not defined 7 10 1 Acquisition of an analogue measurement Error Bookmark not defined 7 10 2 Example for PCD2 W340 analogue input modules Error Bookmark not defined 7 10 3 Example for PCD2 W610 analogue output modules Error Bookmark not defined PG5 WorkShop Chapter 7 Programming in IL 28 09 04 7 1 Saia Burgess Controls AG T Programming in IL instruction list 7 1 Chapter summary The IL editor is the most flexible and powerful tool with which PCD controllers can be programmed IL stands for instruction list a non graphical programming environment where the user writes programs with the help of the powerful PCD instruction set All PCD controllers use this instruction set thereby guaranteeing portability of programs from one PCD to another The IL editor is more than just a valuable aid to program editing it is also a diagnostic and on line testing tool PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 2 7 2 1 7 2 2 New File Mew Open Mew Project Open Project Close Project Backup Restore Print Frink Setup Properties 1 Chapter 6 5pj 2 DAPGS Project Exit a HE Project Chapter 7 1 CPUs H E Common Files Settings Program Files Listing Files Documentatio 7 3 Preparing an IL project Before producing
227. ror If a more closely derived diagnosis is required for the Error flag a PB or FB can be conditionally called after every instruction which could set the Error flag Example DIV R500 value 1 R 520 value 2 R 550 result R 551 remainder CPB E73 if error then call PB 73 PB 73 Divide by zero SET O99 INC C1591 EPB PB 73 is called after a division by zero and turns on Output 99 indicating division by zero Counter C 1591 counts how often this event occurs An overflow from multiplication could for example activate output 98 andCounterC1590 could count these events XOB 13 should also be programmed but can be empty If it is not programmed the Error lamp on the CPU front panel is turned on when the Error flag is set which may not be satisfactory IMPORTANT The Error flag and other arithmetic status flags Positive Negative Zero are set in case of a particular event or state and if they are of interest must be processed immediately as these status flags always refer to the last executed instruction which can affect them For example if a correct addition had followed the division by zero example above the Error flag would be reset PG5 WorkShop Chapter 5 Structures 05 07 04 5 20 Saia Burgess Controls Ltd XOB 14 15 Cyclic interrupt XOBs XOBs 14 and 15 are called periodically with a frequency of between10 ms and 1000 s This frequency can be defined with the instruction SYSWR
228. rror message will take you to the error 6 13 2 Online tools Now download the program and go online The sequential block can be observed online The red spot always tells you which E transition or step is active Download Program File Edit Search View Project Online Mode Page Help Osak reken She Oo A ss 5 SAIA Graftec Editor Chapter 6 PULSE sfc Step by step Turn the output on amp load timer You can stop the PLC at any given moment and continue the execution in a step by step mode Turn the output off amp load time Red spot active transition Decrement Counter Ready SB 0 Page O 100 RUN Z PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 6 24 Saia Burgess Controls Ltd 6 14 Graftec structure with pages 6 14 1 Define a page PG5 can keep big programs manageable by creating a simple overall structure which then calls subpages Symbol of a page Create a page with this button Input Step off the page A page always starts and ends with a step It is possible to Navigate from page to Output step off create pages within subpage the page other pages Roles while using pages of ofe ofe of A page always starts and ends with a step A page can have only one input step and only one output step You can have pages within pages as many as you like You can neither move nor delete an input output step PG5 WorkShop Chapte
229. ruction sets the ACCU to a high state once input O goes high The transition is considered active when the ACCU is high at the end of the transition Transition FBox is called here You do not have to insert a program in every transition A transition without a program is always true and will be skipped Transitions written in instruction list the ACCU is always high at the beginning of a transition or a step amp You can edit a maximum of 32 sequential blocks with 2000 1 steps and transitions The new PCD2 4 M170 PCD2 M480 and PCD3 support up to 6000 ST TRs and 96 SBs PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 11 6 9 Steps ST 0 to 1999 Write the title diplay Steps normally contain the action parts of a program which are executed once when the preceding transition activates You want to make your motor move from A to B Typically you would first set the speed and direction of the movement Then you would start the movement Both these tasks are non repetitive and can be in a single step since the step is only executed once start movement Load speed and Once movement is underway you have to monitor it Wait on arrival and stop the motor as soon as it arrives at destination B This monitoring for example reading the end switch has to be done over and over again until the motor arrives This would ideally take place in a transition because
230. rvision Supervision M EAA VEE NE eT aan nam FTE mia v re F l 2 parallel Gateways 1 OK E i li 1 Gateway OK i i i m e i Profi Sbus 2 cascaded Gateway OK To respect the communication timings we cannot define two cascaded Gateways functions But it is possible to define two parallel Gateways on the same network PG5 Supervision iu Gateway slave port Eee L L J J 1 i 1 gee E Ef E Ef C i n C i EF S Bus Profi Sbus TCP IP If necessary a Gateway can make a bridge between to several communication sub networks 11 7 2 Configuration of the Gateway PGU function Definitions Gateway slave port Hardware Settings Master station 4 Serial Modem Profi S Bus TEPP Gateway PLD Memory Password S Bus Serial S Bus Master Gateway Definitions Gateway Master port It is easy to configure the Gateway function it doesn t need any program only some parameters in the PCD Hardware Settings Generally only a Gateway Slave Port and a Gateway Master Port should be defined then all is automatically supported by Gateway function PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 17 If the message received by the Gateway Slave Port is not for the local station the Gateway then data is re transmitted via one of the sub networks connected to the Gateway Master Port according to the address ranges defined for the sub n
231. rwise the counter will keep its Otherwise the counter will keep its current value current value Status flags Instructions INC and DEC counter modify the status flags depending on the result of the operation Positive Negatif Zero Error Example Counting pulses from a binary input with a counter COB 0 0 STH 12 Copy input state to accumulator DYN F3 Force accu state high at positive edge of 2 INC C 35 If accu state is high increment counter ECOB Instructions STH and DYN read information from input 2 and set the accu state high for a rising edge or low in the absence of an edge Depending on the accu state the NC instruction will increment counter 35 PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 23 7 5 7 Accumulator dependent instructions We have seen that binary instructions make much use of the accumulator and that some word instructions also use tt But not all instructions use the accumulator in the same way There are 7 instructions which use it in a special way These are the accumulator dependent instructions They are only processed if the accumulator has previously been set high The accumulator state is therefore a determining condition The 7 accumulator dependent instructions are listed below SET RES COM LD Only for timers and counters LDL Only for timers and counters INC Only for timers and counters DEC Only for timers a
232. ry Outputs RemoteOutput0 7 O PCD3 E110 8 binary inputs Alarm0 7 PCD3 W745 4 analog inputs of the Thermo element J Temperatured 3 R General functionality With both Profibus DP and Profibus S lO network data exchange is configured using the S Net Configurator No Fupla or IL code needs to be written and no Hardware Settings need to be configured apart from the communications module types and bus parameters if using the PCD2 M480 or PCD3 The configurator defines each slave station on the network and which I O modules are fitted I O data from these remote I Os is mapped to symbols or absolute addresses in the master station Code generated by the S Net configurator continually transfers I O data from the slaves to and from the memory image in the master When the program is compiled S Net generates all the code needed to continually transfer the data between the remote slave stations and the master station s memory image at the start end of every cycle The I O image data can be accessed directly by the master station s Fupla or IL programs In this way network data exchange is clearly separated from the process control PG5 WorkShop Chapter 12 Profi S IlO 01 12 04 Saia Burgess Controls 12 3 12 3 12 4 PG5 project ef Project Profi SIO Network 1 CPUs S Net module for network configuration Settings Prograrn Files besa im Local Process fup E S
233. s PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 19 Example add a second Gateway S Bus modem Ether S Bus Modern W Public Line 5 Bus Modem PGU Port M Serial Port 1 S Baud Rate 19200 Bus Mode Data S Bus Timing Modem Mame FCD2 T813 Save As Delete Set Defaults Reset Modem ATN Initialize Modem aT AFT CORROMANOS 25 1 005 0 24r The second Gateway Slave port PGU is added configuring the Hardware Settings with the parameters for the modem Fupla or IL Program With old PCDs and also the new PCD2 M480 and PCD3 Mxxxx it is possible to use a supplementary SASI Fbox instruction and add a second Gateway Slave port this Gateway slave port without PGU functionality will not support the PG5 programming tools but only a supervision system terminal Only reading and writing PCD data are supported registers flags etc Example Fupla add a third Serial S Bus Ether S Bus Senal_Gateway Slavwe_ Port o Bus oly i The adjust Gateway parameter then must be defined with option Yes According to channel type the parameters of the adjust window should also correctly defined Example IL add a third Serial S Bus Ether S Bus Use the following text to assign the channel SASI TEXT 11 UART 9600 MODE GS2 DIAG F1110 RO501 ENDSASI S N Flag and diagnostic register Mode S Bus Gateway Slave Data mode Transmission speed PG5 WorkShop
234. s jumps from one block into another etc XOB 9 Too many active GRAFTEC branches More than 32 Graftec branches were simultaneously activated in a Sequential Block SB Of course more than 32 parallel branches can be programmed in a single SB however only a maximum of 32 are allowed to run simultaneously XOB 10 More than 7 nested PB FB calls PBs and FBs can be nested to a depth of 7 levels An additional call calling the 8th level results in XOB 10 executing The 8th level call is not executed XOB 11 COB monitoring time exceeded If the second line of the COB instruction indicates a monitoring time in 1 100 seconds and if COB processing time exceeds this defined duration XOB11 is called COB processing time is the time which can elapse between the COB and ECOB instructions The original purpose of this monitoring time was the immediate discovery and subsequent eradication of any blockage or delay in the user program resulting from bad programming wait loops over long count loops It is in fact a software watchdog As already mentioned wait and count loops program jumps are not encouraged This minimizes the possibility of blocking user programs However even in properly structured programs one or more COBs may be programmed with very lengthy mathematical calculations etc which cause a long execution time and other COBs with only monitoring and control functions may be delayed If a monitoring time defined for this le
235. s Online and the PCD is in RUN mode the state of each individual symbol can be displayed The logical state of binary data is shown with a heavy or fine line heavy 1 and fine 0 Other data values can be displayed by clicking the left hand mouse button on the connection to show a Probe window SALA Fipla Eddee man marna A top Fle Edt yew roect rine Mode Block Pap Symbol Help CF eo SEN kek SRS Pen eH OTe leo r oS ie la Aaw n pian o Oooo O OHT j he 10 gt In a 0 32 14 mI t 12 13 n EO ooo eoi ooo R O Z n O E Shore co fede the Fics Selection Riek CORBL_SC4C1AfS Pae Ll ed Fa RUH Bint asees uaman s vesat neme gemana O Ea E PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd 1 6 Correcting a program To modify a program proceed as follows 1 Go offline using the Go On Offline button Modify the program Execute a new program build with the Build button wo DN Download program to the PCD with the Download Program button PG5 WorkShop Chapter 1 Quick Start 05 07 04 1 18 Saia Burgess Controls Ltd PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd Contents 2 2 1 Example of application project 2 2 2 Saving the project to a PC 2 2 3 Compressing a project or CPU 2 2 4 Opening a project 2 2 0 Creating a new project 2 3 1 Project folder 2 3 2 Common folder 2 3 3 CPU folder
236. s are the only stations authorized to read or write the data of the other master and slave stations Data exchange between slaves is not allowed With a Multi master communication mode data exchange is carried out between the masters in the network Only one master at a time holds a token which authorizes it to exchange data with other master or slave stations on the network When the master has finished transferring the data the token is passed to the next master which is then free to exchange data with the other masters or slaves The token circulates automatically between the master stations the slaves never have the token and so cannot read or write the data of other stations in the network PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 7 11 5 5 Data Exchange between master and slave stations Communication Channel used by Fbox ret P Channel END lt 3 ref IP Channel ROWO oD IP Channel o Bus Master IP Clr Err Binary input for activation User controlled data exchange between stations is done using Fupla Fboxes placed on the Fupla pages chosen the Fbox Selector You will find the Fboxes to write SEND or to read RCV data packets and also support different data formats binary integer floating point Data Block etc The SEND or RCV Fbox can be resized to increase or decrease the number of inputs and outputs defining the data packet to be exchanged with another station The
237. s channel to W6x0 R 100 BA 0 BITOR 2 Writes 2 filler bits R 100 BA 0 LD R277 Defines the digital value of the output 0 4095 3879 BITO R 12 Transfers the 12 bits of the output value to the W6x0 R 277 BA 0 SET BA 12 Triggers D A conversion A bridge must be selected on the module to define the output range 0 20 mA or 0 10 V Resolution is 12 bits equating to 4095 distinct setpoint states The integer value at register 12 determines the output voltage or current at the channel defined in register 100 Input value at register 12 Output voltage V Output current mA To obtain more detailed information and access sample IL programs for analogue modules please refer to your hardware manual or to internet address http www sbc support ch PG5 WorkShop Chapter 7 Programming in IL 28 09 04 7 40 Saia Burgess Controls AG PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls Ltd Contents 8 Additional tools 8 1 Chapter summary 8 2 Data transfer utility 8 2 1 Using data transfer 8 2 2 Start up Data Transfer 8 2 3 Save data with Quick Data Upload 8 2 4 Restore data 8 2 5 Save data with help of script file 8 2 6 Restore data with help of script file 8 2 7 Upload options 8 2 8 Save data with command line mode 8 3 Watch window 8 3 1 Open the Watch Window 8 3 2 Add data to a WatchWindow 8 3 3 Online display of data 8 3 4 Online modification of data 8 3 5 Display
238. s defined when the application was programmed It has been saved in the Fupla file The parameter can be defined generally in the form of an integer a multiple choice selection or sometimes with a button With some parameters the value can also be edited when the PCD is on line On line value column This column displays the information saved in PCD memory register or flag It is the data used by the PCD program when it is in Run mode PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls Ltd 4 29 4 14 1 Types of adjust parameter me ol Read All Write all Set Defaults Into Help Save Close Objects for HM Editor gt ne Switch On gt 11 00 lt gt ita Switch Off bl 14 00 K 14 00 i On H Adjust Clock daily Channel sta On line verification Adjustable off line Adjustable on line Adjust parameters can be divided into three main groups Off line adjustable parameters Each off line modification of a parameter requires a Build All and a Download Program before the PCD program will take it into account On line adjustable parameters On line modification of a parameter does not require any Build All or Download Program before it will be taken into account by the PCD program The parameter is adjusted directly in PCD memory On line verification parameters These parameters are not intended for modification They are displayed for infor
239. s from another application 3 5 6 Adding a symbol while typing your program IL 3 5 7 Adding a symbol while typing your program in Fupla 3 5 8 Transferring symbols 3 5 9 Auto complete symbols 3 5 10 Auto allocation 3 5 11 Entering text 3 5 12 Entering DBs 3 5 13 Search for a symbol 3 5 14 Arranging your symbols 3 5 15 Rearrange in List View 3 5 16 Exporting symbols 3 5 17 Importing symboles 3 5 18 Initialization of symbols 3 5 19 Symbol names 3 5 20 Reserved words PG5 WorkShop Chapter 3 PCD Resources 05 07 04 CONN OOF BW W 3 1 PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 3 Saia Burgess Controls Ltd 3 PCD Resources 3 1 Introduction This chapter provides an overview of the data types that may be used when writing an application The first two sections summarize all the familiar SAIA PCD elements such as inputs outputs and flags with their address ranges and usage The second two sections show how to use these elements in the symbol editor PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 2 Hardware resources Each program is made up of functions that allow the user to read write and manipulate different kinds of resources Those resources which allow us to interact with our environment are called hardware resources 3 2 1 Digital inputs and outputs I O 1 bit of information 0 1 max number of I Os
240. s will be indicated by a message in red A double mouse click on these messages will allow the error to be located in the application program Messages Assembling Parking lot ere Error 32 Parking lotr Line 17 Invalid expression 1 errors 0 warnings Assembling _Global sy5 zi Double mouse click on error message Assembly complete Errors 1 Warnings 0 Build failed Total errors 1 Total warnings 0 The error is marked in red Correction of Car incoming error DYH Dynamise incoming car signal DEC Humber of free slots STH Car_incoming DYH Dynamise incoming car signal DEC Humber of free slots PG5 WS K7 ProlL E1 19 09 03 7 32 Saia Burgess Controls AG 7 8 Load program into PCD The application program is ready Now it must be transferred from the computer to the PCD B either with the menu Online Download Program or with the Download Program toolbar button on the SAIA Project Manager window Download Program f any communications problems arise check your configurations once again in Settings Online and Settings Hardware and check your communications cable between the computer and the PCD PCD8 K111 7 9 Debugging a program Programs are not always perfect in their first version It is helpful to test them carefully Testing a program is supported by the same editor used for editing it 7 9 1 Viewing compiled code The View Code menu or then Show Hide Code button allow source co
241. se click Text Alarm battery failure Fbox Modem Modem Driver 14 Modem SMS Call SMS Modem SMS Send SMS Text for SMS message Help PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 15 3 3 1 Summary table Description Media Operand Binary Numeric Volatile Inputs 1 0 8191 0 1 Outputs O 1 0 8191 0 1 Flags F 0 8191 0 1 2 No Timers T 2 0 31 0 1 0 2 147 483 648 Yes Counters C 2 32 1599 0 1 0 2 147 483 648 No Registers R 0 4095 2 147 483 648 2 147 483 No 5 0 16383 647 GD 2239 EF 8 7 22607 EF 8 Text X 3 0 3999 String of max 3072 characters No 4 4000 Data blocks DB 3 0 3999 Max 382 values No slow access EN OSIOG oa Max 16 383 values fast access 1 depending on PLC and its configuration into inputs outputs 2 by default configurable from Softwares Settings 3 saved to same memory as programs RAM EPROM FLASH 4 saved to extension memory RAM 5 PCD2 M480 PCD3 M PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 16 3 4 3 4 1 Saia Burgess Controls Ltd Symbol editor Before starting to write a program all the elements to be used in it must first be declared number of inputs and outputs number of timers etc All these elements have to be known by PGS This is very helpful for finding elements inside program files reporting programming errors or f
242. ser or Auto Comment PG5 WorkShop Chapter 7 Programming in IL 28 09 04 Saia Burgess Controls AG Symbols window Groupi Symbol Type Address Comment cE e C Car incoming Input Gets high when a car comes into the parking LE Car_outgoing Input Gets high when a car leaves the parking HCI Fed _light Gutpuk a2 Stops new cars at the entry FL Number of Free_slots Counter Counts the number of Free parking slots Dynamise_incoming_car_signal F Flag detects the rising edge of the car incoming Dynamise_leaying_car_signal F Flag detects the rising edge on the car leaving al System Tal Global Parking lot The Symbols window contains a list of all operands in a program It can be viewed with the Show Hide Symbol Editor button or via the menu commandView Symbol Editor Each line defines all the information relative to an operand and constitutes a symbol Symbol A symbol is a name that indicates the address of an input output flag register It is advisable to use symbol names when editing a program rather than the direct address of a flag or register This allows correction of an address or data type from the Symbols window Instead of having to copy the correction to each line of the program it is only necessary to correct it in the Symbols window There is no risk of forgetting to correct a line in the program and creating an error that is hard to find Syntax for symbol names The first character is
243. several different files After a successful build of your program you can right click with the mouse on any symbol and start the Cross reference List function P SAIA IL Editor Chapter 7 Oilpump src Be xf pr File Edit Search wiew Project Online Tools Symbols Window Help lej x Cond Run feet NormalRun LE IntermediateFlayg Sar IntermediateFlarc fit OilHigh AND view Galled Black Emergency AND Open incdude File Oi1Purnp The Edit Data atr HE Ln 24 Col 36 NS OFFLINE j The cross reference function displays the filename line number and how many times a certain symbol was used Double click on any location in the reference list to open the program file with the cursor on the symbol concerned PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 29 The place where the symbol was defined normally the symbol editor Cross Reference List IntermediateF lag Definitions 1 Oilpump sv5 11 References 2 Uilpump sre 23 Wirithen Oilpyrnp sre 24 Written i e the symbol on this line contains the result of an operation Program filename and line where the symbol Oilpump was used The cross reference tool not only works in S Edit and Fupla but also in the different views which are available in the project manager Example Block Structure view BIr E EI COBs Cyclic Organization Blocks a Fiter Ctrl fe
244. signation isn t donne correctly then the communication will not work Possible corrective actions in master or slave station e Verify the Hardware Settings e Verify that the Hardware Settings have been downloaded into the PCD e Verify that all stations use the same profile S Net DP e Verify that all stations communicate at the same speed e Verify that the defined communication channel with the Hardware Settings and SASI instruction are identical Same channel number e Verify that the PCD is equipped with the necessary communication hardware e Verify that the stations are connected to the network and are powered on e Verify the network wiring e Verify that the firmware version supports Profi S Bus PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 14 Saia Burgess Controls SA Data s are not exchanged in the network Assignation Text defines a range with 8 diagnostic flags for the communication Fifth Flag TDIA Transmitter diagnostic will go in the high state during the data transmit error Step by step test of the communication program allows determining the instructions STXM and SRXM in error Attention if the communication error occurs then the diagnostic flag TDIA stays in high state until the diagnostic register will not be reset to zero Possible corrective actions in the master station Verify the parameters of the instructions STXM and SRXM in error Verify that the slave address is present in the network
245. ssseeeeeeeeeeeees 18 10 74 Communication TIMIDE sac saciaencnsevnsa dlsevenstdessandueenensesanncasesdeencanseaddamsaianeameudauensatanianninineas 19 IUS Aures I CRC iiion E cua mmeetl aeeeneseeeee Error Bookmark not defined PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 1 10 2 Saia Burgess Controls SA 10 Profi S Bus This example shows how to exchange data such as Registers and Flags between the PCDs connected to a Profi S Bus network 10 1 Profi S Bus network Example PCD2 M480 Station Master A S Bus Station Number 10 PCD3 M5540 Station Master B i ding eee f Ii D 5 a ALNI KARUM m a4 _ gt i6 1 gt a Profi S Bus 6 A 4 Profi S Net Onboard channel 10 Profi S Bus address 21 Profi S Net Onboard channel 10 Profi S Bus address 20 Profi S Net Onboard channel 10 PEE Profi S Bus address 22 Station Slave C S Bus Station Number 12 10 2 Examples of the Data Exchange in Profi S Bus Master with data exchanges Data on the network Master station A Master station B FO 7 Master station 2 F 100 107 EREET naam E R1 25 Master station B R25 i Slave station Slave_C Binary0O 7 Read 8 flags inthe slave BinaryO 7 F 100 107 station C F 20 27 4 Valued 5 Write 6 registers in the Master_A Valued 5 RO 5 slave station C R20 25 m MasterstationB i MasterstationA Dynamic registers measures to the slave C R 100 104
246. switches The required period of 5 minutes during which stairway lighting will be on must be entered in the left hand column as a multiple of tenths of a second The value of this constant is therefore 3000 5 min x 60 sec x 10 3000 To edit the input symbols 4 consecutive cells in the left hand column of the program screen are marked with the mouse and addresses O to 3 are entered The time constant 3000 left and output O 32 right are entered in the same way Please note that the address type I or O and address value 0 to 3 and 32 must be separated by a space character The symbols will immediately appear in the Symbols window of the symbol editor If the symbol editor is not visible it can be displayed using the View Symbols menu command or by pressing the Show Hide Symbol Editor toolbar button Show Hide Symbol Editor PG5 WorkShop Chapter 1 Quick Start 05 07 04 Saia Burgess Controls Ltd 1 13 Editing program functions Program functions are entered in the area between the two symbol columns This is done by positioning the graphical symbols of the function blocks FBoxes that are used to create user programs Function blocks are selected from the FBox Selector window Add Fbox FRox Selector ios Selector Move ln Out Regulation Special System informatior Time related upnamize Off delay with reset Pulse command Off delay H Analog Module E Binary And Mux binary selection Exc
247. symbol type and address number then set the condition and the state value of the breakpoint Selecting the Set amp Run button forces the PCD into conditional run mode The PCD s Run LED flashes and the PCD s Run button alternates between green and red The PCD automatically goes into stop mode when the breakpoint condition is reached For example when an instruction modifies the value of counter 1400 with a value greater than 4 The line following the last instruction processed by the PCD will be marked in red It is then possible to continue processing the program in step by step mode or with another breakpoint condition If necessary conditional run mode can be interrupted in the following ways e The Clear Run button forces the PCD into RUN mode ThePCD s Run LED comes on and the PCD s Run button turns green e The Clear Stop button forces the PCD into stop mode The PCD s Run LED goes off and the PCD s Run button turns red If more than one conditional breakpoint has been set they are all stored in the History field They can be selected with the mouse and activated with the Set amp Run button PG5 WorkShop Chapter 7 Programming in IL 28 09 04 PG5 WS K7 ProlL E1 19 09 03 7 36 Saia Burgess Controls AG 7 9 5 Online modification of the program When testing a program step by step it is helpful to modify the states values of certain operands symbols and check program behaviour under cetain conditions Select one of the active
248. ta exchange with other master stations Supervision systems and terminals PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 5 11 4 4 11 5 11 5 1 Download Hardware Settings in the CPU Online Settings Master station 4 X CPU Humber ja S Bus Station 254 F uto Iv PGU Number of retries 3 With the new systems PCD2 M480 and PCD3 the Hardware Settings can be downloaded via a USB connection It is necessary just to define Online Settings with the channel Ether S Bus PGU Download the parameters to the PCD using Download button on the Hardware Settings window Fupla Program Assign the channel using SASI Fbox IPChannel 64 IPChannel_ Bz o Bus Master IP W o Bus Master IP Cl E Cl E i i i i ii Fbox properties bind SEND ref IP Channel_B1 ref PChannel_ Bz END END and RCV Fboxes to the channel definition ref IP Channel_ 61 ref IP Channel Bz Assignment is done using a SASI Fbox placed at the beginning of the Fupla File Each communication network needs its own SASI Fbox because the parameters are different depending on the network the same for Master or Slave stations If the PCD uses more communication channels define each channel using corresponding SASI Fbox Then place the mouse over the SASI Fbox and using the context menu select Fbox properties define a different Name for the Fbox of each channel This name allows binding the exchange Fboxes SEND and RCV wit
249. tation E Online functions for commissioning and error detection via Ethernet TCP IP SATA S Bus modem etc E Integrated programming environments FUPLA function block diagram S Edit instruction list IL GRAFTEC sequential function chart E Integrated network editors for SATA S Bus PROFIBUS DP and FMS LONWORKS m Extensive additional libraries broaden the scope of PG5 functions Edition 26 732 E9 gess our Smart solutions for comfort and safety Sdid Contents CONDO OF ODN _ i O NMN Preface PCD Quick start Project management PCD Resources Program with FUPLA Program structures Graftec programming Instruction list programming IL Additional tools Saia Networks Profi S Bus Ether S Bus Profi S lO PG5 WorkShop General 01 12 04 Saia Burgess Controls Ltd 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 2 10 2 11 2 12 2 Saia Burgess Controls Ltd III Preface This document is intended as an introduction to SAIA PCD programmable controllers rather than as a detailed commissioning manual It therefore concentrates on the essential points for users who wish to acquire practical expertise quickly For more comprehensive information please refer to the help supplied by the programming tool itself or to the detailed manuals that will be found on the documentation CD To ensure ideal conditions for your training we advise you to obtain the foll
250. te addressing directly in the program is a disadvantage when changing the type or address The user program will not be updated by changes made in the symbol list Changes must be made manually for each line of a program It is therefore preferable to use symbol names with optional dynamic addressing Symbol names Group Symbol 4ddress Value cl E LCI red fight Output Shops new cars The data is defined with a symbol name type address and optional comment Correction of symbol type or address is supported from the symbol list and each user program line automatically updated if the symbol is changed Dynamic addressing Group Symbal Address Value Comment Ela LC red light F Stops new Cars This is a form of symbolic addressing in which the address is not defined The address is assigned automatically during the program build The address is taken from an address range defined by the Software Settings See Project Manager N B Dynamic addressing is available with flags counters timers registers texts DBs COBs PBs FBs and SBs However absolute addresses must always be defined for inputs outputs and XOBs PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 7 11 7 4 3 Using a symbol from the Symbols list in an IL program When a program is edited symbols already defined in the Symbols window may be used in different ways Symbol entry from the keyboard The symbol name is entered in full from t
251. ted in the slot B1 and B2 of the PCD2 M480 10 4 2 Define S Bus station number in the Network Hardware Settings Master station A x PCO Memory Password S Bus Serial Modem Profi S Bus TEPP Gateway IY S Bus Support S Bus Station Number i 0 E PRJ Master_station_A SbusStation Save z Upload Download Cancel Help S Bus Station Number S Bus station number is common to all communication channels of the PCD 10 4 3 Define communication channel of the Profi S Bus Hardware Settings Master station 4 l x PCD Memory Password S Bus Seral Modem Profi S Bus TePar Gateway M Profi S Bus Onboard Channel 10 PGU Port W Address 20 Use S Net Configurator File Hame Edit Eontiauratorn Slave V Baud Rate 1 5 MEd Bus Profile S Net Bus Parameters Save As Upload Download Cancel Help Address Profi S Bus station number connected to channel PGU Port or Slave Define the channel as slave or PGU This definition can be accumulated with master function adding a SASI Fbox in Fupla program Slave PGU Supports data exchange with master stations supervision systems and terminals It also supports the PG5 programming tools Slave Supports only data exchange with other master stations supervision systems and terminals PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 Saia Burgess Controls 10 5 Baud Rate Communication sp
252. ter Slave Max number of Unlimited 126 254 Unlimited 126 stations A A Industry building Industry building Industry building Industry building Industry building omain The new Profi S Bus network merges all the advantages of a multi master network and a high communications speed into a fieldbus network intended for industrial automation applications PG5 WorkShop Chapter 9 Saia Networks 01 12 04 Saia Burgess Controls Contents COMMEG TAGS AA EE A OE A SA S AE EAA E E E 1 10 Pron S BUS s nscsssssicstesustarsscenionstsackeosacccdecastasceventecscsd esadssddacastsnscbecchsasteaceuscdcodseatssesssceui sasacddassssceastcsiose 2 10 1 Profi S Bus network Example occcccccccscccccccccccccceecceesessssnneaeeeeeeeeeeceeeeessesessessaaaaeaeeeeeeeeeeeeeeeeeeeseeeeees Z 10 2 Examples of the Data Exchange in Profi S Bus cccccccccccesesssseeceeceeseeeeeessessesesssaaeaeeaeeeeeeeseeseeseees 2 ner VT Ea E EEEE AA E sais na sac A E E E E E 3 10 4 Hardware Settings master Slaves icccccccccccccccccccccceeceesesssnseaeeeeeeeeeeceeeeeesesessesesaaeaeaeeeeeeeeeeseeseseseeeneeees 3 104r Deine PCD parametelS sessies R 3 10 4 2 Define S Bus station number in the Network cccccccccccsssssssneeceeeeeeeessneeeeeceesesesnseeeeeeeeseees 4 10 4 3 Define communication channel of the Profi S BuS ssssoeeesosssssseeeesssssssreesssssssreeesssssssees 4 10 4 4 Download Hardware Settings in the CPU oo ccc ccccceeceessseeeceeeeeseeseeeee
253. time in HMS i e the time by our watches or PCD time is greater than or equal to the turn on time ONTIME The second will determine whether current time is smaller than or equal to the turn off time OFFTIME If both comparisons are verified by an expression an exclusive OR logic function the timer s digital output 32 DailyTimer must be switched on HMS gt ONTIME HMS gt OFFTIME re OO DailyTimer C ee Current time HMS 0 00 6 00 19 00 23 59 ONTIME OFFTIME Integer Is greater or equal to Binary Xor This algorithm offers one solution but it may leave some gaps What happens if the turn on and turn off time instructions overlap The following drawing demonstrates that the PCD output will be in the opposite state to that desired HMS gt ONTIME ee HMS gt OFFTIME Daily Timer Current time fj _ ly HMS 0 00 6 00 19 00 23 59 OFF TIME ONTIME PG5 WorkShop Chapter 3 Fuplal 22 09 04 PG5 WS K4 FUPLA E2 16 05 03 4 22 DAY NIGHT DAY NIGH PG5 WorkShop Chapter 3 Fupla 22 09 04 Saia Burgess Controls Ltd It is therefore necessary to complete our algorithm by adding a third comparison to determine whether the turn on time is greater than or equal to the turn off time The final solution is therefore as follows Outputs active by day HMS gt ONTIME HMS gt OFFTIME o ONTIME gt OFFTIME DailyTimer a Current time HMS 0 00 6 00 19 00 23 59
254. to a Microsoft Excel editor Values per line Ot ieee ee ee DIB 2 fa Quick Data Upload X Start End Units IY Registers O 4095 lo 2 Decimal Counters Timers 0 1599 lo isa M Flags i0 8191 E E Address separator TAE Qutputs Inputs 0 8191 lo st 71 Data separator TAB Data Blocks i0 999 fo 7399 Ea Help E Forl Os F Formatting IM Empty line between different data types Type and address at the beginning IY Type and address at beginning of line of line untithedO15 Joj x PCD DATA SDATS U1 2 100 Uploaded 26 09703 15 15 1 7 Empty line between different data types Address separator Data separator Values per line PG5 Workshop Chapter 8 Additional tools 05 07 04 Saia Burgess Controls Ltd 8 7 8 2 8 Save data with command line mode The Data Transfer tool can also be controlled with the help of DOS command lines This allows batch files to be created for the regular automatic saving of PCD data The data can then be used by a Microsoft Excel program or database Command line syntax SDAT Name_of_file dt5 data R nnn NOnnn A nnn D nnn Namee_of file Name of file to save restore Data R nnn l nnn A nnn D nnn Example Definition of data to save If no data is defined the file is restored to the PCD Format lt type gt lt start gt lt end gt
255. transitions are executed cyclically and stop the mo Mest movement we A step without a program goes directly to the next transition aa A step is only processed once A step is not cyclic The new PCD2 4 M170 PCD2 M480 and PCD3 support up to 6000 ST TRs and 96 SBs PG5 WorkShop Chapter 6 Graftec Programming 05 07 04 Saia Burgess Controls Ltd 6 10 Typical sequential block structures 6 10 1 Simple sequence The simple sequence comprises alternating steps and transitions There cannot be two steps or two transitions in a row 6 10 2 Alternative branching OR Alternative branching is a choice of one sequence among several possibilities Transitions are executed from left to right and the first transition to have a true condition determines which sequence is processed Alternative branching always begins with one step branching into a number of transitions and ends with an inversion of that structure a number of transitions channelled into a single step The Graftec editor supports up to 32 branches Above 32 branches the PCD calls XOB 9 see chapter 5 6 10 3 Simultaneous branching AND Simultaneous branching comprises a number of sequences that are to be processed at the same time Simultaneous branching always begins with one transition branching into a number of steps and ends with an inversion of that structure a number of steps channelled into a single synchronizing transition The Graftec editor supp
256. truction Timer values decrease only Counters can count up or down using the instruction INC DEC INC tT DEC 4 Timers and counters can also be used with binary instructions When a timer or counter contains a non zero value its state is High 1 When its content is zero its state is Low 0 Setup timers counters The distribution of the address range between timers and counters can be altered in the Software Settings This is also where you can change the time base of 100 ms S I Station EST PCD2 Software Settings Station Est Settings ige Online Registers Tests DBs Timer Counters Flags Advanced Timer Counter Partition and Timebase ER Hardware Set Defaults Last Timer E Counters begin after this address Timer Timebase li g 10 10 000 mes Double mouse click _ Dynamic Space First Last Address Address Used Free Timers 5 31 2 25 Counters i 400 ji 559 jo 200 Cancel Hela i Technical information The more timers you declare the greater the load on the CPU This is also true if you lower the time base Take this into consideration before you change the number of timers or lower the time base Example 100 timers will take about 2 of the CPU s capacity PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd Example Timer There is a high signal at input 4 On the rising edge of this signal a further high signal wil
257. twork File lon Watch Window File Su Description T Linked IY Open the file now Help Cancel N B Files of the type 5ww are never linked to a project no arrow inside the file icon The information in them has no bearing on any program build To open a 5ww file select it with a double mouse click or mark the file and select the File Open menu ie Watter Distribution PCD H a Settings Program Files gt watter control Fup min il Watter Parameters i Swim es Watter Parameters2 Siwy _ Listing Files PG5 Workshop Chapter 8 Additional tools 05 07 04 Saia Burgess Controls Ltd 8 3 2 Add data to a WatchWindow Drag symbols from the program or from the symbol editor into the Watch Window 1 Position mouse cursor in centre of symbol icon Press left mouse button EF Watch Window EL Hes w HE OFFTIME i OMTIME Daily Timer O32 Daily Timer Daily Timer HMS R 2003 Daily Timer POO Clock with curre OFFTIME R 2004 Daily Timer Switch off time ONTIME R 2005 2 Hold down mouse button and drag symbol into Watch window 3 Symbols with their comments and states values It is also possible to edit symbols directly in the window ESala Watch Window Watter Distribution w Symbol Address Value Module Daily Timer O32 1 Daily Timer Daily Timer HMS R 2003 113245 Daily Timer PCD Clock with curr OFFTIME R2004 182
258. umber Insert Pre Grouj Page Import E x Make Global Page Properties Global Symbols Local Symbols FE ox List a OFFTIME 9 Switch off time ONTIME l Switch on time Daily Timer Daily Timer HMS PCD Clock with c Define a name bol Hi for the group Local Place mouse pointer on marked area and press the right hand mouse Imported Symbol Component imported with its new symbols A e E E O Heating HMS E CE O eating HMS eating ONTIME eating QFFTIME PG5 WorkShop Chapter 3 Fupla 22 09 04 Tui aS ae S Ss ee eel Heating DailyTimer PG5 WS K4 FUPLA E2 16 05 03 Saia Burgess Controls Ltd 4 21 4 10 4 10 1 4 10 2 Turnonl Fbox Editing a first Fupla program Objective Now that the working environment is known the next step is to create a more complex program than the logic structures presented up to this point We propose creating a daily timer to control a digital output O 32 that comes on at 06 00 hrs and goes off at 19 00 hrs Although this function is available with the HEAVAC library we are going to reproduce it ourselves using standard FBoxes Method Before starting to program a method must be found that will behave according to our specification document and that can be implemented with the most elementary functions possible For this timer example we propose making two comparisons The first will determine whether the current
259. unctions needed for writing a program are selected from the FBox Selector then inserted into the Fupla program 1 Select the Add FBox button or Show Hide FBox Selector FEox Selector E 2 Open an FBox family Select an FBox 4 Position the FBox on the page being edited then press the left mouse button i Baler d 3 FBo Multiply Divide H Binary o Square rook o gt Absolute Ee 4 5 3 Edit stretchable FBox Certain FBoxes are stretchable which means that the number of links can be defined by vertical movement of the mouse 1 Select the Add FBox button or Show Hide lt a FBox Selector 2 Open an FBox family Select an FBox xj 4 Position the FBox on the page being edited then press the left mouse button 5 Move the mouse vertically to define the number of inputs 6 Press the left mouse button Application Ladder ad Dynamize Pulse command E Standard Application Ladder 4 4 5 4 Edit logical inversion 1 Select the Invert Binary Connector button E 1 2 Position the mouse pointer on the input or output link of a logic function and press the left mouse button 1 1 2 PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls Ltd 4 5 5 4 5 6 4 5 7 Dynamization The inputs of certain binary FBoxes have been dynamized They only take into account the positive edge of a logic signal These are identified by a l
260. units type R C O F DB C counters timers O inputs outputs First address start Last address end D H F Decimal hexadecimal floating point for R C DB units nnn value per line for R T C DB 1 256 default 5 nnn value per line for O F 1 256 default 10 nnn address separator TAB SPACE COMMA COLON default TAB nnn data separator TAB SPACE COMMA COLON default TAB sdat5 MyDatas dt5 RO 99 R12H R55F FO 999 F1000 R005 1010 PG5 Workshop Chapter 8 Additional tools 05 07 04 8 8 Saia Burgess Controls Ltd 8 3 Watch window The Watch Window is an excellent tool for checking programs and installations It allows all the data of an application to be viewed and modified online 8 3 1 Open the Watch Window The Watch Window is displayed by selecting the View Watch Window menu or with the Watch Window button Watch Window Itis also possible to prepare several different Watch Windows in the Program File directory of the project manager Add a new Watch Window File 5ww with the File New menu or with the New File button watter Distribution PCD2 H i Settings rogram Files cen New File File New File paci X File Name New Project watter Parameters Directory d PG5 Projects Chapter 4 Fupla examples pac File Type Grattec File stc Fupla File Fup RIO Network File rio FS Network File prr DP Network File dp LON Ne
261. up CPU Number fo Cancel Connection S Bus USB S Bus Station fi 0 L CPU Number b eee Number of retries 3 S Bus Station M E A o Help Number of retries 3 S Bus Station j2 Auto PGU Number of retries 3 To make a USB communication with each PCD the Online Settings should be configured with USB channel and S Bus station number PG5 WorkShop Chapter 10 Profi S Bus 01 12 04 10 18 Saia Burgess Controls SA Testing the functionality of the Gateway Function H Slave station C PCD3 M5540 Station 12 Activate one of the CPU Master B or Slave C of the project and Go Online for testing the communication with the station If necessary the Online Configurator allows you to verify the station number online It is also possible to download the program in the active CPU and to test it staying always connected via USB cable to station Master A H Master station B PCD3 M5540 Station 11 To communicate with another network station activate the CPU and Go Online Remark With the Gateway feature only the slave S Bus station number is defined the Profi S Bus station number is not taken into account because the telegrams are addressed to all Profi S Bus stations Broadcast 10 7 3 Configuration of the Gateway Slave port supplementary slave Supervision _ PG5 _ PGS AM i i m Supervision il Supervision Serial S Bu Ether S Bus Gateway slave port Gateway F oad Gateway Maste
262. us slave station Source destination station Defines the number of the S Bus slave station Source destination element Defines the type of the data to write or read from the slave PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 11 8 11 5 6 Saia Burgess Controls SA Source destination address Defines the start address of the data to write or read in the slave The number of the exchanged data values depends on the number of the inputs or outputs of the SEND or RCV Fbox Diagnostics If the program is Online a green or red LED is displayed at the top right of the SASI SEND or RCV Fbox Green indicates that the data transmission is OK red indicates an error Correct functionality All the Fbox are green data exchange are done correctly IP Channel o Bus blaster IR Clr Err ref IP Channel END i ref IP Channel ROY E ref IP Channel T ref IP Channel Rev Rev No data can be exchanged in the network SASI Fbox SEND and RCV are red no data can be exchanged in the network IP Channel S Bus laster IP Clr Err ref PF Channel EMD ref IP Channel ROWO E ref IP Channel END ref IP Channel pev pev PG5 WorkShop Chapter 11 Ether S Bus 01 12 04 Saia Burgess Controls 11 9 Possible corrective actions in master or slave station e Verify the Hardware Settings e Verify that the Hardware Settings have been downloaded into the PCD e Verify that the
263. ution of cyclic programs To meet this requirement sequential programs are located inside one of the 32 available SB structures that can be called in each program cycle A particular feature of SBs is the fact that when a sequential program located within the SB is waiting for an event the PCD will set aside that SB and continue processing the cyclic programs The rest of the SB will then be processed during the next program cycle Sequential structure aftec Editor Chapter 6 PULSE sfc gt B O x Miem Project Online Mode Block Page Help Cyclic structure calling SB 0 De M S ewe Oot h cop Eo a oS View Page Mode Resource Project Online Options Set the counter St F FSB 03 art O HEE N E E sequence Wait tor the start3_p signal SB name or symbol Function User definable Call SB End of SB sequence Wait on other Seccond SB name and number Counter 0 f F 4 a Ready SB 0 PULSE E The new PCD2 4 M170 PCD2 M480 and PCD3 support until 96 SB PG5 WorkShop Chapter 6 Graftec programming 05 07 04 Saia Burgess Controls Ltd 6 3 6 3 1 6 3 2 Cyclic Blocks holog fup COB 0 Page Horloge 1 3 View Page Mode Resource Project Online Options Help HEE he e X 40 fa 5 Cycle starts a l mp A Cycle ends here r txj m s a n Q H H Cyclic programs Programs presented p
264. xel we strongly advise use of the Tab separated Text file format txt You will obtain better results than if you use the Exel file format option x s Export Symbols 2 x Save jhi E Fupla examples de t re El Filename AND_GATES2 Save as type Tab separated Text Files txt Cancel Zs PG5 WorkShop Chapter 3 PCD Resources 05 07 04 3 32 Saia Burgess Controls Ltd Look in i Tools Piss Projects Programm Files E A MD _GATESZ txt ew ee Files of type Text Files prns tet csv Cancel Start up Exel and open the text file with the exported symbols F1 Microsoft Excel AND_GATES2 txt B 5 x File Edit View Insert Format Tools Data Window Help la x Arial 10 B F u AT SY MBOLNAME i eae TFET 1 EYMBOLNAME ITYPE ADDRESS COMMENT 4 2 input Input OU And gate input O 3 Inputt Input 1 And gate input 1 4 Cutout Cutout 32 Result of input 1 AND 2 5 Input Input 2 And gate input 2 E Inputs Input 3 And gate input 3 7 COB 3A8BBC83 COB MIA Hh AND_GATES2 Jal Ready a a a a Sy PG5 WorkShop Chapter 3 PCD Resources 05 07 04 Saia Burgess Controls Ltd 3 9 17 Importing symboles It is also possible to write a list of symbols with the Exel editor and import them into a PG5 project To do this edit a symbol file as shown below and save it in Text Tab delimited format txt F4 Microsoft Exce
265. ymbols must always be connected to an FBox output If not an error message will result Page 1 Error 53 Incomplete network PG5 WorkShop Chapter 3 Fupla 22 09 04 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls Ltd 4 7 Editing Fupla pages Page with its comment Page Navigator x ER CallBax Show page LOB MainPrograrm Add Block Page 1 Insert Page Delete Del A COE ModemHandling Page 1 SM5 Block with its comment Move Up Move Down Fage 3 CallBack F BE TEETE n Page 1 New page The Page Navigator window shows the program s blocks and pages Each Fupla file can hold up to 200 pages grouped into blocks COBs PBs FBs or SBs But Fupla is faster if you don t have too many pages in a single file By default pages are put into Show Hide a COB type block For more detailed information about blocks and their use please Page Navigator refer to chapter 5 of this document 4 7 1 Insert page Open the Page Navigator window mark the reference page and select nsert Page from the context menu Insert Page It is also possible to insert a page after the current page with the nsert button or the menu item Page Insert After Page Insert Before 4 7 2 Delete a page Open the Page Navigator window mark the page to be deleted and select Delete from the context menu 4 7 3 Page navigation It is also possible to navigate with the Go to Previous Page and Go to
Download Pdf Manuals
Related Search
Related Contents
Manual - D and S Vending Inc. Frymaster CT16 User's Manual BAZZ PR3311WH Installation Guide Ni-SHWAK/WP V2 Thomson DVD player DTH252 5681, 5683, 5684, 5685 Seagate 7200.11 Computer Drive User Manual 仮訳(PDF:864KB) sikatop 107 seal [Converted] Copyright © All rights reserved.
Failed to retrieve file