Home
User Manual - sbc
Contents
1. Public symbol files with an extension sy5 x s and rxp are edited with the program corresponding to their extension and saved in the original file format PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 12 Add symbol definition file oe Station0 PCD3 M5540 ge Online Settings a E6 Configuration a i Build Options Ctrl M Aoki Files Paste Ctrl V Delete All Files Print Ctrl P Symbol definitions Excel file xls added 22 Station0 PCD3 M5540 gt hae Online Settings i Arial 10 Saia Burgess Controls AG File Edit View Insert Format Tools Data Window B fu ban E6 Configuration fe SYMBOLNAME D been El Build Options PE ADDRESS COMMENT Program Files Group1 Symbol1 0 My Comments E Start_Check sre Group1 Symbol2 1 My Comments 4 Group1 Symbol3 2 My Comments E Start_Seq sei Group1 Symbol4 3 My Comments Group1 Symbol5 Group2 Symbol1 Group2 Symbol2 Group2 Symbol3 Group2 Symbol4 Group2 Symbol5 animnm oaoa XIs file containing 4 My Comments 0 My Comments 1 My Comments 2 My Comments 3 My Comments 4 My Comments symbol definition is added to the device After Build Public Symbols Defined in Excel file are available in project under All Publics Filter and they can be used in programs Symbol Editor M al Symbol Name Address alue Comment Actual Address cyAlPubics ROOT o S S S emee foo S S y o
2. 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 parameters 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 parameters IP Node Defines the node number of the Ether S Bus 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 User Manual Chapter 13 Ether S Bus 10 12 13 13 8 13 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 Al
3. Has volatile Flags Last Volatile Flag Double mouse E Dynamic volatile Flags 2500 2999 click First 2500 Last 2999 O Dynamic Nonvolatile Flags 7500 6191 First Fou Last o191 PG5 User Manual Chapter 4 PCD Data 10 12 13 4 8 4 2 2 Saia Burgess Controls AG Registers Registers can contain signed 32 bit integer or floating point values Registers are useful for arithmetic operations such as processing analogue values particularly in measurement and regulation applications All registers are non volatile which means that their values are not lost when the PCD is powered off In Fupla the wires or lines connected to registers have different colours depending on the data type yellow lines for a floating point values and green lines for integer values An integer value cannot interact directly to a floating point value one of the values must first be converted into the format of the other Example The following example adds the integer 113 to the contents of register 12 and puts the result into workspace register 54 R54 R12 113 Instruction list program Fupla program COB 0 ADD R 12 K 113 R 54 Fbox Integer Addition ECOB The K indicates that 113 is a constant not another register K values are unsigned values from 0 16383 To use a negative or larger value first load it into another register with the LD instruction or Integer Constant FBox and add the registers Dynamic regist
4. 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 Instruction Guide 26 733 or on the PG5 help screens To obtain specific help about an instruction from the IL editor write the instruction put the cursor on it and press key F1 General help is also available with the menu Help Instruction List Help The accumulator ACCU The accumulator is a binary value whose state is set by binary instructions and a some 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 which also allows the accumulator to be set to the value of a status flag see description of status flags Examples ACC H Forces accumulator state high ACC L Forces accumulator state low ACC C Inverts complements accumulator state PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 14 9 4 2 Binary instructions Examples ACC H Forces accumulator state high ACCL Forces accumulator state low STH 14 Copies state at input 4 to accumulator 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 Examples ANHI5 Reads accumulator state and executes logical AND function with state
5. Programming a step turning on an output and starting a timer This step turns on the output and loads the timer then continues to the next transition to wait for the timer to reach 0 Fupla program The timers and counters in the Fupla standard library are not designed for SBs they are designed for COBs which are executed cyclically Instead you must use the functions in the Graftec family which are specially designed for SBs These can be loaded in a step and interrogated later in a transition Load Timer FBox Graftec Load Timer Binary High Three pulses Turn the output On IL program SET Three_pulses turn on the output LD One_S_ Timer start the timer Pulse Time Waiting for a timer Fupla program Fbox Graftec Tempo coul Graftec Fin TR 1 Visit 1 Timer IL program Set the ACCU high if the timer has reached 0 STL One_S_Timer PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 22 8 5 8 8 5 9 8 5 10 Saia Burgess Controls SA Turning off an output when a timer reaches 0 Step and transition 2 are similar to step and transition 1 except that output Three_pulses is set low and a different timer is started Fupla program Tink FBox Load Timer Graftec Load timer Binary Low Three pulses Turn the output ott IL program RES Three_pulses turn on the output LD Pulse Timer load the timer Pulse Time Note For steps and trans
6. Saia Burgess Controls AG Importing templates Templates can be re used in any projects Select the template in the Template Selector window and drag it onto a Fupla page to insert the sequence of pages with their FBoxes links symbols adjust parameters etc into the file A dialog box is displayed which allows the changing of names and addresses of imported symbols and other parameters This functionality is similar to a macro or General symbol List FBox List Adjust Strings Insert Advanced Number of Copies E F Set intemal Variables to system defined Base Index E Reset page conditions Before current page After current page Page Range I N Page Name Description W 1 HotWater_T2 Circulation Number of Copies Base Index If several copies of the same template are needed define the number of times the template will be inserted and the base index which will be appended to the symbol and group names Before After current page Imports the sequence before or after the page currently active in Fupla Set Internal Variables to system defined Some FBoxes have Adjust Variables whose name is defined by the user or by the system Static symbols This setting allows you to keep the addresses and static symbols defined by the author or to restore dynamic addressing and internal symbols by default Reset page conditions A Fupla page s Properties window allows the definition of an execution Condition for
7. System Oil Purnp sre Ln 1 Coli INS OFFLINE Zz Predefined filter System displays the all system symbols present in current device Symbol Editor 1x Eg ES ji KD Cu Find Type a substring to find CK Symbol Name Type Address value Comment Actual Address Tags Scope ega o o o HECE crue ooo S T P D eae ere a E ma Fe Buiddae const oo000000 Buid date symm 0 Paie El o Budte CONST omoo Euldtmehhmmss J0 Pumie Ee a a a a Re FirstOmCountc i00 Fist dynamic Coun 1400 Pubic Eo Fidos 0B a00 JE Fret dnamic DB a 3500 Pubic Ee Fisoo F s00 Fist dynamic Fiag 7500 Pubie Ke FistOuRenDB08 RAM e600 Fist dynamic RAM 6600 Pubic Ee Fistan TEXT RAM 5000 Fist dynamic RAM 500 Pubic Re FirstOwreaite 200 Fist dynamic Regi 200 Pubic T C Ee Fibo re 3000 Fist dynamic Tew 3000 Pei n 4 F System symbols All Publics System Parking lot sre 1 1 If the device contains sy5 file filter with File Name will appear in Navigation tree and all symbols in sy5 file will be displayed in the grid Symbol Editor Symbol Hame AddressValue Comment Actual Address Tags H Symbols sy5 ROOT i e Fe Subd R o ayeme o O e Ee subi Rtn Comment o O Pe Ee Smbi2 Ro o aome 2 O e HEosm R a atome o O e Ee smb R a ayeme a O Po Eesm RO o aomen S Symbols sy5 All Publics System Symbols syh X Parking lot sre H E Al Publics PA al Sy
8. 192 166 1 176 5 Bus Sth 16 Activated Device SUSYOS Center Management PCOS M5340 192 168 1 108 S Bus Str 2 Activated Device SUSV12 Zentrale Coop OG PEDA M3120 192 168 1 112 S Bus Sth 12 Activated Device SOSVO Ruckkuhlung Dach PCDS M5340 192 168 1 107 S Bus Str Activated Device Central Sud PCOSMSS30 192 168 1 105 S Bus Stn 5 Activated 0 Errors 2 0 Warnin D0 Messages Clear Qs q e E eg ay CAP NUM BUILD REQ OFFLINE The Saia PG5 Project Manager provides a global view of all the devices and files in a single project All operations are started from here For example adding new program PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 3 files to the project opening files to write the programs configuring the hardware building and downloading the programs into the devices backup and restore reporting errors and warnings when building the program etc The Project Tree window shows a hierarchical representation of each device and its configuration and program files To display this window use the View Project Tree menu command The Messages window shows general information messages and error and warning messages generated when building a program Display this window with the View Messages menu command The other View windows show lists of symbols and media used and the program structure They also provide a symbol cross reference feature Th
9. 5 Bus USB PGU z E Device Configurator i Build Options Seo Program Filey E House Af ee Ctri N Listing Files Add Files Documentati Paste Ctrl V Delete All Files Print Ctri P Alternatively you can click on the New File button on the toolbar or use the File New menu command In the New File window the name and type of the module are defined two very important items of information Several 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 graphical programming language New File Example Fupla LO S mmama File Name Program File Name Directory C Users Public SBCSPG5 27 4Projects S amples PG5 User Manual Chapter File Type Hola File Fup Graftec File sfc lnstruction List File src Profibus DP Network File dp Profi S IO Network File 310 LON Network File lon Watch Window File Dy Select the file Type Description Check Linked Build for This Exemple Linked Built Open file now PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG 1 11 1 3 6 Opening an existing file If the folder already contains a program file the file can be opened as follows In the Project Tree window open the Program Files folder and double click on the relevant file Alternatively right
10. 7 12 Saia Burgess Controls AG 7 4 Exception Organization Blocks XOB Exception Organization blocks are called automatically when a particular event or error occurs Some hardware and software events are handled by XOBs The events themselves cannot be modified by the user but the code inside the XOB which handles the event can be programmed Example 1 When the PCD is powered it zeros a register which is used to count pulses INB1 ata maximum frequency of 1kHz XOB 20 is called whenever INB1 goes from low to high Cold start 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 event Editor Interrupt inputs XOB 16 XOB it returns to the same point in xl the program before the event occurred a O Once the PLC has finished the DE COB 2 Editor Interrupt inputs PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 7 4 1 Example 2 Turn on the PCD and take out the battery the Error LED will light up If your program contained XOB 2 see table the LED would not have come on and XOB 2 would have been executed instead XOB numbers and descriptions XOB If an error occurs and the handler XOB has not been programmed the Error LED on the front panel of the PCD is lit and the program keeps running If an error occurs and the handler XOB has been programmed the Error LED sta
11. 8 2 Saia Burgess Controls SA 8 7 3 CPC TING AGES da a a AT 26 8 7 4 EX PAMCINS A DAC ee E ET A 26 8 7 5 BOKN NE O en AE agen anenusean naa saasosasaensauenaciseres 2I 8 8 Grahectemnplal eoira ala eee as eh sae os ata aSa eaaa seateceusectuetieese 28 8 1 1 Cream AUC MP AUC octet tani ve a nari nt ui naan adasbos tat atau N N 28 8 1 2 TP ORCEMO Temp ae E O E pss ed E E IRE EE EO EEO E E E EE TEO E EET 29 PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 3 8 Graftec Programming Saia PG5 Graftec is based on the French Grafcet standard NF C 03 190 and IEC 848 but it contains a few differences and improvements It is also known as Sequential Function Chart SFC Grafcet is independent of the technology used for its implementation It standardises the representation of sequential processes using a small number of graphical symbols governed by a few simple rules A Grafcet diagram is composed of steps which define actions and transitions which check for events A sequence consists of a succession of alternating steps and transitions A step is not executed until the preceding transition allows it The Saia PG5 Graftec editor creates all the instructions necessary to generate the diagram within a Sequential Block SB A Graftec application is programmed in two stages The creation of the step transition diagram which describes the sequential process The coding of the steps and transitions
12. Automatic formatting of instruction lines If the Auto Format while typing option is enabled whenever Enter is pressed at the end of a line the line is auto formatted using the user defined column widths Options are defined from the menu command Tools Options If auto formatting is off lines can be marked and formatted using the Tools Auto Format menu command Creating an organization block IL file for a small program Start of COB Sequence of No supervision time instruction Example of logic equation processing within block End Of COB 0 The Saia PCD programming language is structured 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 i
13. Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 17 Example Gateway USB Profi S Bus a PG5 Supervision USB PCD3 M5540 Station Master B Gateway slave port PCD2 M5540 eae Profi S Bus address 21 Station Master A Gateway as BULL S Bus Station Number 11 Profi S Bus address 20 l S Bus Station Number 10 Gateway Master port Profi S Bus PCD3 M5540 Station Slave C Profi S Bus address 22 S Bus Station Number 12 Onboard Communication properties of the Master A station O Profi 5 Bus Master Gateway Use Profi 5 Bus For Gateway Yes First 5 Bus Station Profi 5 Bus O Last 5 Bus Station Profi 5 Bus 253 Response Timeout T 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 ZE Online Settings Master station A Select the channel E S Bus USB Channel Type i mined t Scan PGU No lt I don t care gt 3 S Bus Station Number 10 Scan Auto Station No 3 Usb Serial Number lt I don t care gt Refresh USB list Scan Number of retries 3 lt I don t care gt in POU mode ignoring the Bus To make a USB communication with each PCD the Online Settings should be configured with USB channel and S Bus station number PG5 User Manual Chapter 12 Profi S Bus 10 12 13 12 18 12 7 3 Saia Burgess Controls SA
14. Device 1310180803 zip Destination PCO with Flash memor Daily timer PODS M5540 Y Comment User Sala Burgess Controls AG Project Chapter 6 Fupla examples Device Daily timer Created 18 10 2013 08 03 Backup Options 5 All files S Net Device Files and Plugins O Allfiles escept listings and docs Source files only Help o I Cancel Backup Project or single Device By default the active device is selected but this can be changed to create a backup of the entire project Name of Backup File The name of the backup file to be created To be stored in the PCD s Flash file system it must not be longer than 23 characters including the zip Destination PCD with Flash Memory Shows the PCD to which the ZIP file will be downloaded Comment Free text but by default it is filled in with a comment containing the user name project and device names and the date time You can also add a revision number and other details here Backup What Selects which files will be backed up It is not necessary to backup all files only the source files are important When OK is pressed the ZIP file is created then the FTP Downloader is started PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 2 FTP downloader rig Backup Source To Flash Complete FTP connection parameters and target directory then press the Backup but 4 FIP Connection Password rootpasswd Save P
15. Drag and Drop Local Symbol Once the symbols are defined in symbol editor it is possible to drag and drop symbol to program editor and use it in program without actually typing the name of symbol 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 Program editor and release the mouse button The symbol chosen is automatically added at the place indicated by the mouse cursor Example 1 Position mouse cursor on symbol press left mouse button and hold down A KI Cu Find Type a substring to find 7 Type Address alue Comment Tags JAPakingltsc OOO O OOo o S O gt Apatrmmastentaes Flag detects the rising edge o Parking later All Publics System sth gt sth DynamiseCar_Leaving Release mouse button Drag mouse cursor into IL editor Example 2 Without releasing mouse button drag the symbol into the editor PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 21 Drag and Drop Public symbol Public symbol Emergency Defined in O _Pump src Symbol Editor 1 x li KJ Ca Find Type a substring to Find a oO Symbol Name Address alue Comment Actual Address F Oil_Pump stc ae Normal Aun sss Public Public Local fae os od amp Ci Hish o
16. Eesm p jo omes o O e Eesm poo ommes o O Pe Eesm o o hommes a o Pe Eesm a Motom a O Pe Bi GAHA k Ca g Find Type a substring to Find Ce 0 fe Re Symbol a homes a OOO Pe BES E E a T I osme a ooo aoe o O e E a S SSSSS SSSSC d Po O Hossmo a p iwm 2 OOO Pe Ke smb a b imwin 3 Poe Ee symbol a a awom a O Pe Start Check sre System All Publics PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 13 5 2 8 5 2 9 5 3 5 3 1 Define symbols for the communications networks Sharing data between two different PCDs is more complicated than sharing information between files Network connection is required between the two PCDs This network connection can be designed in our network editor which to date already supports SBus Profibus DP and LON networks Network symbols can be used in programs to transfer data from one PCD to another These symbols appear as Public symbols Symbols definition in Common file When same file is needed to be used in many devices it is added to Common Files folder in Project These files can be program files like src fup sfc or Public symbol files like sy5 x s txt rxp etc Public symbols defined in program files or Public symbol files which are placed in Project s Common Files Folder can be shared with several devices Once the common file is referenced to current device all Public symbols defined in common file
17. Example Controlling the axis of a machine with a motor Load destination speed direction and start the mouvement Stop the mouvement We define the destination position the speed and the direction of the movement then start the movement These tasks are executed once so they are placed in a step Next we monitor the movement and wait for it to reach the destination position The actual position is compared with the destination position This task must be done repeatedly so it is placed in a transition When the destination is reached the transition exits with the ACCU or the ETR FBox high so the transition is fulfilled and the next step is executed The next step stops the motor at the destination position This task is also executed once so it s placed in a step Note A step without a program passes control directly to the next transition A step is executed only once it is not executed periodically like the transitions The entire Graftec structure starts with an Initial Step represented by a square drawn with a double line This is the start of the sequential process which is executed the first time the SB is called after a cold start or power up PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 8 Saia Burgess Controls SA 8 2 4 Properties of steps and transitions Selecting a step or transition in the Graftec structure with the mouse displays the following information in a window if it has be
18. F 127 m Cal Misg DataLog Rlarmel temperature too high SH R 0935 Symbol Editor EE EB APE S T Symbol Hame Type Address P Cancel E Untitled fup ROOT 4 p con feet o M eAamed TERT 00D Pubic H o o o Coo A All Publics System Untitled fup i Data bloc definition with the symbol editor z DE Edit DataLog DE RAM 4000 w Defmition Size mooo nit DE Content i Daaa C oa fve a es Symbol Editor E EZ Symbol Hame Help Create Clear UE Cancel H Untitled2 fup Mb i amp COBO COB Local F Datatos op RAM 4000 Pie e p a All Publics System Untitled fup PG5 User Manual Chapter 4 PCD Data 10 12 13 Saia Burgess Controls Ltd Summary table Description Media Operand Binary Numeric Volatile Inputs l 1 0 8191 0 1 Outputs O 1 0 8191 0 1 Flags F 0 16383 0 1 No Registers R 0 16383 2 147 483 648 2 147 483 647 No 9 22337E 18 9 22337E 18 Constantes K 2 147 483 648 a 2 147 483 647 9 22337E 18 a 9 22337E 18 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 Texts X 3 0 3999 String of max 3072 characters No 4 4000 Data Blocks DB 3 0 3999 Max 382 values No slow access 4 4000 Max 16 383 values fast access 1 Depends on PCD model and its fitted I O cards 2 The actual number of
19. Fupla program xf Group Symbol Type Addressjvalue C BL_3DEDFF47 C z Cj WaitTime Selected Wait time for the blinker mjc oo Q 00 MM y Select the blink output speed ShortTime Define the short time in the regis pery faitTime Cj LongTime time in the register ait Time T output Output JPB ShortTime Cj ShortTime alue Constant 5 C LongTimevalue Constant 15 1 55 PR ShortTime MEREEN E ioj x ShortTimevalue 3 l H H Eos H E H L A System 52 Global Cligno Aa Cligno fup PB Fup Sala Pos Fupla Editor TE PR LongTime MAEAEA 5 Long Time y alue a If the state of digital input Condition is low 0 then PB ShortTime is called which loads timer WaitTime with constant ShortTime Value 5 If input Condition is high 1 then PB LongTime is called which loads timer WaitTime with the constant LongTimeValue 15 The WaitTime timer defines the length of the delay between the changes of the blinker state FBox Blink To ensure that the WaitTime timer is initialised after a cold start the Blink FBox must be positioned after both the PB calls If the program is edited with the Fupla editor create a new block with the menu command Block New and enter the block name from the block s Properties window The Call PB FBoxes can be found in the Block Call family in the FBox Selector window PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burges
20. Selecting one of the I O slots displays the relevant configuration parameters in a properties window Configuration of the I O slots is not necessary if the media mapping is not supported by the PCD or not activated in the Device s properties Properties of binary I O Enables definition of the configurations required to elaborate the media mapping If the Media mapping selection is not displayed this means that the Device s firmware selected under Device does not support this functionality Slot 0 PCD2 E110 8 Digital Inputs 24VDC 4 General Base Address 0 4 Power Consumption Power Consumption 5V mA 24 4 Media Mapping Media Mapping Enabled No Media Type Flag EE Number Of Media Base Address Base address of the module 0 16 32 etc Enabled Media Mapping Cyclical update of the media mapping register or indicators with the input output values present on the Device s slots Media Type Type of medium used to backup the input or output values For analogue I O the type is always register For binary I O the type is indicator by default but can also be register Number of Media Number of media required to backup the values For example a PCD3 E110 digital input module requires 8 indicators Media Mapping The new Media Mapping view shows the symbol names for all the I Os which are mapped to media Registers and Flags This view can be shown or hidden using the Media Mapping command under the
21. Supervision ili ii Interface USB ou S Bus modem Gateway Profi S Bus a The Gateway function can a MeF as an PEE between a communications network and the external world For example to make modem or USB communication interfaces PG5 User Manual Chapter 12 Profi S Bus 10 12 13 12 16 Saia Burgess Controls SA PG5 PG5 Supervision Supervision Supervision iu ii il il i T remm Jan Wn ltt meyer tous sap 1 Gateway OK apy i 2 parallel Gateways Profi S Bus ri ibis 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 Au E S Bus Profi S Bus TCP IP If necessary a Gateway can make a bridge between to several communication sub networks 12 7 2 Configuration of the Gateway PGU function It is easy to configure the Gateway function it doesn t need any program only some parameters in the Device Configurator Generally only a Gateway Slave Port and a Gateway Master Port should be defined then all is automatically supported by Gateway function 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 PG5 User Manual
22. Symbol Hame Type Address alue Comment Scope ieaz oon o o Fewo coe fm DalyTimer 82 Daily Timer Local a ee Daily Timer If only the symbol name is entered in the Fupla page connector it is added to the symbol table with a default type and the details can be filled in later PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 3 2 Saia Burgess Controls AG Symbol definitions A symbol definition does not always need both a name and an address but it must have aname and or an address This gives three types of symbol definition Absolute address only Symbol Name Address alue Comment Sa kasaa ui EE Ee eee 82 Daily Timer Local The data is defined with only a Type and Address e g 32 and an optional comment Absolute addresses are OK for small test programs or during development but a final program should always have useful symbol names for all its data Full definition Untitled fup Ror ooo a S Ee DaivTimer o e ____ DapTimer Loo _ The Symbol Name Type and Address are filled in with an optional comment Dynamic addressing Symbol Name Type Address value Comment Scope H Daily Timer fup ROOT A F RPC Cock w jLocal If an actual address is not defined the program build will assign an unused address from an address range defined from the device s Build Options see Project Manager The Type must always be defined Dynamic addressing can be used for fla
23. memory management Please wait for about 1 minute after they stop flashing before powering off the PCD or continuing to work PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA Contents CONTENTS cee cate ec et een re eee eee we secon eeu etree see eect ed avccsaccsceavecaxceeesaneateees 1 3 DEVICE CONFIGURA TOR eiiim niian ai 3 3 1 Scanning the Device parameters to the configurator ssssssssseccecceccccccccccssosssssscccceccocccsssssssssee 3 3 2 The main view on the configurator sssseverscsscveccesevezesssusscoeenseacccanecaasenseseagvesccseoveecewececsaseeveesrssapeuee s q4 3 3 Loading the configurator parameters to the Device sssssssssccccccccccccccssssssssscscccssccoooes 5 34 Deyice PTO CUO Se scsccca ce cacs cease ersalevecousecevecsaasorsssesssvarsctsocssess seus ssesgusseeeuceseleseoousenevavssasessshess Ea 6 3 4 1 ICA OI Ya E EAE NE A uacnanen A E E E E 6 3 4 2 PNO ane RT N EE E T E EAA E E E E NA TOA 7 3 4 3 D E E E E E E 8 3 4 4 POW CF SUP eoa E E EE Beep aabieeusekeauaaebaceie sedans E 8 3 5 Serial S Bus COMMUNICATION properties sssssssscccccccccccccccssssssssssssscscccscccccccssscesscssssssssssseees 8 3 5 1 Full protocol PGU Serial S Bus PGU slave for series line n0n00oonnnnnssseeeennnsssseeressns 9 3 5 2 Public Line S Bus Modem PGU slave for a modem line eesseeessseesercessreresrrrrssrcresrereseeees 9 3 5 3 Serial S Bus Master Gateway
24. slot Type M1 M2 Insert Ctrl I Onboard Communicatior Delete Del Location Type Move up Ctri U Onboard RS 232 R35 4 Mowe down Ctrl D eral purposi Onboard RS 465 S N genera purp Onboard USB The properties window is shown with the Properties context menu command Properties a or general Here the memory size of can ai a be defined Device PCD2 M5540 255age eb Server Missing password in one a abate pee Firmware Version From 1 16 00 _ 4 Memory F User Code Text DB Extension Texi 1024 KBytes RA User Code Text DB Memory Backup On File System Extension Text DB Memory Backup 256 KBytes The configuration must always be downloaded into the PCD using the menu command Online Download Configuration Download Configuration Device configuration file name Download the configuration Memory Allocaton the user program is deleted S Bus Serial Modem Profi S Bus TCP IP Gateway Optic Password PG5 User Manual Chapter 1 Quick Start 10 12 13 1 10 Saia Burgess Controls AG 1 3 5 Adding a new program file PCD user programs are stored in one or more files There are several ways of adding a program file In the Project Tree window select Program Files click the right hand mouse button to display the context menu and select New new file 5 Example Fupla PCD2 M5540 S Bus Stn 0 s E h Properties gy Online Settings
25. 23 7 1990 Day 1 Hardware Info Time 18 31 43 Week 30 History Status Aun Hee J _fun_ Sep Reser fst Online Settings Communications parameters for PCD connection PCD Type The connected PCD type Version Version of firmware in the PCD Program Name Name of the program in the PCD device name Date Date from PCD s clock if present Time Time from the PCD s clock if fitted Day Day of the week 1 Monday 7 Sunday Week Week of year 1 52 Status Operating mode Run Stop Halt Conditional Run If the information shown in red is not present or an error message dialog box appears it means that the Saia PG5 Online Configurator could not communicate with the PCD Please check the following e That the PCD is correctly connected with the PCD8 K111 or USB cable or to the network and it s powered up e That the communications parameters are correct by pressing the Online Settings button Device Configurator Uploads the configuration and opens the Device Configurator Refer to the Device Configurator documentation PG5 User Manual Chapter 2 Project Management 10 12 13 2 32 2 10 2 History 2 10 3 PCD History Saia Burgess Controls SA The History window shows all the hardware or software errors which have occurred while the PCD was operating History messages are always added to this list even if the associated XOB handler is programmed Examine this list if the PCD
26. ESR oo a oorewoasatheeny floa i By Nurnber of free_slots a Counts the number of free p 1400 fo Local Fe Dynamise incoming cacsignal F Fleg detects the rising edge 7502 toca tS Dynamise_leaving_carsignal F Flag detects the rising edge 7503 Local 4 Parking latsrc 8 All Publics System You can also sort your symbols in List view Switch to List view and click on one of the column in order to arrange them by Name Type Address or Comment Symbol Editor E EE i HAHAA KD Ca Find Type a substring to find Symbol Hame Type Address ale Comment Actual Address Tags Scope Eq Test Symbolisme Ror o o o ND py WasePump Jonour a a a a Ee on o e Sitch On Pump ee a Fe ON Dean Kk s00 ita eee He Services Hous RO a Select eRe Cond Run Machine in Conditional Run Local re Nomal Run EB Machine in Normal Run cal Group List LS View All Publics System Test_Symbols erc Symbol Editor Symbol Name X E T Test Um ols 4e ci Tee e aa ecu ats ne 5 Mormal_Aun OoOo Booo o Machine in Normal Run Caws of Seanina 00 Start Delay He WastePunp Services Hous a i All Publics System Test Symbols sre PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 30 Saia Burgess Controls AG 5 3 15 Importing symbols from EQUATE statements If you have old PG4 3 Instruction List files containing EQU or DOC s
27. PCD Data 10 12 13 Saia Burgess Controls AG Saia Burgess Controls Ltd PCD Data This section gives and overview of the types of data which can be used in the PCD programs Inputs Outputs Flags Registers Counters Timers etc their uses and address ranges PG5 User Manual Chapter 4 PCD Data 10 12 13 4 3 4 4 Saia Burgess Controls AG 4 1 Hardware Data Programs contain many instructions to read write and modify many different kinds if data The data which allows the program to interact with the outside world is accessed via the controller s hardware 4 1 1 Digital inputs and outputs Inputs and outputs represent binary values one bit from the outside world Inputs show the states of switches pushbuttons proximity detectors sensors etc Outputs can activate valves lamps motors etc Outputs can be written and read Inputs can only be read Inputs and outputs are fitted by plugging I O cards into the PCD s module slots The start address of the I Os on the card is defined by its slot position Example The following example turns on output O 64 if inputs I 1 and I 2 are both high Another way to show such functions is by using a boolean equation O 64 11 AND I 2 Instruction list program Fupla program COB 0 STH Il ANH I OUT O 64 ECOB Fbox Binary And PG5 User Manual Chapter 4 PCD Data 10 12 13 Saia Burgess Controls Ltd 4 5 4 1 2 Date and time A real time clock RTC is
28. Saia Burgess Controls Ltd 10 15 10 2 9 The button Export on Export Data dialog saves the trend data in to a file User provides the name and location to save the file Symbols with a small and big magnitude on the same trend If symbols values present on a trend have a different magnitude the symbols with a wide variation use all the vertical scale and the symbols with a small vertical magnitude use only a small fraction of this vertical scale There is now two possibilities to improve the visibility of the values 1 A Trending scale factor can be defined in the properties of the symbol It allows to amplifier or reduce the magnitude on the symbol values in the trend The user must then take into account this factor to read the vertical scale in order to get the right value 2 A second scale second Y axis can be add at the right of the trend Select the symbol in the watch window grid to display the properties window and assign the symbol to the left or right scale with the properties option Trending Axis Note The trend is always better if the vertical scale is automatically adapted to the symbol magnitude Select the trend properties and set the option Left Right Axis Auto adapt Y Scale with Yes 10 2 10 Trend with several binary symbols If the trend of several symbols has the same magnitude on the vertical scale it is possible to define a offset that will be add to the symbol value This offset is usua
29. View The addresses for the input and output symbols can be dynamic or absolute It is no longer necessary to define consecutive addresses in an array of symbols except for RIO media or Firmware compatibility The media mapping supports external symbols which are defined in other files with Public scope Fupla IL or symbol files These can be filled in quickly using drag and PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 18 3 8 4 drop from the Symbol Editor If you have defined a Fupla application where some public symbols need to be linked to an input or output just drag and drop them into the Media Mapping view and onto the correct I O Slots Symbols Type Address Comments scope Tags i PCD2 M5540 CPU with 1 MBytes RAM g WO slots expandable 3 communication slots USB Profi S Net RS 232 Ethernet Slot 0 PCD2 E110 8 digital inputs 15 30VOC Bms current draw 12m at 5V E IO Slot0 Digitalinput0 F SJ0 Slot0 Digitallnput 0 Digital input 0 Publie 10 O Slot0 Digitallnput F SIOSlot0 Digitalinput 1 Digital input 1 Public 510 0 Slot0 Digitalinput iF
30. and jumps to out of the block are not allowed As a general rule backward jumps should not be used PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 1 9 7 2 2 Function Block with parameters The following example shows an FB that makes an output flash The FB is called twice Its first call makes output 64 flash at a rate of 1 5 seconds Its second call makes output 65 flash at a rate of 3 seconds Blinker FB FB 1 start of FB FB parameters tempo LDEF 1 I timer delay LDEF 2 W delay between flashes blinker LDEF 3 OIE output or flag to be controlled STL tempo if timer is 0 LDL tempo initialise timer with parameter delay delay COM blinker toggle parameter 3 EFB Jend Of FB COB 0 O CFB 1 call the FB for the first time T4 15 O 64 CFB il call the FB for the second time I 2 30 G cts ECOB As already stated the only difference between PBs and FBs is that FBs can be called with parameters The CFB instruction is followed by the list of parameters numbered from 1 to a maximum of 255 Inside the black parameter numbers can optionally be defined with symbol names which are local to the block Symbols for FB parameters are indicated by followed by the parameter number For example STL 1 Or you can define a symbol with a value 1 as shown in the example above Note Fupla programs do not support calling FBs with parameters Almost all
31. definitions can be added to file Example Saia PG5 Symbol Editor Fle Edit View Device Window Help Je 7 Al Csi ji Find Ce op i a x ddressValue Tags Public symbols from PG5 Ver 1 4 and Older When the PG5 Ver 1 4 project is restored in PG5 Ver 2 0 Public symbol definitions will be stored in Globals sy5 file and they can be viewed in symbol editor 5 2 7 Symbols definition in xls txt rxp files Symbol definitions can be defined in other application files like x s txt etc and these files then can be added to device After build symbols defined in these files are available in current device In this way there is no more necessary to import and merge external symbols files with the internal symbols to the device program We prefer to link the external files than to import them This works better and easier Also new versions of these files can easily be added However if symbols have still to be imported this is always possible to copy symbols from original files like x s txt rxp sy5 and paste them to symbol grid More information in section 5 3 16 If the symbols file is already edited it can be browse and added from right click menu on Program Files folder by selecting Add Files menu It is also possible to create and add new symbol file x s txt etc from right click menu New on Program files and by selecting appropriate file type from New file dialog box Note
32. ro 12 32h sCharge le registre 12 avec 32 hexad cimal cS 64 3 Charge le registre 55 avec 64 3 flottant 8 999 B Charge les indicateurs O a l tat bas 1000 1 sCharge l indicateur 1068 a l tat haut Select the Online Download Data to PCD menu or the Download button to download script data to the PCD 10 1 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 to a Microsoft Excel editor Online Settings S Bus USB PGU Start End Options Registers 0 16383 O 2 Address Separator COLON TAB ha E Counters Timers 0 1599 T 1599 5 Data Separator COMMA T AB g Separators Formatting 10 7 Type and address at beginning of line Empty line between different data types Flags O 16393 0 g Data separator at end of line Values Per Line Information comment E Inputa Outputs 0 8137 0 0191 FoR T C z Address separator after Test number Forl O F 10 ata Block Do not convert special Text characters Data Blocks 0 9191 0 6191 a z CT fo decimal e g lt 225 gt 4 C Texts 8191 U 0191 Tabbed View docking position Top C o Hee Type and address at i J Untitledi dt5 inoix the beginning ae Until loj x of line PCD DATA TRANSFER S Dat B1 4 040 sUploaded 11 67 86 68 51 22 From PCDS M33x 818 Empt
33. 10 12 13 Saia Burgess Controls Ltd 10 19 10 5 User menus The Tools menu of the Saia PG5 Project Manager window can be extended with shortcuts to your favourite programs Online Configurator Online Debug Data Transfer Watch Window Firmware Downloader Disassembler NotePad This menu has been added to the Tools menu with the Calculator command Customize Menu Icon Editor Explorer Customize Tools Menu Add on Tools Reset Window Layouts Channel Settings Options To add a shortcut use the Tools Customize Menu command Press Help for more details i Customize Tools Menu Menu Items amp NotePad amp E splorer Calc ulator amp lcon Editar Application Path CAWINDOWS Explorer exe Command Line lt SelDir gt Working Directory Delete a menu item Create a new menu item Change menu item order PG5 User Manual Chapter 10 Additional tools 10 12 13 i Gi PG5 WS K8 Tools E2 2 10 03 Saia Burgess Controls AG Contents CONTENTS 11 SAIA PCD NETWORKS S NET 11 1 Summary IL Choice OL MGI OF Ke ssseiscisssiacssnazecsecacsiteceecastosnessarassasausssnacaabeasaceatosnassasaaseseuscanseaoieisetsateaessaesenvetanseiass 11 2 1 Supported services 11 2 2 Design features PG5 User Manual Chapter 11 Saia PG5 Networks 10 12 13 11 2 1 Saia Burgess Controls SA Saia PCD Networks S Net Summary Automation solutions ofte
34. 13 9 36 9 8 5 Watch Window Fal Car_incoming Parking lot src Gets high when a car come Car_outgoing i i Parking lot src Gets high when a car leave Red_light O32 D Parking lot src Stops new cars at the entr Mumber_of_free_slots 1400 5 Parking lot src Counts the number of Free 7 Start Stop Monitoring Dynamise_incoming_ F 7502 D Parking lot src Flag detects the rising edge Dynamise_leaving_c F 7503 D Parking lot src Flag detects the rising edge 2 Position mouse pointer on value to be Saia Burgess Controls AG 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 Use the Symbol Editor s Add to Watch Window command from the context menu Or press the Watch Window button then drag symbols from the Symbol Editor into the Watch Window Symbol Name Move mouse pointer to button at start of the line and press the left hand button ir Laii w y Fed light Eeh Number_of free slots a eee lol x E Dynamise_incy7 ng car pes l 0 Parking lot src Gets high when a car comes l k bA Car a I1 0 Parking lot src Gets high when a car leave L amp Dynamise_ g_cal sig Red_light 032 0 Parking lot src Stops new cars at the entry ht Number_of free_slots C 1400 8 Parking lot src Counts the number of free Dyn
35. 1415E0 RO Pl Conversion of integer and floating point registers The PCD has separate instructions for arithmetic 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 one of the registers must be converted either to integer or floating point before performing the arithmetical operation both registers must contain data in the same format Convert integer fltg point Convert fltg point integer IFP RO integer gt float FPI R 0 float gt integer O exponent O exponent Index register Each COB has a special register the index register The content of the index register can be checked with 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 DEIK 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 sam
36. 16 XOB 16 SYSWR 4014 gt Initialise XOB 14 1000 swith a 1000ms interrupt EXOB COB O O ee user program goes here ECOB Cyclac Interrupt XOB 14 COM Or 32 toggles output O 32 EXOB PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 7 17 7 4 3 History The History window shows all the hardware or software errors which have occurred while the PCD was operating History messages are always added to this list even if the associated XOB handler is programmed Examine this list if the PCD s Error lamp is lit To see the history table start the Online Configurator and press the History button Z Online Configurator PG5 User Manual Chapter 7 Program Structures 10 12 13 7 18 Saia Burgess Controls AG 7 4 4 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 All outputs are reset XOB 0 is called and the PCD is 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 failure in extension rack The voltage monitor in the supply module of an extension rack 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 con
37. 23 2 8 Fl sh Backup Memmory gcsccect vs ee cea cen acs uss es cance ceccesvensceincuas succes cneueacecavveryccseccn guess sizecceessaessstessecestcess 24 2 8 1 Saving the executable program ccccccccsssssssssseseeeeccceeeeeeeeaaaaeesssseeeeceeeeeeeeeeeaaeaaaessesseeeeeeeeees 24 282 Saving the program s source COCEC sssssesssseeeecececeeeececeeeeasaesssseeeeeeeeeeeeeeseeaaasaesssseeeeeeeeeess 25 2 8 3 Backing Up data to a Tile sesessnnnsiienenesstecvuesssevevesvaesonenctenebopetesvoendsanennsctieswaenstnenetensawezoveenserinasdae 29 29 The VIEW VV OWS asap suet secs an cocaccts ccs saseaneeanen sconces canseaesesganeserostepeesacdseessiesaagaeesseopinestieeancsnaenensss 29 2 9 1 POG CA SUC E itrae esis de rssiensatond ssseyties dan E E E E debe totens 29 292 Global Symbols and Data List ViewS ccccccccssssesccccccecceseesecccceeaaaeseeeceeeeaaaaeeeeceeeeeauaeseeeceeeaas 30 2 9 3 COS R fein oreo ns eee er ne eee ee erm te ery ee een er mn er ee ee 30 2 10 The Online Configurator sccsaisssccscacesessecescessseceseasstvnsecssnsccaesassaasasaeanieestensteoracssasgansessessseeeveassuenseses 31 2 10 1 Device Configurator eeenssesssssseeeeeeeeerssssssssssseseetteeresssssssssseseeeereerresssssssssssseeeererssssssssssseees 31 DMZ PEDO e E E E E E E A 32 24093 Seine thie PCDs CTOCK sessy EEE E EE EREE UN EEA 32 2 10 4 Saving program and data from RAM 20 cccccccsssssseseseeeeecceeeeeeeeeaaaaaeaaaesesseeeeeeeeeeeeeeeeaaaas 33 21
38. 7 4 Communication Timing Supervision PG5 PG5 ul i Supervision i Supervision ee e Su Bus Gateway slave port Gateway v a 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 User Manual Chapter 12 Profi S Bus 10 12 13 12 20 12 8 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 Channel Settings O S Bus USB Channel Type Port Type SOCKET O Timings Timeout TN Delay TS Delay Delete To adjust the Timeout of the data exchange program to the PCD use Fbox SASI Profi S Bus Extended PSB Channel Profi S Bus Ex Adjust Parameters Channel Channel 10 Gateway Mo 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 e Example of the project Profi S Bus installed with your PG5 PG5 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 13 1 Contents CONTENTS crena 1 1 EINER O BUS came E EE EEEa 2 13 1 Ether S Bus network Example ssss
39. AG Example Counter A counter will be programmed to count up each time input 5 turns on and down each time input 6 turns on These counts will be activated on the rising edge of the input The counter can be zeroed via input 2 The initial count will be loaded with 3 Load the counter Increment the On input 2 reset the on input 1 counter on input 5 counter LD C 35 INC 35 LD C 35 S 0 Counter value Counter state N A counter s state is 1 if it contains a non zero value STH C 39 Instruction list program Fupla program COB O Cyclic block 0 OLH L l yI woe I is 1 LD C 35 then load counter 35 3 gt with 3 OTE I IL input 2 is 1 LD C So 7 then Toad counter 35 O gt with zero STH I 5 On rising edge of FBox oo do Ee 2 Counter Up down with preset and clear INC C 35 increment counter 35 SIH I 6 On rising edge of DYN F 14 input 6 DEC C3859 Jdecrement counter 33 ECOB PG5 User Manual Chapter 4 PCD Data 10 12 13 Saia Burgess Controls Ltd 4 13 4 2 5 Texts and data blocks Texts character strings and data blocks DBs arrays of 32 bit values are non volatile Texts are used for messages for displays transmissions to pagers command strings for modems etc DBs are used for data logging tables etc Texts and DBs share the same addresses If Text 1 is defined the there cannot be a DB 1 Texts and DBs 0 3999 are in main program memory which may be read only Texts and DBs 4000 and above
40. ASS LI a pra Correct Incorrect PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 6 8 2 2 Saia Burgess Controls SA Transitions TR 0 5999 d Wes the Info button touch The Graftec process is controlled by the code inside the transitions which are active until an event is detected such as the change of state of an input output indicator or evaluation of a logical expression If the program is written in IL the transition executes the next step only if the accumulator ACCU is high 1 at the end of the transition If the program is written in Fupla the transition executes the next step only if the input to the FBox ETRis 1 If these cases are not fulfilled at the end of the transition then it remains active and the same transition is evaluated repeatedly until the awaited condition occurs Example Detecting the rising edge of an input signal IL program Fupla program STH I 8 DYN F 80 _15 Dyn ETR Note For transitions in instruction list the ACCU is always high 1 at the start of a transition or a step Therefore all ACCU dependent instructions are always executed and empty transitions are always fulfilled PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 7 8 2 3 Steps ST 0 5999 transmit values Steps contain the programs that are the actions of the process turn on off the outputs flags calculations loading counter values etc
41. Controls 12 5 12 4 4 Download the Device Configurator parameters in the device 12 5 12 5 1 s Online Settings Master station A Select the channel 5 Bus USB Setup E Bus USE Pau No Bus Station Number 10 Auto Station No Usb Serial Number I don t care gt Refresh USB list Scan Number of retries 3 With the new PCD systems the Device Configurator parameters 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 Configuration on the Device Configurator window Fupla Program Assign the channel using SASI Fbox aera me Bae ee Fbox properties bind SEND fot 3 OUS aster r fl gt OUS aster Clr Err Clr Err and RCV Fboxes to the ref Channel ref Hetwork channel definition END END ref Channel ref Aetwork 1 END EMD 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 with SASI Fbox co
42. Fup ccccccseeeccccceeeeeeeeeeeeeessseesseseeeeeeeees 20 8 5 3 PGES TIS SOUS 0 crra sx cteets ces eedpeab E E E T EEE 20 8 5 4 Programming an initial step loading a countet cs ceeeeesseeeecceeeeeeceeeaaaseeessseeeeeeeeeeeeeeeeeaaas 20 8 5 5 Programming a transition waiting for the start signal cccccccccccsssseseseseeeeeeceeeeeeeeeeeaas 21 8 5 6 Programming a step turning on an output and starting a tiMe ee eeeeeeeeeeeeeeeeeeeeeeeeeeaes 21 8 5 7 Waiting for a timer sessirnir aa aN E Aaa aaea 21 8 5 8 Turning off an output when a timer reaches 0 eossssssssssseseeeeeeeesssssssssssssssssseererrresssssssssseess pip 8 5 9 Decrementine Coume eese a a a rE aE r Eea 22 SA40 Alternate DraNnching cccceccccccccccesceeccaeeeessssseeeeccccccceeseeuccaeeesssseeeseceeeeeeeeessauageassseseseeseeees 22 8 6 Building and debugging the program sssesecccecooccocssssssseccccceccccccosssssssssesscccececocccssssssssssececeeessso 23 8 6 1 Messages WIndOW sencocrsinnisiriior eini annaa aaa E Ea aa EECa 23 8 6 2 aa COONS E E see E E E E EO at 23 8 7 Grouping a Graftec program into pages ssssssssscsesssssssssescsseccccesccccccesecesceccesecssesecssssssssssssssosss 25 8 7 1 R les for editing pages os hccsecsncennnotsnecnanadadvourasnsvesteonndastinieaddnatiusadouhstandastiedndicnbeneaduniededoantaneteatones 25 8 7 2 C CW E A E E TES 26 PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 1
43. GAP update cycle maintenances Highest Station Address The highest address HSA on the network Max Retry Limit Number of repetitions without acknowledgement of receipt before sending a negative acknowledgement of receipt PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 14 3 7 3 7 1 Ether S Bus communication properties Ether S Bus is a multi master network based on Ethernet standards and the SBC S Bus protocol It enables the Devices to be networked in order to exchange data between PCDs and supervise the process It also supports all service functionalities by means of the Saia PG5 programming tool PGU PG5 o Supervision Supervision External 7 m fit fii masters a a PGU slave channel Serial S Bus Profi S Bus Ether S Bus or modem line Ether S Bus slave PGU channel The properties window corresponding to the S Net communication slot enables configuration of an Ether S Bus slave or master gateway channel Start by activating the desired configuration then add the active parameters Ether S Bus slave Defines Profi S Bus channel as slave or PGU slave This definition may be complemented by the master function by adding a SASI master instruction in the Fupla or IL program 4 TCP IP Channel Number 9 wo Ethernet RIO Network None IP Address 0 0 0 0 Subnet Mask PE oe B aep or E ar r A Default Gateway 0 0 0 0 Access Control List Show IF Filtering Enab
44. Instructions for COMM CIS 5st 2accateasuecsuenronanenntasasdunsenseagatune cunsoaansenceaascauseaeseaunuenratavnetaeatdandanteness 22 9 4 7 Accumulator dependent instructions ccccccccceccccceceeseesssseseeeeceeeceeeeeeeaaaaaeaeseeeeeeeeeeeeeeeeeeeeeaaas 23 9 4 8 Word instructions for integer arith MetiC cc cseesessessseeeeceeeeceeeeeeeeeeesssssseeeeeeeeeeeeeeeeeeeeaaaaegeesees 23 9 4 9 Word instructions for floating point arithmetic ccccceeseeeeccecceeeeeeeeeeeeesseseeeeeeeceeeeeeeeeeeeaaas 24 9 4 10 Conversion of integer and floating point registers ccceeeeeecceeecececeeecaaeseeseseeseceeeeeeeeeeeaaas 25 OAM ANG CX Te ISOT ieir E E A EEE EE 25 Oe Prora AN Seeria en a E E OEA EE 26 9 5 Editing a first application program sssssssecececccoccccsssssescccccccocecccosccssssssescceccccococccsssssssssecceceeossesso 28 90 Building the prostrani ss dose secs ciscevssevsecccucsecavsvaesssssvavaccosvecsecosvansveuesasaveusvsvsnevesccuccusscussavsvasaveususcctevaveuses 30 9 7 Load proeram mo PCD oniran tence tenseesauceasacevessaauenceteasatensnusassesssavansveveeuntaes 31 OS WDC DUS OIG BOOST AN oececsrcceessceiecnacacccenasasenteatacunsvavetentoncetectnaeabestensavecesasaeenteatasssevavanententesacescuttantses 31 9 8 1 GO OWOMme Run and SOD irises esa anaE U EEEE SNI EE A a ETA 32 9 8 2 Step by step ModE opran Ae EET A EEA EE E EEA EEAS E 33 9 8 3 Break Om EE E E E E A 34 9 8 4 Online modification of the pro
45. Manual Chapter 6 Programming with Fupla 10 12 13 6 26 Saia Burgess Controls AG 6 10 3 Programming lt 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 Symbol Editor Es EE i A KD Ca Find Symbol Name Se Local Local PCD Clock w D Switch off time All Publics System Daily Timer fup 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 cold start will not reinitialise these registers They can only be reinitialised by downloading the program Local coe o aily Timer Local S S o o Daily Timer All the necessary FBoxes can be found in the Selector window Time related Read time Integer Is greater or equal to Binary Xor PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 27 6 11 Build All Building the program Before the
46. Master station Master Slave station timing definitions The assignment of the Master channel is done by combining the Device Configurator parameters with one of the Fooxes above Adjust 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 Device Configurator 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 P
47. Move up down symbols Expand collapse Show hide columns in grid Undo Redo Find symbols etc Tabs for filter Views Each filter view is opened in small window within symbol editor These windows can be viewed in Tab view and it is possible to navigate between Tabs PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 4 Saia Burgess Controls AG Navigation tree It contains the structure of predefined filters to view display symbols in a grid according to filter selected Navigation tree can be hide open from symbol editor tool bar It s also possible to add custom filters to Navigation tree and rules for the filter can be defined using filter properties New filter can be added from Right Click context Menu Symbol Editor E t i aage K Cd ve Find Type a substring to find X L REGE 5 a Symbol Name Type Address alue Comment Actual Address Tags Scope en as new ta 2 ca gt Water_Pump sic ROOT Local a All Publics Delete Filter Del System ice i0 Expand All Ctrl Collapse All Ctrl Properties Alt Enter Water_Pump sic Symbols in the current file Water_Pump src X All Publics System Filter Properties Symbols can be filtered according to any entry present in the symbol grid Custom Symbol Filters can be stored with their Names To change properties of existing filter select Properties from Right Click context Menu ad Properties Be Zt El F
48. O ECOB 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 Jump using the number of lines JR L Next JR L 1 INC R 10 INC R 10 D 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 PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 27 Mnemonic Condition Label Description JR H If accu is high JPD L If accu is low JPI Z If status fla
49. PG5 Fupla Editor House A fup et oe R TH e Dev ice Online Mode Block Ha 1 ee te E Block COB BL_3ES10C Page 1 1 8454 80 EN Pos 81x35 PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG 1 6 Correcting a program To modify a program proceed as follows 1 Go offline using the Go On Offline button Modify the program wo N Build the new program with the Build button gt A Download program to the PCD with the Download Program button PG5 User Manual Chapter 1 Quick Start 10 12 13 lel Saia Burgess Controls SA Contents 2 PROJECT MANAGEMENT cccccseceeceseeenecenecnsecnseenseenseeneeeseenseoneeens 2 2 1 Proe ORG AMIS AVION a E E eaten sence Pensecnanceascscbesteesvaveteens 2 2 1 1 Ope a ATEN fC ar ac pt mwas eandena cee E E E E 3 2 41 2 Creating a new ProjECi sssraponieicsnsegir genih E Ea AEAEE Ea EEEa EEES 3 2 1 3 How projects are stored on the PC s oiacs cos aces ca nsecengsaaachacandiueacetinsiindeanncaanebenidadunescurieebedanaedeenedants 4 2 1 4 Backup and restore of a Project or Device ce cccccsssssseesseeeeeeceeceeeeeeeeeeeaaaasseeseeeeeeeeeeeeeeeeeaqaas 5 2 2 Ther rojeci Iree YOON san 6 2 2 1 E E L EET EN NE E E P E A ET TOE 6 2 2 2 Common Files folder sovessdesiicctsvesvercenchiovesiacoseubins R EE EE Ea a 7 225 ATE AIT S DOU e E E E E E E tase EAE T A AT E E TT 7 2 2 4 B ola 6 4 eee E E rr Te ere tT
50. Reset Output Enable OB 1 Enabled Run Stop Switch Enable Time Zone Code Service Key Password Password Enabled Password Inactivity Timeout minutes 5 Bus S Bus Support S Bus Station Number Input Output Handling Enabled Peripheral Addresses Definition Power Supply Power Supply Specification Current Available 5V mA Current Available V mA Current Used 5V mA Current Used V mA Web Server Default Page Display Root Content Enabled Access Checks Enabled Access Timeout s On File System 256 KBytes Onboard Flash Super cap or battery failure default Yes fo Yes Auto recommended 20 25 600 150 0 0 start htm Yes Yes 60 User Code Text DB Extension Text DB Memory Size of onboard user code text DB memory This memory range contains the user program texts and DBs with an address lower than 4000 and the extension memory for texts and DBs with addresse 40 3 4 1 Memory Code Text Extension memory Represents the RAM available on the Device in order to receive the program as well as texts and data blocks included between addresses 0 3999 but also texts and data blocks with an address higher than 3999 This memory may be organized differently on some older PCD s The extension memory is separate from the Code Text memory We therefore have two parameters PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 7 3 4 2 Code Tex
51. SIO Master PCD3 M5540 lt igk Online Settings fe Device Configurator bal Build Options J J Program Files m E Local_Process fup a Ei 510 Network sio S Net module for network configuration 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 lIO Network File sio file type S Net configurator usage is similar for both Profi S lIO 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 PCD devices DP devices for Saia PCD other suppliers e Bus timing profiles S Net or DP Defining stations on the network E a SAA S 10 Masters oohun i E PCOS M480 Proti 5 10 Master on B aeni lacie 10 Master SI a SAIA 5 fi ae Bese ir PCO M480 Onboard Slave T n PED3 M 3xxx Onboard Slave ii ff PCD3 M5exx Onboard Slave Besse B PCA T760 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 User Manual Chapter 15 Profi S IlO 10 12 13 15 4 Saia Burgess Controls SA 15 5 Configuring the master station Master 1 SIO Master Parameters Es Associated Device File C Users Public SBC The only information which needs to be defined for the master station is the As
52. Slave port PGU is added configuring the Device Configurator with the parameters for the modem Fupla or IL Program 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 Seral_Gateway_Slawe_Port Adjust Parameters S Bus Sly i Channel Channel 1 Clr Err 5 Bus Mode Data Gateway Yes RS Type Default Transmission speed 9600 bps The adjust Gateway parameter then must be defined with option Yes According to channel type the parameters of the adjust parameters 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 R0501 ENDSASI N N Flag and diagnostic register Mode S Bus Gateway Slave Data mode Transmission speed PG5 User Manual Chapter 13 Ether S Bus 10 12 13 13 20 Saia Burgess Controls SA 13 7 4 Communication Timing Supervision pae PG5 PG5 ul Supervision Aut Supervision Serial S Bu S Bus modem Gateway slave port Gateway Gateway Master port Ether S bus Generally the communication timing is defined with default values and this works correctly But the use of t
53. 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 doesn t 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 Device Configurator e Verify that the Device Configurator parameters 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 Device Configurator 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 Ether S Bus PG5 User Manual Chapter 13 Ether S Bus 10 12 13 13 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 h
54. W340 is a universal module It supports measurement of ranges 0 10V 0 2 5V 0 20mMA 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 4096 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 Adjust Parameters Configuration channel 0 t Ch Mode or sensor type mw Ch 1 f Mode or sensor type Mi 1000 Ch 2 Mode or sensor type u 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 Adjust Parameters Qutub when in error Last value PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 40 Saia Burgess Controls AG 6 15 3 Example for PCD2 W610 analogu
55. a different network that the one usually supported 13 7 1 Application PG5 Supervision Supervision ll ll ll E TCP IP DAAA RARA What ARAARA t a Ra Gateway Profi Sbus Ra Non a okt aif z ia fe F 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 mli intertace USB ou S Bus modem Mint ee b EEDI smena Gateway 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 User Manual Chapter 13 Ether S Bus 10 12 13 13 16 Saia Burgess Controls SA PG5 PG5 Supervision Supervision Supervision i ii i il i T remme eee a 1 Gateway OK pam l 2 parallel Gateways Profi Sbus 2 cascaded Gateway 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 a Gateway slave port a le Se Gateway Master port S Bus Profi Sbus TCP IP If
56. an instruction which multiplies two large numbers Division by zero Square root of a negative number Error assigning the communications interface SASI instruction etc 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 R 3 Operands R 1 10 AL Result 32Bit l h R2 11 Status flags E Z N P CALCATEKH 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 ACG Z Copy status flag Z to accumulator ACG F Copy status flag E to accumulator PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 20 9 4 5 Saia Burgess Controls AG Instructions for timers Integer value T 4 Binary state T 4 TEMS 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 ti
57. and types of Flash memory which are available the configuration of the FTP server and the possibilities for creating data files using Fupla or IL programs please refer to the following manuals SBC FTP Server and SBC Flash File System Hardware manual for the PCD3 series Hardware manual for the PCD2 M5 Hardware manual for the PCD1 Mxxx0 The View Windows The information displayed in these windows may not be completely accurate if build errors have occurred but in PG5 V2 they will show all the available information In V1 x they were always empty if a build error had occured Block Call Structure A Saia PCD program is a tree like structure of organization blocks which contain the application s code Each block provides a particular service cyclical programming COB sequential programming SB sub programs PB functions with parameters FB and exception routines XOB The overall structure of the blocks that make up the program can be seen by pressing the Block Call Structure toolbar button or selecting the View Block Call Structure menu command The example below shows a program comprising blocks COB 0 COB 1 XOB16 PB 10 PB11 and FB 156 Note that COB 0 conditionally calls three sub blocks PB 10 PB 11 and FB 156 The call condition is indicated in brackets Call condition H Accu 1 Bko e SESE i P L Accu 0 E COB 0 Regulation s PB 10 H Summer Control Program For sommer time T PE 11 L Winter Con
58. applied to the channel when the PCD is powered up PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG Contents 7 PROGRAM a eerie este are cee tere ete eeiateerenae yu sete sete cease neat 3 TA Cyclic Organisation Blocks COB 0 to 31 ssseseeeceeeceecceccccccccccccccccssssssssssssssssssssssssssssssssssssssssoso 4 7 1 1 Crean a DIOC E ooer EEE O E E EO 5 TA FE AMG e aves ceata vaiiesesaoueesdaatedaninapntaiene ioe 5 7 2 Program Blocks PB and Function Blocks FB sssssssececcceccccccsssssssccessccececooccccosssssssssccceecoooso 6 7 2 1 Program Block with conditional call cccccccccccssssssssseseeecceeeeeeeeeesaaaesssseseeeeeeeeeeeeeeeeeeaaaas 7 Raz Fu ncuon Block wiih param ICTS secese e A a 9 L NCW DOCK Call DCT eea E S 11 7 44 Exception Organization Blocks XOB sssssssseecceecccccccsssssescccceccoccccsssssecececcccoccsosssssseccccecesessssso 12 7 4 1 XOB numbers and descriptions cccccceccceccccceccceeaeseseseseeeecceeeeeeeeeseauaassssseeeeeeeeeeeeeeeeeaaas 13 7 4 2 MSO OD a E E E E E TE 14 7 4 3 BVA SGOT ANE EE E AA EE A AN E A A E A 17 7 4 4 Description of X OBS esessssssssssssseeerreesssssssssssssecssseterreresssssssssssseetrrereeesssssssssseeeeeereeesssssssseees 18 75 Sequential Blocks SB 0 to 96 sec cecescecnaceinczscevsneessccpevescssedevavececesvaseetesauseceasauecserceosacecvercsacsedesteases 22 7 6 SAS A ae aces ee cce acne e se cen csc ce ene c
59. be made manually for connector line of the program It is therefore preferable to use symbol names with optional dynamic addressing PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 19 5 3 7 Using Symbols in Programs When a program is being edited symbols already defined in the Symbols editor may be used in different ways All the methods described below can be used for both IL as well as fupla editor 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 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 Ctrl Space keys to look up all the symbols that match those letters The required symbol can then be selected either with the mouse or the keyboard arrow keys T 4 and confirmed by pressing Enter Example Choose a Symbol Choose the Symbol Siitch Pos wich Pos Fo Mi Fi mg src Ctrl Space STH 3W Ctrl Space STH Switch Pos gt Switch0 U PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 20 Saia Burgess Controls AG
60. below We distinguish between three types of addressing Absolute addresses SymbolName Tyne Address Comment Scope _a e Pakne on S o Joe Flacdetects the ri Local E The data is defined only with a type 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 line of a program It is therefore preferable to use symbol names with optional dynamic addressing Symbol names Symbol Name J Comment Pakini Ror O oOo O F amp amp Dynamise incoming casina F 50 Flag detects the ri Local E COO 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 Parking otse Roon OOO LE amp Dynamise incoming car sional F C Fien detects the i Loca E E E E E 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 Build Options See Project Manager Note Dynamic addressing is available with flags counters timers registers texts DBs COBs PBs FBs and SBs However absolute ad
61. built into the PCD The date and time can be loaded into a Register with an IL instruction or an FBox Example The following example shows how to read the date time Instruction list program Fupla program COB O O RTIME R 1 ECOB Fbox Time Related Read time This program reads the time from the clock and copies the value into registers R 1 and R 2 as decimal numbers for example R1 093510 hhmmss 09 35 and 10 seconds R2 74081231 wdyymmdd week 07 day 4 Thursday 31 12 08 PG5 User Manual Chapter 4 PCD Data 10 12 13 4 6 Saia Burgess Controls AG 4 1 3 Interrupt inputs Some PCDs have two interrupt inputs called INB1 and INB2 Whenever there is a rising edge on one of these inputs the normal program cycle is interrupted and the PCD executes a special program block called XOB 20 or XOB 25 XOB 20 for INB1 and XOB 25 for INB2 These inputs are capable of a frequency up to 1000 times per second Example The example demonstrates how to count pulses from INB1 Instruction list program Fupla program COB O0 main program O ECOB XOB 20 Jinterropt INBL INC R 2 increments register R2 EXOB For more details see the PCD hardware manuals Limits imposed by the input filtering 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 interes
62. counter Breakpoint on a symbol s value The stop condition can be defined via the menu Online Breakpoints Breakpoints Daily timer HVC RUN A Symbol Hame or Type and Address L ailyT imer Lookup Type Address Condition alue 0a a History Clear Aun Clear Stop Delete All Close The above window is used to define symbol type and address number A symbol can simply be dragged from the Symbol Editor into the Symbol Name field then the breakpoint condition and status value are defined Pressing the Set amp Run button will put the PCD into Conditional Run mode The PCD s Run LED will flash and its Run toolbar button alternates between green and red The PCD will automatically put itself in stop mode when the breakpoint condition is reached For example when an instruction modifies the output value the status of 32 is high The last FBox processed by the PCD is shown in red It is possible to continue processing the program in step by step mode or with another breakpoint condition If necessary conditional Run mode can be interrupted The Clear Run button forces the PCD into RUN mode The PCD s Aun LED will come on the its Run button will be green The Clear Stop button forces the PCD into Stop mode The PCD s Run LED will go out and its Run button will be red If a number of conditional breakpoints are defined they will all be recorded in the History field Any of them can then be selecte
63. 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 11 2 2 4 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 composed 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 11 2 2 5 Application domains Some networks are designed for specific uses For example Profibus DP is a protocol oriented towards the machinery domai
64. 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 100ms i e the system decrements each timer by one every 100ms The timebase can be changed in the Build Options 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 instruction Timer values decrease only Counters can count up or down using the INC DEC instructions INC T 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 Configuring timers and counters The distribution of the address range between timers and counters can be altered in the Build Options This is also where you can change the time base of 100 ms 4 Devicet pcD2 hun tge Online Settings ete ES Configuration oo KF Build Options El Dynamic Timers First Last El Dynamic Counters 1400 1599 First 1400 Last 1599 Double click Technical information The more timers you declare the greater the load on the PCD 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
65. each page This setting allows the conditions to be removed when the pages are imported Page Range Allows the selection of individual pages to be imported or all pages in the template PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 23 Fupla Page Import X General ymbol List FE ox List Source Sumbolwene Type _ AdteeehVaue Connent Tage Scone T Fem Riot Feba o a2 J f a Femme p po jea O Fm OFFTIME O a a o oo o loea Cancel Help The Symbol List page shows all the symbol definitions and references which are imported with the template It allows the symbols to be redefined with new names addresses comments and scopes Marking symbols for putting in a group is the fastest way to change the names of all the imported symbols The context menu command nsert Pre group puts the selected symbols into a group with the chosen name To change the addresses of symbols sort them by type by pressing the column s header button Type Select and edit the first address and then drag the tiny square at the bottom right of the selected cell downwards until all the desired addresses are selected and release the mouse button All selected addresses are renumbered starting from the first address sl ems RS emme R10 Rk Gy OFF TIRE lf importing several copies of the same template examine the parameters on the General page It is useful to insert an index i
66. have internal Flash memory and can also be fitted with removable memory with a much greater capacity using dedicated or I O slots Unlike RAM Flash memory has the advantage that data is not lost when power is switched off This Flash memory can be used to store a backup copy of the user program a copy of the PG5 source code for the program and or to save data in a file accessible for reading and writing by the PCD s user program 2 8 1 Saving the executable program The PCD program is stored in RAM memory If power is lost and the backup battery is flat then the contents of memory can be lost and the program will not run when power is restored To backup the program Code Text Extension it can be copied to Flash memory which is not altered when power is lost The menu Online Flash Memory Copy Program To Flash copies the program to the Flash card and the command Copy Program From Flash restores it PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 25 This can be done automatically by selecting the download option Backup user program to Flash after download If the user program in RAM is lost the PCD will automatically restore the program from Flash backup into RAM at start up We recommend using Flash memory on your PCD to protect you from undesirable data loss NOTE The program s source files must be backed up separately because only the executable file is loaded into the PCD See
67. if a correct addition had followed the division by zero example above the Error flag would be reset PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 7 21 XOB 14 15 Cyclic interrupt XOBs XOBs 14 and 15 are called periodically with a frequency of between10ms and 1000s This frequency is defined by the SYSWR instruction XOB 16 Coldstart XOB 16 is a strat up block It is processed when the PCD is powered up or when a restart cold command is received from a programming tool XOB 16 is used to initialise data before starting the program Once XOB 16 is finished the program will process COBs in ascending 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 be called from XOB 16 and from the COB XOB 16 has its own ndex register which is separate from the Index registers used by the COBs XOB 17 18 19 Request to call an XOB via S Bus These three XOBs can be used as interrupt routines They can be called when a particular S Bus message is received The SYSWR instruction or Fupla FBox Special Execute XOB can also be used to call them XOB 20 21 22 23 25 Interrupt input change detected XOB 20 25 is called when interrupt inout INB1 or INB2 of the PCD has detected a rising edge see Saia PCD hardware manual for fu
68. in order to configure the Device as client or server on the network group Profi S Bus Master Gateway The Gateway function is commonly used to link two different communication networks adapt a Saia PG5 programming tool for VisiPlus supervision a modem line on the Ether S Bus network All telegrams received from external masters and which are not meant for the gateway station are automatically redirected to the master gateway channel 4 Ether 5 Bus Master Gateway Channel Number Gateway g Use Ether 5 Bus For Gateway Yi First 5 Bus Station 0 Last 5 Bus Station 293 Response Timeout ms 0 First Last S Bus Station Enables filtration of telegrams to be sent on the Gateway according to the target station numbers Response Timeout By default the value of the Timeout is zero this means that the default timing is applied In practice we only change it when the Gateways or modems are used generally we restrict ourselves to stretching the Timeout on the external masters and never on the gateway channel PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 16 3 8 3 8 1 3 8 2 On board slots properties configuration of the media mapping The Device s input output handling can be managed with the assistance of media mapping made up of indicators registers updated by the Device s firmware The Fupla or IL program no longer directly accesses the inputs outputs for the read write op
69. instructions can reference FB parameters One exception is the LD Load instruction because is needs a 32 bit operand and FB parameters are 16 bits A 32 bit value can be transferred using two instructions LDH and LDL Load High Word and Load Low Word which each transfer 16 bits PG5 User Manual Chapter 7 Program Structures 10 12 13 7 10 Saia Burgess Controls AG When making nested FB calls it is possible to pass directly from one call to the next 1 FB 1 s parameter 1 call FB 3 with FB 1 s parameter 1 FB 1 s parameter 1 R 1 PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 7 11 7 3 View Block Call Structure Once you have built your program you can view its block structure Click on the toolbar button called Block Call Structure This displays a window showing which COB calls which PB FB SB etc The display below is for the PB example in chapter 7 2 1 It shows that COB 0 calls PB 2 and PB 1 Block structure view Project4 Device1 File Edit Miew Project Device me Tools Help s 2 FS lt Be CO RAG Project Tree ne Project Froject4 1 Device Koga SA Common Files 3 Libraries ee OBs Cyclic Organization Blocks Devicei PCD2 COBO Age Online Settings PB 2 L ShortTime 3 PB 1 H LongTime Fl YOBs Exception Organization Blocks oo MOB 16 enerated by 5 45m PG5 User Manual Chapter 7 Program Structures 10 12 13
70. interfaces defined under Onboard Communication or Onboard Slots is used start by activating the S Bus support and defining the S Bus station number The S Bus station number is common to all of the Device s communication channels Power Supply The 5 and 24 Volts power supply required for the functioning of I O modules is provided by the Device s bus It is advisable to check that the configuration of the I O defined under Onboard Slots of the configurator is not higher than the values for the maximum available current Serial S Bus communication properties Serial S Bus is a masters slave network enabling the Devices to be networked on a RS 485 232 series line in order to exchange data between PCDs and supervise the process It also supports all service functionalities by means of the programming tool PG5 PGU and an analogue or ISDN modem PGS CI C CI Supervision Supervision tel fil m m masters a am E PGU slave channel Serial S Bus Profi S Bus l Ether S Bus or modem line lt Je Canal gateway Serial S Bus master Serial S Bus PGU slave channel Depending on the series communication slot selected the properties window enables configuration of the Serial S Bus channel as a PGU slave for a series line PGU slave for a modem line or master gateway Start by activating the desired configuration then add the active parameters 4 Serial S Bus Port Port Number Serial S Bus O Port Number Number of t
71. manipulating these checkboxes Options Device Sequence By default commands are sent to the devices in the order in which they are defined in the Project Tree alphabetical order This option displays a dialog box which allows the order to be changed Options Options For Download Programs Believe it or not this configures the options for the Download Programs command NOTE Some of these options could be very important they define when the devices will be put into Stop or Run Commands Test PG5 User Manual Chapter 2 Project Management 10 12 13 2 22 2 7 2 7 1 Saia Burgess Controls SA This command verifies that each selected device is online and able to receive commands If it fails check the Online Settings for the device and make sure it is connected and power is on Commands Download Programs Downloads the programs into all the selected devices Commands Set Clock Copies the PC s date time to every selected device Commands Run Stop Puts all selected devices into Run or Stop Self Downloading Files The self downloading files feature makes it much easier to download programs and configurations into PCDs on site A self downloading saiasd file is created which contains all the information needed to update the PCD s program and configuration The PG5 programmer then simply sends this file by e mail to the person in charge at the PCD job site When you open a saiasd file the Download Sel
72. necessary a Gateway can make a bridge between to several communication sub networks 13 7 2 Configuration of the Gateway PGU function It is easy to configure the Gateway function it doesn t need any program only some parameters in the PCD Device Configurator Generally only a Gateway Slave Port and a Gateway Master Port should be defined then all is automatically supported by Gateway function 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 PG5 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 17 Example Gateway USB Ether S Bus _ PG5 Ml Supervision PCD3 M5540 USB PCD2 M5540 Station Master B Station Master A Gateway slave port IP Node 2 sipahonn ee lt IP Node 1 IP address 192 168 12 128 Gateway Wa S Bus Station Number 10 ee oe ee a Gateway Master port IP address 192 168 12 129 S Bus Station Number 11 Ether S bus PCD3 M5540 Station Slave C IP Node 2 IP address 192 168 12 130 S Bus Station Number 12 Onboard Communication properties of the Master A station 4 Ether S Bus Master Gateway Channel Number Gateway Use Ether 5 Bus For Gateway Yes First S Bus Station 0 Last 5 Bus Station 253 Response Timeout ms 0 The USB Gateway is an exc
73. necessary the project and library directories can be changed using the Tools Options menu command El Directories Projects Directory lt ProjectsDir gt C Documents and Settings All Users SBC PG5 1 Projects Li Project Tree ea The project is saved in a directory with the same name as the project Each device is stored in a subdirectory of the project folder j Project Shopping Arena 3 Devices T Properties TCP IP Settings Table l Common Files ve Library Manager e Central S d PCD3 M3330 192 168 1 105 S Bus Stn 5 di Projects 3 A Properties E eCity Hall n e ES Device Configurator J Heating contr E pie di Lighting management gt By Dan ms f ica i je LE Display hmi F ventilation c4ntral _ B Global sys y Klimaanlagen fup E Listing Files pot Documentation Files SFT Centrale Nord PCD3 M5340 192 168 1 104 5 Bus Stn 4 PG5 User Manual Chapter 2 Project Management 10 12 13 a A Properties Saia Burgess Controls SA 2 5 2 1 4 Backup and restore of a Project or Device To backup a project it is necessary to keep the same folder structure and all the source files which comprise the project The Project Backup menu command compresses either the entire project or just a single device into a standard zip file which can be restored using the Project Restore command Project Backup C Project City Hall zip Project Resto
74. o Emergency 7 o 1 a 4 E Cond_Aun Machine ts in conditional run By Irtemediste Flag E Ss Oil_Purnp Oil Purp Local Sp OilPumpPrg Program For Oil Pump Sess p me Waste Pump TunOnWastePump OilL_Purmnp sre System All Publics Public symbols defined in Oil_Pump src will appear in All Publics filter of files in current device for example Parking _Lot src To use Public symbol it can be drag and drop from All Publics Filter Tab to Program editor For example when Public Symbol Emergency is drag and drop to program editor External symbol is automatically added to Pakring_Lot src file Display All Publics symbols in Parking Lot src Symbol Editor Position mouse cursor on symbol press hx eae left mouse button and hold down 3 E EE 4 soostring to Find Oa RO Symbol Hame Address alue Comment Scope Dedan O _ Machine en condoned rn Fe Emergency I Emergency Stop o Noma Pn a Machine isin nonmalun Pubis Oil Purnp src System All Publics sth gt STH Emergency Release mouse button External symbol automatically added to Parking_Lot src Drag mouse cursor into IL editor Symbol Editor 1 x Es EE i A T ee gt Find Type a substring to Find Symbol Name Address alue Comment Scope ROOT o o SC emee dl o Ees Eer Oil Pump sre System All Publics PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 22 Saia Burgess Cont
75. of input 5 The accumulator is set to the result ORH F 100 Reads accumulator state and executes logical 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 PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 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 ACC Operands STH input STL output flag _ _ gt LU Other instructions read the state of the accumulator to execute a binary function and put the result back into the accumulator Instructions ANH ANL ORH ORL Operands XOR input DYN output flag ACCU Saia Burgess Controls AG 9 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 out
76. 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 function box symbol or connector Press the Delete Object toolbar button and click on the line FBox Symbol or Connector to be deleted PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG Use this method when connection points are aligned horizontally Saia Burgess Controls AG 1 15 1 4 1 4 1 Rebuild All Files 1 4 2 A4 cal Download Program Running and testing the program Building the program Before the program can be executed by the PCD it must be built compiled assembled and linked using the Project Manager s Device Build Changed Files menu command or the Rebuild All Files toolbar button 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 successful Total errors 0 Total warnings 0 Errors are indicated by a red error message Most errors can be located in the user program by double clicking on the error message Public symbols 191 Linkage complete 0 errors 0 warnings Build successful Total errors 0 Total warnings O Generating Block Information files Block Information Files complete Downloading the p
77. possible to restore the original values from the Fupla file The Show Source Value button fills the Source Value column with the original values from the Fupla file See the FBox Properties window Restores a single parameter Restores all the parameters for the current FBox from the Fupla file PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 36 Saia Burgess Controls AG You can also use the menu command Online Write FBox Adjust Parameters download Adjust Parameters from the Fupla file 6 14 6 Saving the online parameters into the Fupla file If the parameters which have been changed online are suitable they can also be saved into the Fupla file Save a single parameter Save all the parameters the current FBox You can also use the menu command Online Read FBox Adjust Parameters to upload Adjust Parameters from the PCD and save them in the Fupla file 6 14 7 Defining symbol names 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 click 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 To define these symbols open the FBox s Prope
78. s Error lamp is lit Ee History History File CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL CALL LEVELS LEVELS LEVELS LEVELS LEVELS LEYELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LE VELS O6eO1 2003 Oe6e O1 2003 0601 2003 O6 01 2003 O6 01 2003 Oe6eO1 2003 06 01 2003 06 01 2003 O6 01 2003 O6 01 2003 O6eO1 2003 06 01 2003 06 01 2003 O6 O1 2003 O6 O1 2003 O6 01 2003 Close BATT FAIL l IE OVERFLOW T ERROR FLAG fie Clear History Refresh JAVE SS Date and time of error Program line Number of errors Description of error gt gt Most recent error NOTES e fthe error occurred on a program line the Address shows the line number If not it will show a hexadecimal reference e XQOB 0 power off messages are only shown if XOB 0 is programmed Setting the PCD s Clock Set PCD Clock eee S PC Clock PCD Clock Date 16 10 13 Date dd mmyy 237071990 Time 8 55 03 Time hh mm ss 19 08 40 Copy to PED 33 Day of week 1 7 1 Week of pear 1 53 30 eel Cancel Help Most PCDs have a built in real time clock which provides the date and time The Clock button displays the above dialog box which allows the date time to be viewed and adjusted The Copy to PCD gt gt button immediately copies the date time of the PC into the PCD s clock Alternatively the date and time can be entered manually and are transferred when OK is pre
79. 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 User Manual Chapter 11 I Saia Networks 10 12 13 Saia Burgess Controls AG 11 3 11 2 2 11 2 2 1 11 2 2 2 11 2 2 3 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 stations 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
80. 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 Device Configurator parameters 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 User Manual Chapter 13 Ether S Bus 10 12 13 13 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 PSB Channel Profi S Bus Waster Clr Err reft PS8 Channel EMD a3 ref PSB Channel Ry ref PSB Channel To ret PSB Channel Ee _ e 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 Fbox should be placed just below SASI Fbox PSB Channel Profil a Bus Master Clr Err ref PS8Channel Diag Prof s bus PG5 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 11 13 6 13 6 1 13 6 2 13 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
81. the instructions supplied on the CD CD PG5_InstallationGuide_E pdf 1 3 2 Starting the PG5 Start the PG5 s Project Manager Start gt Programs gt Saia Burgess Controls gt PG5 Suite 2 1 gt Project Manager PG5 PGS Suite V2 1 260 Data Transfer a WESECNet 8 iy FBox Builder Bi ween i Online Configurator e Z Online Debugger ye Project Generator PGS Project Manager PGS SD Flash Explorer ks Web Editor 5 ge Web Editor 8 The Saia PG5 Project Manager window is displayed The Project Tree window shows the structure of the new project If this window is not shown use the View Project Tree menu command Help 5 K N Project Chapter 1 Quick Start Fupla 1 Device iaai Project Folder Library Manager Example Fupla PCD M5540 A Properties lig Online Settings S Bus USB PGU ES Device Configurator Build Options Device Folder jj Program Files House A fup E Listing Files Documentation Files MIESSaqes Project Chapter 1 Quick Start Fupla Opened Device Example Fupla PCD 2 M5540 Actryated CAP NUM BUILD REQ OFFLINE G amp PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG 1 3 3 1 3 2 Folders in the Project Tree window contain project information which is arranged according to certain criteria The name of the main folder shows the project name and the number of devices used in the projec
82. the parameters required for configuration of the I O magnitudes of each channel PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 19 3 9 Printing of labels for the I O modules The Tools Label menu enables display of the window below in order to prepare labels to be placed on the PCD3 I O modules and in the PCD1 Mxxx0 and PCD2 Mxxx0 cover Select the label and edit the properties window 2 Label Editor Labels iew o x File Edit View Help 2 A Properties we fl PCD3 A400 amp Digital Outputs Transistor El Print Print label Yes Signal Start Alarme El Common parameters Text Font Arial 8 Text Color E Black o1g Line Width l Line Color Me Black Line Visible Yes El Border Border Visible Mo O16 O20 Text For output 1 Width and colour of lines printed on the labels Border Visible Traces the edge of the label in order to facilitate cutting Note pre cut sheets are available for printing the labels The size of the printed labels can appear twice the width because the intention is to fold them in two lengthwise They are therefore more stable in their holders PG5 User Manual Chapter 3 Device configurator 10 12 13 3 20 Saia Burgess Controls SA 3 10 Extension of the Device Configurator by means of new devices and I O modules When new modules or devices become available it is no longer necessary to install a new version of the Device
83. 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 User Manual Chapter 13 Ether S Bus 10 12 13 13 12 Saia Burgess Controls SA 13 6 4 Data Exchange between master and slave stations Initial Step channel assignation Step data exchange Write 8 flags Transition wait end of the data exchange in the Master Read 6 flags inthe slave st rite 6 reqiste in the slave st Read 1 register inthe Master 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 Thats 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 Exc
84. to locate the symbol in the grid Once the symbol is found it can be then drag and drop to program editor Find symbol toolbar allows finding symbols according to regular string Find Next Previous buttons are also available It is possible to use joker characters like or Symbol Editor e b ARSE oc lneG Hea Symbol Name Type Address Value Comment Actual Address EH Water_Pumpse ROOT SS y d d S o o Haban 032M comments a O Me 088M commentst Fa wast o e Weems e Eas WaterPumet 0 Ja weon OOo a M da io e YC Me e e 2 Me a a A E Fetite o e fecon O OOo a Eie a ha o oomen O oo o a Me IR TOS Mp comments Cal Feie o e Mp comments ied pe et a e All Publics System Water Pump sre In advance options it s possible to select deselect columns to look into Search will include exclude these columns based on selection Fields to search Symbol Name My commente o Comment My commenta es My comments2 aa Expression My comments ae Actual Address My comments Tee My comments a My conmmentsS Full row select PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 24 5 3 9 Saia Burgess Controls AG Auto allocation 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 addr
85. toolbar button 2 2 Place the mouse pointer on the initial step and click the left hand mouse button 3 Press the Step Mode toolbar button 3 4 Move the mouse over the new transition and gt click again 5 Continue in the same way 8 4 2 Creating a loop When the sequence ends the SB also ends To repeat the sequence a loop must be added Remember that it s illegal to directly connect two steps or two 3 transitions a loop always starts after a transition and connects above a step Press the Select Mode toolbar button Click on the transition before the jump Press the Link Mode toolbar button Click on the step to be jumped to a ee ee 8 4 3 Smart cursor option m Sequences can also be edited using the button Smart Mode This mode automatically Te changes the cursor mode according to the mouse pointer s location Smart Mode a g oe If the mouse pointer is over a step or transition then Select Mode is activated and the mouse pointer becomes a hand Double clicking opens the program editor to edit the element s code PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 14 Saia Burgess Controls SA Moving the mouse pointer to the bottom of a step or transition changes the mouse pointer to represent the transition or step which would be inserted below if the left hand mouse button is pressed If the mouse pointer is moved over the right hand side of the step or transition the mouse pointer chan
86. with the Fupla or IL editors S Fup or S Edit After the Build and Download of the program into the PCD the functioning of the program can be observed while it s running This is a great help when testing and commissioning Graftec also allows you to subdivide a large structure into smaller pages The pages are like a zoom which allows the representation of the process in the desired level of detail The execution of a Graftec program is purely sequential and follows the Grafcet rules The result is an optimal speed of execution with a very fast reaction time Even if the program contains many steps and transitions only the active transitions are executed The execution times of other cyclic parts of the program are not influenced even by a large Graftec program PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 1 Sequential Blocks SB 0 to 95 Because the timing of events is indeterminate we cannot estimate the cycle time of a sequential program This makes it important to separate the cyclic programs from the sequential programs A wait on a sequential event will never block the execution of a cyclic program To satisfy this condition sequential programs are placed inside one of the SB structures which are called on every cycle of the program If the sequential program in an SB is waiting for an event the PCD stops processing the SB and continues with the cyclic programs The SB is called ag
87. 03 Creare DIG COC TUE scresasscstnmaemanivancondhuaanuetavacsinedbeauiedaihasteadaussqarmmatevarstuestramiesdisactvotbnannatavaes 33 PG5 User Manual Chapter 2 Project Management 10 12 13 2 1 2 2 2 10 6 Firmware Downloader ccccccecescescecceccsccscesceccecescesceccecescescsceseecescescsscecescescesescescascscess 2 1 Saia Burgess Controls SA Project Management Project Organisation Modern automation processes usually contain several devices connected in a network where each device carries out a particular function For example a building control system might have dedicated devices for handling lighting heating ventilation automatic doors in the underground garage etc Online Tools Help Project Shopping Arena 3 Devices Am Properties AK TCP IP Settings Table J Common Files Library Manager 8 Central S d PCD3 M3330 192 168 1 105 S Bus Stn 5 s Properties Active Device dig Online Settings SOCKET TCP IP 192 168 1 105 Stn 5 ES Device Configurator Build Options vee Klimaanlagen fup MP Bus Linie 1 fup MP Bus Linie 2 fup MP Bus Linie 3 fup J Listing Files Documentation Files Centrale Nord PCD3 M5340 192 168 1 104 5 Bus Stn 4 Device 205V94 Parking TH11 PCD3 M3120 192 168 1 114 S Bus Sth 14 Activated Device 20U5V95 Parking TH10 PCD S M3720 192 166 1 175 5 Bus Sth 15 Activated Device Z05V96 Parking THOS PED M3120
88. 13 8 26 Saia Burgess Controls SA 8 7 2 Creating anew page To create a new page proceed as follows e Activate Select mode e Select the first step for the page e Hold down the Shift key and select the last page of the sequence E e Use the menu command Page Create Set the counter to 3 wait for the starts_p Signal Turn the output 9 Wait 1 Second Turn the output Wait on other PA z second Decrement Counter 8 7 3 Opening pages To view the contents of a page select the page and use the Page Subpage menu command or toolbar button The command Page Calling collapses the page to view the level above The top level page a is shown by the command Go To Main 8 7 4 Expanding a page To replace a page with its original sequence select the page and use the Page Expand command PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 27 8 7 5 Block Navigator Page Navigator sB15 1 f Page 1716 INIT H Page 1772 jEJEC PLAT Page 1778 ERREUR Page 1782 TESTE REF Page 1727 PRISE REF Page 1760 TESTE REF o fH Page 1765 5EQUENCE MM 56 16 Page 1853 INIT Page 1855 WARMING Hl Page 1858 PLATEALX Ec Seguente _ Page Navigator It is strongly recommended to reduce the size of a large Graftec structure by using pages This makes it easier to read the program and to navigate between the high level functionality represented by the p
89. 2 12 Saia Burgess Controls SA 12 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 Thats 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 slave station SEND SRXM for reading data in the slave station RCV Each instruction contains four parameters Channel address numbe
90. 2 Position the mouse pointer at the depart and click on the left mouse button 3 Position mouse pointer on destination point and click the left hand mouse button s Note Intermediate points of passage can also be selected To interrupt link editing press the right hand mouse button Multiple link with automatic routing 1 Select menu Mode Connect Bus or CTRL B 2 Selecta starting point with the mouse 3 Then select the destination point Link all inputs outputs on an FBox to connectors Place the mouse pointer over an FBox Right click to H display the context menu Connections Connect to Side CTRL L Connectors Ls g PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 PG5 WS K4 FUPLA E2 17 05 03 Saia Burgess Controls AG 6 17 6 6 5 6 6 6 6 6 7 6 6 8 Delete lines FBoxes connectors or symbols Select the Delete Object button on the toolbar then select the links FBoxes or symbols to delete Another faster solution is to mark a space and delete it Press the mouse button Without releasing the button drag the mouse Release the mouse button Select menu Edit Delete AOUN Move FBox connector vertically without undoing links Position the mouse pointer over the FBox Press and hold down the shift key Press and hold down the left hand mouse button Drag the mouse vertically onto a free area on the page Release mouse button and shift key To move the conn
91. 2003 0601 2003 0601 2003 0601 2003 0601 2003 x Date and time Line of program Error count Description of error Most recent error 10 17 10 18 10 4 Saia Burgess Controls AG Updating firmware Firmware Downloader Sometimes the program firmware has to be updated to benefit from the latest PCD product innovations Saia PCD firmware can be reloaded in flash memory using a little utility accessed with the Tool Firmware Downloader menu of the Project Manager Saia PGS Firmware Downlg Erasing Flash Memory File Options Help Please wait Connected to USB in Pqu mode ee Options Mone Files to download Ci Users Public SBC P65 271 Firmware 1 PLC PCD MSxx0 PCD b __Add f Delete Edt stat Ext 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 Download the firmware 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 PG5 User Manual Chapter 101 Additional tools
92. 32 Calculates R 100 control byte ADD R 100 Dae lLudaiG K 264 release bit R 100 SET BA 15 Triggers A D Conversion BITO 9 Sends control byte R 100 including release bit BA 0 Or WSZ Bae TR L2 Roads I2 Dritto WO g40905 PAEO R7 BA 0 R 77 RES BA 15 Stop A D conversion The PCD2 W340 is a general purpose analogue module which supports ranges 0 10V 0 2 5V 0 20mA and Pt Ni 1000 temperature sensors A bridge must be selected on the module to define the measurement range Resolution is 12 bits with a value range of 0 4095 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 0 and 4095 The user program must then convert the measurement into a standard physical unit PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 38 9 9 2 Saia Burgess Controls AG 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 R 100 Defines output channel 0 6 2 BITOR 2 Transfers channel to W6x0 R 100 BA 0O BITOR 2 Writes 2 filler bits R 100 BA 0 LD R 27 Defines digital value of output 0 4095 3079 BITO R LA
93. 7 18 19 23 24 25 26 26 28 29 30 30 32 33 33 34 35 35 5 2 Saia Burgess Controls AG 5 Symbol Editor 5 1 Introduction This chapter provides an overview of the Saia PG5 Symbol Editor and use of symbols in programs 5 2 Overview A symbol is a Name that indicates the address of an input output flag register etc It is advisable to use symbol Names while editing a program rather than direct address of a flag or register Giving meaningful Names makes the program easier to read For example you can assign Name Oil_ Pump to O 32 and then use Oil_ Pump as an address in your program In addition using symbols allows correction of an address or data type from the Symbol editor Instead of making correction at each place where the symbol is used in programs it is only necessary to correct it in Symbol editor The changes made to symbol definition are automatically propagated to all instances where this symbol is used in programs There is no risk of forgetting to correct at few places in program and creating an error that is hard to find Before starting to write a program all symbols needed for the program can be defined and listed in a tool called Saia PG5 Symbol Editor Once they are declared in symbol editor they are known to PGS This is very helpful for finding elements inside program files reporting programming errors or it helps during the debugging process 5 2 1 Components of Symbol Editor Opening Symbol Edito
94. AG 9 17 Example This example shows differences between the instructions OUT SET RES and COM COB 0 O STH I 0 lio 4 L OUT OD eo EO CO OF 32 6 a O 32 STH 1 0 DET GO 33 JoeL OUTPUT 33 TO 10 a STH I1 1 RES O33 660 OuUrpur 33 to 0 o33 JS gt STH TO OL Peo edge oL L y _ ee m mMm DYN F1 10 COM O 34 invert output 34 O34 Wei SS ECOB 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 Operands Instructions STH 4 input ANL Copies state of input 4 to accumulator output ORL Accumulator state is high if 24 volts are flag applied to input 4 vation p STLI4 Binary Copies inverse state of input 4 to inversion LU accumulator Accumulator state is low if 24 volts are applied to input 4 ANH I5 Performs a logical AND function between ACCU the accumulator state and the state of input 5 Instructions ANLI5 Operands ANH Performs a logical AND function between input ORH the accumulator state and the inverse state output of input 5 flag LU ACCU PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 18 9 4 3 Saia Burgess Controls AG Edge detection 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 in
95. B ts CI Prva m Files Symbol Name Type Address alue Actual Value Scope p ESEE ROOT CY Symbols and addresses of Se eo Adjust parameters Es eS e aa oRour Lo Show or Hide fF ethene me f Poe symbol EONO lel e ec See es ee e All Publics System Daily Timer HYC fup PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 38 6 15 6 15 1 Saia Burgess Controls AG Commissioning an analogue module The reading or writing of an analogue value requires a small program for each analogue module This controls the multiplexing of channels and the A D or D A conversion This program is provided either by an FBox or by the media mapping created by the Device Configurator Acquisition of an analogue measurements 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 PEDA Wwa used to acquire the analogue value These FBoxes are available with libraries Analogue modules or HEAVAC Add 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 number 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 i
96. B which timed out continued from where is was interrupted and the supervision time is restarted In Fupla programs the supervision time is configured using the Block Properties command Note Each COB has its own Index Register PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 7 1 1 Creating a block 7 5 A Fupla file can contain several blocks which can be added deleted or edited using the Block menu Comment Number Scope COB 4c FCO COB COB Supervision Time Name Type Comment Number Scope COB Supervision Time 7 1 2 Example The Block Properties command opens the window on the left Symbol name of the block Block s type COB PB FB XOB Free comment text The block s number For example COBs are numbered 0 31 PBs are 0 999 By default the block s number is empty dynamically allocated except for XOBs If the block s number is dynamically allocated then the actual block number is assigned by the build Scope of the symbol Local or Global Global means that the symbol is accessible for other files COB timeout period in 100ths of a second This example in both IL and FUPLA makes Output 64 blink at a rate of 1 5 seconds The program is written in COB 0 Other COBs if present are executed consecutively IL program COB 0 O Sri T LD gi ile COM O 64 ECOB COB it O ECOB start COB 0 supervision time 0 if Time
97. Browse button and find the project or device file directly PG5 User Manual Chapter 1 Quick Start 10 12 13 1 7 Saia Burgess Controls AG 1 3 4 Configuration Before you can work with a device 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 S Bus USB Channel S Bus USB 2 Online Settings Example Fupla Select the channel 5 Bus USB E S Bus USB Channel Type 5 Bus USB Define S Bus USB protocol Auto Station No Usb Serial Nurnber lt I don t care Refresh USB list Scan Number of retries 3 PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG 1 9 The Device Configurator defines the device type memory size S Bus station number communications interfaces etc but we won t describe all the options just yet However it is important to select the correct device type and memory size The PCD2 M5540 is always supplied with a standard 1024 Kbyte RAM a Device S To define a new device m select the correct PCD type YPS Description Mi z LI i Pl ih a mAAR EE mi n o F E Z from the Change Device AN Change Device Type ec Type Memory Slots context menu Cut Ctr Copy Ctrl C i Paste Ctrl V
98. C fup The Symbol Editor typically shows three views a view with the name of the open Fupla file two views called ALL Publics and System The view with the name of the open file allows the definition of all the locals and publics symbols used by the program of this file New symbols created in the Symbol Editor or the Fupla editor are by default either Local or Public depending on an option defined by Fupla s View Options Symbols Add symbols with Public scope The ALL Publics view shows all publics symbols in the device The System view shows all the system symbols The symbols on the ALL Publics and System pages are updated when a file is saved or when a Build is done These pages use the results of the Build to gather all the publics and system symbols from all the files in the device s program and show them in a single view To place a public or system symbol into the program select the symbol on the Public or System view and do a drag and drop of the symbol onto the Fupla page The reference to the public symbol is placed into the file s symbols page with the scope External This shows that the symbol is defined in another file The symbols on the ALL Publics page are not editable Public symbol definitions can only be edited from the file which defines them You can use the context menu s Goto Definition command to open the file which defines the symbol The File column shows the name of the file which defines the symbol th
99. CD3 T760 SIO Slave 2 PCD3 E110 8 binary inputs Alarmo 7 PCD3 A400 8 binary Outputs RemoteOutput0 7 O PCD3 W745 4 analog inputs of the Thermo element J TemperatureO 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 Device Configurator 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 User Manual Chapter 15 Profi S IlO 10 12 13 Saia Burgess Controls 15 3 15 3 15 4 PG5 project ace Project Chapter 15 Profi 5 10 Network 1 Devices 1 Common Files of Library Manager E w
100. Chapter 2 Project Management 10 12 13 2 34 Saia Burgess Controls SA 2 10 6 Firmware Downloader For a PCD to be able to use the latest functionality it may be necessary to update the firmware in the PCD This is easy to do because all PCDs store the firmware in Flash memory The current firmware version can be seen on the main window of the Online Configurator Firmware is downloaded using the Tools Firmware Downloader command available from Project Manager or the Online Configurator Ba Saia PGS Firmware Downlog Erasing Flash Memory File Options Help Please wait Connected to USE in Pgu mode Options None Files to download Ci Ugers Public SBC PGS 21 Firmware l PLC PCO MSxx0 PCD E __Add Dete edit Stat O Ew The Add button adds a new firmware file blk to the Files to download list The list remembers the last file which was downloaded For special applications the list could contain several files but for normal use please ensure that only the firmware file for the connected PCD type is present The most recent firmware files are available in a directory on the PG5 distribution CD The Options Online Settings command defines the communications parameters usually using S Bus USB or PGU mode Pressing the Start button to begin downloading the firmware After a few moments a progress dialog box will appear When completed the Run Halt and Error LEDs will flash while the PCD does some
101. Configurator or of PG5 in order to support them It is sufficient to install the XML file which describes the new hardware in a PG5 installation sub directory and restart the software C Program Files SBC PG5_21 DeviceTemplates PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls Ltd Contents P DDATA ai E ctstos wattle eis asta E EEA 3 4 1 Hardware Dala vesecesecenccesnccevcsececassysnedecdacccsnvceetecascenteausenasedesdaesesduchesesasenciscaceucecdaussaceveetecasanecacdecesic 4 4 1 1 Digital inputs and outputs eneeeeeeesssssssssseseeteerresssssssssssssetererresssssssssesseetteerresssssssssseeeeeeeeeo 4 4 1 2 Dale and E secetie ct rconetenteetetiosweesaseseaseahs sa aici tien EEE EE ase cic un eshstsa EN E ed aei 5 4 1 3 lnter pi MPUTA E E ESE 6 4 2 merma Da a a 7 4 2 1 MACS e E E E E one pacinipecactuneseneaesnee 1 4 2 2 LRG S184 fol fel E E E A T E E AAE NA 8 4 2 3 Constants oo catee csc seeratie anavoatew decrees uesectarga dea pintemnaraeciesaaaate ueeaatinnastoeaialooussnnienaequnaasvemansasadeunsaat soaxcasnemenseat 9 4 2 4 Timers and counters seseseserereesosesesesesesesessesesesososososesesessseseseesesesosososesersesesosososeseseseseseesses 10 4 2 5 Texts and data blocks nececcssvasncdvndarenddeswatacineabawsieaatindmntenteunadaakeveslonntalaaeaatastmsbeinkalendSestatacienhais caationes 13 PG5 User Manual Chapter 4 PCD Data 10 12 13 4 2 PG5 User Manual Chapter 4
102. E E E 3 15 4 Defining stations on the networK sssssssssecceccccccccsssssscsccececoccccocssssssesccccccceccccsssssssssecececeeseessssssss 3 15 5 Configuring the master station sssssssceccccccccccccocsssseescccccccceccccccosssssesscecececccosossssssssscccceceescsssssse q4 15 6 Configuring slave stations ccsccccccssssssescccceccccccccccssssescecccccceeccocccsssssssssccccccecoccsssssssssscecccceesssssssse 4 15 6 1 Configuring Input Output modules seeeeeesesesseeeeeeeeeesssssssssssssseeerersrsssssssssssssssssseerereesssssss 4 15 6 2 Configuring symbol names for remote data c cc ccssssssssseeeeceeeeeeeeeeeaeaeeesssseeeeeeeeeeeeeeeeeeeeaas 5 15 6 5 COnme unis VO Par amie el S siscactsaseceneumscneuavaneedadernaverexenaneneveuauenteeiantnisnuandaaseneseuuastenstuenndentsetenes 5 15 7 Configuring the network ssena ENA EEEE i 6 15 8 Using network symbols in Fupla or IL programs cccccccscssssssssssssssssscccccccccccccccccsccssssssssssecs 6 159 FurtberiniormaNioT asesi a 7 PG5 User Manual Chapter 15 Profi S IO 10 12 13 15 2 15 15 1 15 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 lIO network example Memory image SIO Master Temperatureo 4 R Alarm0 7 F RemoteOutputo 7 F PCD3 M5540 SIO Master 1 Profi S IO Remote IO PCD3 T760 SIO Slave 3 Remote IO P
103. Editing Symbols Symbol Editor E EB E A Falls T Cw 4 Find Symbol Name AddressValue Comment cee me COBLBABFCOD COB EB HMS Ao PCD Clock with current time Bp Daily Timer o 3 Dally Timer o S ONTIME Rm 60000 OFFTIME A 19000 Switch off time All Publics System Daily Timer fup The Symbol Editor window contains a list of all the data used in the file It can be viewed with the Show Hide Symbol Editor button or with the menu command View Symbol Editor The table has several columns Symbol Name Each input output flag register etc can be assigned a symbolic name Names are easier to remember than numbers and make it easier to understand what the data is for Using descriptive symbol names makes program maintenance much easier The first character of a symbol name is always a letter followed by other letters numbers or the underscore character Avoid using accented characters 0 etc Differences of case upper or lower are not significant MotorOn and MOTORON are the same symbol Type The data type of the symbol input I output O register R counter C timer T TEXT DB etc Address Value Each data type has its own range of valid addresses or values for example Inputs Outputs depends on I O modules inserted in PCD Flags F 0 16383 Registers R 0 16383 Timers Counters T C 0 1599 Comment The comment is linked to its symbol and can be displayed on the Fu
104. F symbol References Edit Data Edit Data Daily timer HVC Editing symbols online When checking program behaviour under certai helpful to change the states values of symbols presem in the input connectors Type Address Units F 10 Decimal Select an input connector with the mouse and right click to Current Walue display the context menu The Edit Data context menu lets you modify the Mou state value of a symbol inside a connector or the New Walue Symbol Editor 73000 Help Close PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 31 6 13 6 Display symbol state with Watch window Another useful way to test and display the symbol states in our example is in the Watch Window Press the Watch Window button Then drag symbols from the symbol editor to the Watch Window Move the mouse pointer to the button at the start FP HM of the line and hold down the left mouse button E m Da mee Th a Watch Window FER OFFTIME Gr OFF TIME A timer 5ww Daily timer a jol x Value Modify Value Symbol Comment AD HMS R 2113 103034 PCD Clock with current time Saily Timer 0 32 1 Daily Timer Ontime R 2115 60000 Switch on time OFFTIME R z114 19000 Switch off time Drag the mouse pointer 7 E into the Watch Window Symbols with their actual values and 4 Start Stop Monitoring comments To test the proper funct
105. Flag Register Temperatures Humber of Media Base Address Temperatures Temperature Temperatures Swap Bytes 1 word per register Signed Hap 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 Set Defaults 15 6 3 Configuring I O parameters PG5 User Manua Slot Installed Modules D Wed5 44 Temperature 1 E11 801 15 30V0C Edit Parameters Mapping R T emperature Temperature Mame Unit 1710 C Sensor type channel 0 PT 100 Measurement type channel 0 2 WIE measurement Sensor type channel 1 PT 100 Measurement type channel 1 2 WITE measurement Sensor type channel 2 PT 100 Measurement type channel 2 J e measurement Sensor type channel 3 PT 100 Measurement type channel 3 2 WITE measurement 15 6 15 7 Saia Burgess Controls SA 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 Configuring the network Bus Parameters Baud Rate 1 5 MBd g Profile S Net The communications spe
106. G5 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 7 13 5 5 Data Exchange between master and slave stations IP Channel Communication Channel S Bus Master IP used by Fbox Clr Err ref P Channel ENDL a ref P Channel ROMO 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 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 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 parameters
107. KET TCP IP 19 2 Eg Device Configurator oe Build Options Go Online F9 Download Program Program Files ms Display hmi ies E Global sy5 i Klimaanlagen fup J Listing Files Download Configuration Online Configurator Online Debug Data Transfer Watch Window o Documentation Files d a Centrale Nord PCD3 M5340 192 168 1 a A Properties ge Online Settings SOCKET TCP IP 19 Firmware Downloader oul ce Device Configurator Build Options J Program Files Copy Ctrl C Ctrl V Del Paste Delete CAP NUM BUILD Backup Device Print Ctrl P Find Ctrl F Alt Enter Properties Device context menu Displayed by the View Project Tree command the Project Tree provides a structured view or the project information Project folder The top level folder represents the project with its name and the number of devices it contains Use these commands to manage devices in the project Main menu Device New or context menu New Device Creates an adds a new device to the project Main menu Device Import or context menu Import Device Imports an existing device from another project If a device is imported from an old PG4 or PG5 version it will be converted to the new V2 format Main menu File Properties or context menu Properties Display or modify a project s propertie
108. Name which is already used by another Local symbol in same module file then editor displays the error and both symbols goes red When new Local symbol is added with the Name which is already used by Public symbol then editor displays a warning To eliminate these errors or warnings one of the symbols Name needs to be changed PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 35 Saia Burgess Controls AG Contents 6 PROGRAMMING WITH FUPLAA cccccceeeeeeeeeeeeeeeeeeneeenseseeeseneeeeeeeees 3 6 1 Proparine a Tupla proje iscriere OaE 4 602 Layout of the rupla Widow sirsiran E aa Ea 5 6 3 Editino Sym DOlS casts cece cere c cscs ence eances voce ceeanccceus tu sassuceusauscseyncus A E 6 6 3 1 Adding a new symbol 1 0 ccccccccsssssssssesssseececccceeeeeeesaaaasssssseseeeeceeeeeeesessaauassusseeeeseeeceeeseeeqaags 7 6 3 2 Dy IDO GST LIONS esras EN A NE EE RASSE EEO REEERE EE 8 6 3 3 Using a symbol from the Symbols list in an Fupla program ccccccccssssssssessseeeececeeeeeeeeeeeeeaas 9 6 3 4 Local Public and External symbols cccccccccccssssssssssseeeeseeeecceeeeeeeeeaeaaaaasssseseeeeeeeeeeeeeeeaaas 10 604 Fditine COMIC CIOS icssn a 11 6 4 1 Peine Connie TONS crnini E 1 6 4 2 Editing 5 yO TAS I Connettori EE AEAEE 1 6 4 3 Quick way to place a symbol and its CONNECTtOL ccc cceesssssesseeeececceceeeeeeeeeeeaaasaesssseeeeeeeeess 1 6 4 4 Drag Copy Paste Delete Sy MDOl icensicccansasvecananeecven
109. Net T FBox Builder P An Programs Pi Firmware Downloader Fe Online Configurator m Online Debugger yey Project Generator PGS 6 Project Manager PG5 SD Flash Explorer LS Web Editor 5 hey Web Editors 10 1 3 Save data with Quick Data Upload Online Settings S Bus USB PGU End Units Registers 0 16383 16383 Counters Timers 0 1599 1599 Decimal Flags 0 16383 16383 Binary lnputsOutputs 0 8191 0191 Binary DataBlocks 0 8191 6191 Tests 0 8191 old aK Cte PG5 User Manual Chapter 101 Additional tools 10 12 13 Saia Burgess Controls Ltd 10 5 555 F Quick Data Upload 10 1 4 Open Download To PCD 10 1 5 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 I If a message like the one shown here is displayed x i Error 10 No response From PCO check the communications parameters using the menu Online Online Settings and ensure that the PCD8 K111 cable correctly links the PC to the PCD Data upload takes a few moments to be displayed as follows fi Untitled4 dt5 oi xi PCD DATA TRANSFER Dat B1 4 648 sUploaded 10 01 06 16 58 43 From a 5 18 15 2H The data file can be edited with new values then saved with the File Save m
110. OBs detect the following types of error e Incorrect hardware configuration e Invalid jump addresses e More then 7 or 31 program call levels e More then 32 active transitions in a Graftec structure e Never ending loops COB supervision timeout e Mathematical errors overflow divide by 0 e Communications errors Fupla example Using features to detect to location of programming errors With Fupla it is easy to use 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 Adjust ZO6B Diagnostics Double click with the mouse to display the adjust parameters IL example The IL program s diagnostics supply the same information as above in registers Rdiag 0 12 A sala PGS IL Editor Interrupt inputs xob 13 src pr File Edit Search wiew Project Online Tools 718 _ 5 x Symbols window Help my x x Groupy Symbol Address Value o3 LI Reserved 12 dynamic registers E on al System Ta Global Mob 13 DIAG Raiac User diagnostic HALT Halt the program EXOB COB O O User program ECOB ff Saia Burgess Controls AG 7 15 Maintenance of your PLC Monitoring of batteries need to be changed every 3 to 4 years Fupla example XOB 2 Battery Failure also has its own FBox Special Battery The Err output which is co
111. OM Flash internal memory size the password use of the S Bus of input output handling options and power consumption on the I O bus To change the type of the device point the mouse on the current Device and select the context menu Change Device Type The Properties context menu enables the relevant properties window to be displayed Memory slots Memory slots available in order to receive Flash memory extensions corresponding to the type of the selected Device To configure the memory slots select and drag the corresponding memory modules from the I O Selector window to their slots To open the E S Selector window select the menu View Selector Window PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 5 3 3 Onboard Communication slots The internal communication slots represent the available communication interfaces Depending on the PCD types the number of communication interfaces is different they are only configured if they are utilized by the PCD program Some slots are pre defined others are freely configurable and require definition of the corresponding communication modules by selecting them in the E S Selector window and dragging them to a slot Selecting a communication slot displays the parameters of the communication interface in the properties window and enables them to be defined Onboard slots Represents the input output slots available on the Device The available E S modu
112. OMMENT 2 PumpsPrq 0 Pumps Program 3 Inputd 0lAnd gate Input0 4 Input1 1 And gate Input 5 Input 2 And gate Input 6 Input3 3 And gate Inputs T Qutput0O 32 Result of Input 1 and 2 8 Output 33 Result of Input 2 and 3 g 10 4 o4 gt bl AND GATES Ready PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 3 18 Symbol Tags Tags can be used to mark symbols by common functionality like Network HMI and Supervision Symbols etc New tags are assigned to symbol from check list box New tags can be added from tag cell Tags can be used to filter common symbols in a same view That makes them useful to export selected common symbols to other application like Excel or rxp Tags have no influence on the program this is just a tool to manage the symbols To edit tag select cell and enter one or several Names separated by comma or open the 5 33 te dialog box E Tag Edit Oiltempi R 101 Ioj x S_ Cari S_Profibusl P S SIO FEE ES Elaes EB BE Hetwork Symbol Name F EW SS Gy DrainPumpO eee Help Select All Clear All Cancel kel WaterPump0 al i ti LJ Gi LC E SS eoitemo a My commerts3 __ HMINetwoki _ Global feditemt RTs 101 Mycommentss Global O ecitem2 RT 02 Mycomments3 Keottems dR iO ycommertss 5 3 19 Actual Address After build Actual Address column displays the dynamic symbols addresses Dynamic address spac
113. PCD products Your partner Saia Burgess Controls AG an other PCD may also be suitable PG5 User Manual Chapter O Index 10 12 13 IV PG5 User Manual Chapter O Index 10 12 13 Saia Burgess Controls Ltd Saia Burgess Controls AG Contents 1 PCD QUICK START sascsceee ces ereceracennectsccsneusetuseressncssmeasensowvcueecerstensseusteessuaes 3 LI RCO Non aces cece ces S E 3 L2 Preparme the Ward Ware vrciccecccccessssccsscavercavessacciccevasccneessbaavsevevencecsanccuscveiecasseacissavencsvetsssiacsenssetevens 4 1 2 1 Example Stairway lighting cc ceesesssssseeeeccceeeeeeeeaaaaseeesseeseeeeeceeeeeeeeeeeaeaseesssseeeeeeeeeeeeeeeaaas 4 1 2 2 Connection diagram of PCD2 M5540 soars arconartererancde nc rene e ri EEA EAER aa 4 1 2 3 PCD IIS A ASO OLY srs deacaanetscatedencsacoucda rate i nea aai ara gt 1 2 4 AN Ml sees a hee a sais detestea pga ee go cise pean oc deen pee eae E cne as tenance 5 13 Editing he Pree an sssaaa aE a 6 1 3 1 Software Installat ON ocsiecaconcancarensnaghanineamione loosadanaeseived anewunnendonshioaunsauantanebsnanbeatsectonseewadatsunads 6 1 3 2 a e T e a E T E E T EE E 6 1 3 3 Opening a new PLO CCE da ccscisnssevicannnacedancteandnnreeansoevnacsnneteausteiovtonsewarsmessesimendaactiwebicustandvnerscaateacays 7 1 3 2 Opening an existing PLOJECE iicveccisdsdaccvesnesccdessdecetnrdindscdededserdnasededsdadabenivscedeludecanadtoesedadebecatendeaccas 7 1 3 4 OR A LOB Face e E dtmeus ve chan entac
114. Process the called block in Run then continue in step by step after returning to the block that made the call Step Out lf the program has entered a block whose content is of no interest it is possible to exit it immediately in Run mode and then continue in step by step mode after returning to the block that made the call Call block PB 7 in step by step mode Call block PB 2 in Run mode v PB 2 CEEEEEEELE EJ E n n Q Se Exit block in Run mode After returning to block continue in step by step Qttt _ _ Run mode BEEBE Step by step mode Car outgoing A car leaves into the p pagi IjO 1 8 AB 20 H PT EG IsA8688 Dunamise leaving car signal On the positiu flank of p05 F 583 8 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 I 1 To the right are shown the accumulator and status flags states and the index register value PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 34 9 8 3 Set Clear Breakpoints Run to Cursor PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG Breakpoints Breakpoints let you stop the program at an event linked to a program line or a symbol State of an input output flag status flag Value present in a register or counter Breakpoint on a symbol
115. Program Files list Files can be copied into the device directory or can be linked by a path according to the Copy files into device directory option on the Add Files dialog box File Properties or context menu Properties PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 13 Display or modify the selected file s properties name description Linked Built and Read Only and Symbol File options Check Symbol File if the file contains only the definitions of Global symbols File Properties Centrale Nord hb aro xX File Name Klimaanlagen fup Directory C Users Public SBC PG5S 27 4Projects S amples PGS User Manual hoppir File Type Fupla File fup Description Version E Linked Built Read Only Symbol File Help Cancel Edit Copy Paste Delete Copy Paste allows a file to be duplicated in the current Program Files list or any device in the project Delete removes a device and all its files to the Recycle Bin Files which comprise the device H Program Files A 4Librarie Fup a Floor Fup Select the file and un check the context menu s Linked Built option m zx Ground floor Fup Files with an arrow in the icon are processed by the build These files are part of the PCD s program and their code and data are loaded into the PCD s memory Files without an arrow on the icon are not processed by the build These fil
116. Programe Pump OOOO OOOO a _ Oil Purnp ene System All Publics 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 Entering partial symbol Definition It is possible to save partial symbol definitions which means for example you can enter symbol Names and type stop working on symbol editor and enter addresses comments and tags some other time This enables possibility of stopping your work any time on symbol editor and save the intermediate result 5 3 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 Drainobumps1 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 Up to 100 symbols can be added at time and if tried to add more it will add first 100 symbols Symbol Editor fi Lt ali O O rna ine sesno rna Poe 0 Symbol Name Type Address alue Comment t noor a Jf 0 rain_Pumpst 8 0 32 Drain Pumps in Building C ne 4 Drain system All Publics gt Type Address value Comment Actual Address Tags Scope EnDraiceipssc ROOT S o d S S o o F Dian Pumps O Jo OO fe DranPumpsnbuin
117. S 10 Slot0 Digitallnput 2 Digital input 2 Public S 10 5 IO Slet0 Digitallaput3 F S0 Slot0 Digitallnput 3 Digital input3 Publice 510 O SlotO Digitalinputs F 5 0 Slot0 Digitallnput 4 Digital input 4 Publie S10 ff 10 Slot0 DigitallnputS F SJ0 Slot0 Digitallnput 5 Digital input 5 Publie S10 i 1O Slot0 DigitallnputS F SIO SlotD Digitalinput 6 Digital input 6 Pubie S140 0 Slot0 Digitallnput E 510 Slot0 Digitallnput 7 Digital input 7 Publice S10 According to the build of the program these symbols are available in order to elaborate the Fupla et IL programs we find them among the All Publics symbols under S O S ot0 etc Symbol Editor E EB A KD Ca Find Type a substring to find Symbol Name Address alue Comment aapa O OOO O O ooo ee lt r ere Ce Feira NOT const 0 Addess ofcigta Pubis Fe distant F fo Ditaip S10 Pubie EoD F ho Diinan S10 Pubie Febe O O Digtalinut2 S0 Pue Fenaa a Dodia S0 Pue C Eg he Mick aller ik Mia l ie ik A All Publics X System Untitled3 fup Properties of analogue I O Configured as for the binary I O modules we find the same parameters in order to define the Media mapping of the analogue module on registers E Analogue Output 1 Qutpuk 1 Range O 104 in mY or resolution Minimal Value Gukpuk 1 0 Maximal Value Gukput 1 10000 Reset Value Output 1 0 On the other hand a new section provides
118. S DisinPumest o Drain Pumpsts3 Drain PumpsinbuildnigF S Disin Pumps o Drain Pumpsts4 Drain PumpsinbuildnigF o Dran i _ Z Drain_Purnps6 Drain_Pumps1 5 Drain Pumps in buildnig F a ie ee Sa Drain_Pumps Drain_Pumps1 6 Drain Pumps in buildnigF Local Sy Drain_Pumped Drain_Pumps1 7 Drain Pumps in buildnig F a ie OE Dram Pumps sre System All Publics PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 16 5 3 4 p Fm PumpOn YF poo Any Comment Local a ee ee Saia Burgess Controls AG Adding a symbol while typing your IL Program 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 Note Any new symbol defined directly from the IL editor will be added as local symbol If needed Scope can be later changed from symbol editor Example F Equations logiques Sala PG3 IL Editor Main src fia l F 188 gt ny Comment KD Ca J Find Type a substring to find Oe 0 ie Type A
119. Soc SAIA BURGESS CONTROLS Saia PG5 2 User Manual Edition 26 732 E11 Advantages of the Saia PG5 programming tools E Program portability Saia PG5 programs can run on all Saia PCDe platforms mM Program organization by files containing several program blocks simplifies the shared use of program files between several Saia PCDe controllers E Programming and debugging environments united in each program editor E Simple programming of Web panel with the Web Editor mM Powerful instruction set supported by macros and assem bler directives Features of the Saia PG5 programming tools E Symbol Manager administers all local global and network symbols or symbol groups Automatic address allocation largely dispenses with the need for fixed addressing E Project Manager administers complex installations of networked PCDs including displays and documentation HM Online functions for commissioning and error detection via Ethernet TCP IP SBC S Buse modem etc E Integrated programming environments FUPLA function block diagram S Edit instruction list IL GRAFTEC sequential function chart E Integrated network editors for SBC S Buse PROFIBUS DP LONWORKS e mM Extensive additional libraries broaden the scope of PG5 functions Saia Burgess Controls AG PG5 User Manual Chapter O Index 10 12 13 Contents oOo O N O a A O N ek on wo N O PCD Quick start Project Manager Device Configur
120. Testing the functionality of the Gateway Function H Slave station C PCD3 M5540 Station 12 Activate one of the device 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 device and to test it staying always connected via USB cable to station Master A Master station B PCD3 M5540 Station 11 To communicate with another network station activate the device 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 Configuration of the Gateway Slave port supplementary slave Supervision PG5 PG5 W Ml Supervision Wi Supervision Serial S Bu Ether S Bus Gateway slave port es tr Gateway EED er gt r PER RP a 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 Device Configurator parameters In general the PCD supports only one slave PGU channel But the new controllers may support more PGU port on the same PCD The configuration of the second Gateway Slave PGU is supported by the Device Configurator Example add a sec
121. The breakpoint condition can be defined with the help of the Online Breakpoints menu or of the Set Clear Breakpoint button Breakpoints Parking lot RUN A Symbol Hame or Type and Address Number_of_free_slots Lookup Type Address Condition Walue Counter 1400 History Counter 1400 Output Jz Clear Run Clear Stop Delete Delete All Help Close Using the above window define the symbol type and address or just drag a symbol from the Symbol Editor into the Symbol Name field then set the breakpoint condition and State value Selecting the Set amp Run button forces the PCD into conditional run mode The PCD s Run LED flashes and the PCD s Aun 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 The Clear Run button forces the PCD into RUN mode The PCD s Run LED comes on and the PCD s Aun buiton turns green The Clear Stop button forces the PCD into stop mode The PCD s Run LED goes off and the PCD s Aun button turns red Breakpoint states which h
122. Transfer 12 bits of output value to W6x0 R 277 BA 0 SET BAt 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 2047 4095 For more detailed information and sample IL programs for analogue modules please refer to your hardware manual or the support website http Awww sbc support com PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls Ltd Contents 10 AD DINONAL TOOLS ryrie 3 10 1 Data transfer WAY soars seca csessete ecco vsvasceeaseseeecvceccaeeseccneeavovesessseucvcecwscacvasconssusveenvivesacesouceceuvouseesisaes 4 101 1 Using data transen ca occ satazeasassanedetedecencanesacdasaeaccumsannchsse ieee i a a a a an iiai aiias i 4 WAI A O 0G D116 a E E E E E E 4 10 1 3 Save data with Quick Data Upload eneesnnesessssesseeeeenessssssssssssssceeeeeesssssssssssssssssseeerrrresssssss 4 MT PRC SUT AAU iat cers cept E E sae erent amebiasis E E eweecenniet 5 10 1 5 Savedata with help Of script Tle 5 sc0 nnsss tiendonnsdaaunancdendsignndascietedauiuionndeanadmeidionaceanetedvanteaniieaammndacets 5 10 1 6 Restore data with help of script file 2 cc ccss2sesetaacanaccaccinscisicatastendada
123. Type Address Value Comment b EH Daily Timer fup Ror Fm COB_2A87C007 coy 2 Symbol Editor 3 Adjust Window Find Results Type Read time Name Block COB COB_3A8 Page Daily Timer 100 EN Pos21x30 The PCD reads the data from the input connectors evaluates it according to the program and writes the results to the output connectors The symbols used by the program are all shown in the Symbol Editor window Most data types are allowed in the input and output connectors except input and constant types which cannot be used for outputs Digital inputs and constants provide read only data and can therefore only be used at the input connectors In the middle of the page we have the program made up of different graphical function boxes selected from the FBox Selector window The wires represent the exchange of data between the different functions The colour of these wires 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 family Converters 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 User Manual Chapter 6 Programming with Fupla 10 12 13 6 6 6 3 Show Hide Symbol Editor Saia Burgess Controls AG
124. a O foa ES Drain Pms 0 a Dran Pups in Buling oa z S Drain Pumps ao 34 Drain Pumps in Building F o ja FES Drain Pumpst o s rain Pumps in Bulding oea Faban Funes Drain Pumps in Bulda floa ES Drain Pess 0 ar Dran Pumps in Bung O O oa ES Dran Pes o e Dran Pumps in Bulking O O floa Ea Dainas O o a o Crain Pumps inBuldng OO O oea pas Use pb Dn S O Drain_Purmps src System All Publics Saia Burgess Controls AG 5 15 9 3 3 Referenced symbols It is possible to define a symbol with the reference to an other symbol instead of address value If you have an array of symbols this is helpful to refer the symbols address to the base address of the array The address of the symbol is defined by an other symbol of grid Also if you have a string of inputs or outputs and need to change their physical address location in the software it s easy to change with referenced symbols You only have to change the first one and all the others will follow In following example referenced symbols Drain_ Pumps 2 to Drain_Pumps8 are having address reference to first symbol Drain _Pumps7 Symbol Editor 1x E EE KD Cl 4 Find Type a substring to find Symbol N ame Address value Drain Pumpswc ROOT gt o gt SSS yS fe Dran Pures fo 22181 Drain PumpsinbuildnigF _ S Drsin_Pumps o Drain Pumps Drain Pumps in buildnioF _ S DisinPumps3 o Drain PumpsTs2 Drain PumpsinbuildnigF
125. about 2 of the PCD s capacity PG5 User Manual Chapter 4 PCD Data 10 12 13 Saia Burgess Controls Ltd Example Timer Input 4 goes to 1 On the rising edge of this input Output 65 is also set to 1 It remains at 1 for duration of 2 5 seconds Load the timer LD ie 25 Integer value Value at integer output t of the XPluse FBox Binary value X State at binary output Q 50H Eo Instruction list program Fupla program COB 0 FCycliice block U 0 Pulse STH I 4 If input 4 DYN F 12 sees a rising edge LD T 1 Load timer 1 25 gt with 2 5 pecon Fbox Time Related Exclusive pulse one shot GTH r Copy timer state OUT 0 65 TO output 65 ECOB Technical information Timers in the Saia PCD are decremented at a rate defined by the Build Options Timer Timebase 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 HEN LE BL_3DE393BA COB ELI DelayTime k Constant T 100MS 0 K Constant T 36005 PG5 User Manual Chapter 4 PCD Data 10 12 13 100 millisecondes 4 12 Saia Burgess Controls
126. ad unchanged programs There is no need to download a program which has not changed Download only the changed blocks See previous page Verify all PCD memory writes All data written to the PCD will be read back and compared This option should not normally be selected because it doubles the program download time Use it only if you suspect a rare problem with the PCD s memory chip Run the program after successful download Automatically puts the device into Run after downloading the program WARNING This option should only be selected if you are sure the program will run correctly or there is no possible risk to people or property if it fails Go online after successful download Automatically puts the device online after a successful download Backup user program to Flash after download Automatically copies the program to Flash backup memory If this option has not been selected a copy can still be made after the download using the Online Flash Memory Copy Program To Flash command 1 PCD2 M170 PCD2 M480 PCD4 M170 et PCD3 PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 21 Warn if PCD contains program with different name Compares the name of the program in the PCD with the name of the program to be downloaded If the program names differ a message will be displayed to prevent downloading into the wrong PCD Warn if a running program will be stopped Downloading a program will s
127. ages The Block Navigator provides a global view of all the SBs and pages in the file The selection of a block or a page in this view displays the corresponding block or page without having to search for it in the Graftec structure PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 28 Saia Burgess Controls SA 8 8 Graftec templates Sequences of steps and transitions can be grouped into templates which can be used like a library of Sequences in other programs 8 1 1 Creating a template m Check if a value changed 101 oS 102 Read the status 7 TE Template Properties x 1GB File C Usersich capi i ppDataiLocai Temp SBT SGrarS2 561235 tmp Group Check if a value changed Mame Read current position 169 Comment r2 It is very easy to create a template Select a sequence of steps and transitions and use the Edit Add to templates command The command is also on the context menu A dialog box is displayed which prompts for a group name template name and comment Templates are organised into Groups which are comparable to FBox Families The groups classify the templates according to the criteria defined by the author Templates are listed below their group names in the Templates window Templates Template File deflst Sah Check if a value changed t ead current position Read the status t Read latched position Read current alarm The icons show how the templat
128. ain on the next cycle of the program Sequential Block T SAIA PGS Graftec Editor Chapter 6 PULSE stc 4 M E3 ile i iew Projeck Online Mode Block Page Help 8 2 Cyclic structure with call to SB 0 COB main fup COB 0 Page 1 1 View Page Mode Resource Project Online Options 3 aa Jelealhk Ee e Set the counte to 3 Call SB Wyatt for the En fy start3_p signal 4 Vat 1 Second Symbol name FBox Call SB of the SB End of the SB wat on other Seccond Decrement Counter Counter 0 PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 5 Structure of a Sequential Block SB d Initial Step IST Transition TR 3 Step ST The Graftec editor S Graf allows an SB to created using steps and transitions which contain Instruction List or graphical Fupla code The Sequential Block starts with an Initial Step represented by a square drawn with a double line This is the start of the sequential process which is executed the first time the SB is called cold start The structure must always be closed in a loop 8 2 1 Rules for connecting Steps and Transitions The structure of an SB has a simple but strict syntax As you know the block starts with the Initial Step and then alternates between Transitions and Steps Two Steps or two Transitions can never be directly connected A E E
129. ait 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 lengthy 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 calling XOB 11 when the timeout is not actually an error A further programming technique timeslice is explained in Other programming techniques PG5 User Manual Chapter 7 Program Structures 10 12 13 7 20 Saia Burgess Controls AG 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 whic
130. al Adjust Parameters These parameters configure particular features of the FBox and they can also be modified online If the Properties window is already open just click on the FBox to see its properties which shows the Adjust Parameters If not open right click on the FBox to display the context menu and select the Properties command Editing Adjust Parameters when offline Adjust Parameters Objet pour diteur HMI Enclencherment D clenchermnent The offline editing of adjust parameters is supported by the Properties window The parameter s values are saved in the Fupla file The program must be built and downloaded for the new parameter values to be used by the PCD Editing Adjust parameters when online Adjust Window Description Online Value Saia Burgess Controls AG 6 33 6 14 1 The online editing of adjust parameters is supported by the View Adjust Window command which opens the online Adjust Window showing both the actual online values and the modified values The modified values are written directly into the PCD s memory and are not updated in the original Fupla source file The online Adjust Window is automatically displayed instead of the Properties window when Fupla is online Initialization of HEAVAC FBoxes When using certain FBox libraries such as the HEAVAC Heavac f library an initialization FBox must always be positioned on pRes RE the first page of the Fupla file It allows some of th
131. ally active the device according to the selection in the Project Tree File Properties or context menu Properties Display or modify the properties of a device name description read only option Edit Copy Paste Delete Copy Paste allows an entire device to be duplicated in the project with all its files and configuration Delete removes a device and all its files to the Recycle Bin 2 2 5 Online Settings lige Online This branch opens the Online Settings window which defines the communications for connecting to the PCD Several protocols are available PGU S Bus S Bus USB etc but only the PGU and S Bus USB allow the full protocol communications needed by the Device Configurator Channel S Bus USB EE Online Settings Central Sid Select the channel S Bus USB E S Bus USB PGU es S Bus USB 5 Bus Station Number 7 channel selected Usb Serial Nurnber SU _ Refresh USB list Select U Number of retries mode Yes PGU When selected forces communication in POU mode ignoring the Bus Station Number The Add button allows new channels to be created with their own types and parameters These are then visible in the Online Settings list of Channels PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 9 2 2 6 Z Online Configurator Connecting the PC to the PCD Channel S Bus USB The USB connection is only available for the new PCD2 and PCD3 d
132. amise_incoming_ F 7502 0 Parking lot src Flag detects the rising edge Dynamise_leaving_c F 7503 Parking lot src Flag detects the rising edge Drag the symbol into the Watch Window Symbols with their comments and states values To modify the state value of one of the symbols in the window proceed as follows 5 Parking lot Saw Parking lot ioj xi Modify Value Module Symbol Comment 3 Download Values l edited Double left click with mouse and edit new value PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 37 9 9 9 9 1 Commissioning an analogue module All program instructions presented up until now used digital inputs or outputs which are accessed directly for an a single IL instruction e g ANH I 45 Analogue I Os need a small program to read the values from each type of analogue module which manages the multiplexing and A D and D A conversion These can be programmed in IL or using the new Device Configurator s Media mapping features which are described in the Device Configurator documentation 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 EOU O 96 Module base address in PCD ACC H ACCU must be high LD R 100 Defines the measuring channel 0 7 2 MUL R LOO K
133. are available to use in current device Example Common1 src is referenced in both StationO as well as Station1 All Public Symbols defined in Common 1 src will be available in both Station0 as well as Station7 Sation1 PCD3 M5540 Station0 PCD3 M5540 see toe Online Settings see toe Online Settings H x Commonl sre ES Configuration ES Configuration sa l Commonz fup seen Build Options ee Build Options bo Program Files 2 Commend sre Working with symbols Adding symbols to symbol list Simple Method Open the file you are going to work with This will also open the symbol editor Symbol Editor always has empty row towards the end for new symbol entry To add new symbol just start typing Symbol Name and Enter Now select Type Enter Address Value comments and select the scope of symbol Once the symbol definition is added empty row is automatically added towards the end for the next symbol definition Quick Method lt is also possible to enter variables for the different information fields from the Symbol Name field This is more practical and quicker See example below PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 14 Saia Burgess Controls AG Symbol Editor EE ts 2 Pred ype askara tofi JO o Ev Symbol Hame Address alue Comment ROOT Oil_Pump sre System All Publics a een roy r Lorg Fs0Pme o o a o oe o i a Q Es iPunePio eo j
134. are in extension memory which is writable RAM The maximum number of Texts and DBs is 8191 Technical information Registers flags timers and counters are handled by the system and stored in separate RAM memory DBs and Texts are stored in the main memory together with the user program If you want to use a Flash or EPROM for your main memory your program can read from this memory but not write to it Therefore you cannot alter the content of your DBs for example your data logging In most cases you will not bother with this but if you Know that you are going to read and write your DBs then make sure to use DBs which are stored in the extension data memory gt Texts DBs 4000 and above Extension data memory is always RAM which means you can read and write to it Examples of Text and DB declarations TEXT 20 Bonjour Text LO contains the string Bon your TEXT LIJI Helv lext 11 is 7 chars Long ths first 5 are Hello and the last two are spaces DB 12 45 46 78 999 0 DB 12 has the 5 integer values Ph ord Oy 1 Op Io DBE Lo ELE DB t3 ps LO yalues whieh are all Zero DB T4 TAT 273 DB 144 es Tour values the first two are 2 and 3 the last two are 0 PG5 User Manual Chapter 4 PCD Data 10 12 13 4 14 F 128 Hr D Saia Burgess Controls AG Text definition with the symbol editor _ Oo x Definition Fired size Character Set ref calms es ANS SEND SM5 Content
135. ary the Last Volatile Flag parameter allows a volatile range to be defined The picture above shows Volatile Flags for addresses F 0 to F 2999 PG5 User Manual Chapter 2 Project Management 10 12 13 2 12 2 2 9 Saia Burgess Controls SA Program Files folder I Program Files oo LE 4Librarie Fup me Es Floor Fup AN E Ground Floor Fup This folder holds the files that make up the device s program These are the main commands you will need for managing program files File New or context menu New File Creates and adds a new file to the folder 5 New File Central Sad File Hame Directory C Users Public SBCSPGS 27 4ProjectsS amples4PG5 User Manual hoppir File Type lnstruction List File src Profibus DP Network File dp Profi S IO Network File 310 LON Network File lon Watch Window File D Descriptor Linked Built Open file now File Name Name of the file to be created Directory Directory of the device cannot be edited File Type The type of file to be created Description Free text which can be used for a description of the file history version information etc Linked Built f not checked then the file will be ignored by the build It will not be part of the user program Open File Now Checked by default the file will be opened immediately in the associated editor Device Add Files or context menu Add Files Adds one or more files to
136. assword True Host Name or IP Address 0 0 0 0 PC File Name C Users hu2dogal AppData Local Temp 5a Device Directory Name User Name User name to login the FTP server The default name for the Device is Toot Help User Name Name which identifies the user to the FTP server If no user is defined use the default root Password Access to the FTP server is protected by a password If no password has been defined use the default rootoasswd NOTE The FTP server password and the PCD password may not be the same The FTP server password is defined in a configuration file in Flash memory called FTPConfig txt The password to access the PCD is defined by the Device Configurator Save Password When True the password is remembered for the next use of this function IP Address IP address of the destination PCD PC File Name The name of the file to be downloaded By default this is the path of the zip file created in the previous step PCD Directory Name Select this entry and press the button on the right This obtains a list of Flash memory cards from the FTP server Select the desired destination for the file PG5 User Manual Chapter 2 Project Management 10 12 13 2 28 Saia Burgess Controls SA air Select a directory on the PCD Current directory fip 192 168 1 10 Nare rPe WEB It may take a little time to load and display the above information If there are several Flash memor
137. aster IP E L E i ji Fbox properties bind SEND ref IF Channel_B1 ref PChannel_ 62 END END and RCV Fboxes to the channel definition ret IPChannel_ 61 ret PChannel_ 62 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 with SASI Fbox corresponding to the channel PG5 User Manual Chapter 13 Ether S Bus 10 12 13 13 6 13 5 2 13 5 3 13 5 4 Saia Burgess Controls SA According to the network the communication channel parameters can be partially defined from the adjust parameters of the SASI Fbox and to be completed in the Device Configurator The Channel number is always defined in the adjust parameters of the SASI FBox The channel number depends from PCD Hardware and on the communication hardware used slot B1 B2 serial interface PCD7 F Assign Master channel Cornrunication i SASI S Bus Master IP SASI 5 Bus Slave IP SASI S Bus IP Extended IP Channel o Bus IP Ex IPChannel S Bus tlaster IP W Clr Err
138. ated by the Project Manager s Device Advanced Create Documentation command The resulting files are shown in the Documentation Files folder PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 17 2 3 1 Rebuild All 2 3 2 Build Changed Files Rebuild All Files Rebuild All Devices The Device Rebuild All Files command starts the compilation assembling and linking of all the Linked Built files for the active device The Device Build Changed Files command does the same thing but only for the files modified since the last build This is much faster especially for big programs The Project Rebuild All Programs command does a Rebuild All Files for each device in the project Once complete the Messages window shows the number of devices built with and without errors Double click on the red Build Errors message to move to the error messages for that device General Build Options The build options which are shared by all projects and devices are configured from the Tools Options command Build section El Build Ask before saving changed Files Ves Stop build on First error Mo Download after successful build Mo Clear message window on build Mo Create Listing files lst Yes Page titles and page breaks Mo Disable MOLIST Mo Hide Graftec parameters Mo Expand Macros Yes Cross reference list Mo Create Map File map Ves Create Documentation Files txt Mo Lines per page For listing a
139. ateway 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 PGS PGS Wi M Supervision M Supervision Serial S Bu a an modem Gateway slave port h a x pi Gateway jummi B e 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 Device Configurator parameters In general the PCD supports only one slave PGU channel But the new controllers may support more PGU port on the samedevice The configuration of the second Gateway Slave PGU is supported by the Device Configurator PG5 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 19 Example add a second Gateway S Bt a TEE Ec Port Number Modem 0 Use Serial S Bus For Modem Yes Onboard Communications Full Protocol PGU on Modem Yes Modem Name T813 T814 Description Modem Init AT amp F1 CORM RS 485 port for Pi Modem Reset ATZ r Universal Seriali 4 S Bus Mode And Timing RS 232 PGU RS 232 PGU orc S Bus Mode Data Mode mF J Baud Rate 19200 Baud RS 405 RS 485 port for gi Response Timeout ms 0 Ethernet Ethernet port IP Training Sequence Delay ms 0 Turnaround Delay ms 0 The second Gateway
140. ator PCD Data Type Symbol Editor Program with Fupla Program structures Graftec programming Programming in IL Instruction List Additional tools Saia PCD Networks Profi S Bus Ether S Bus Profi S IO PG5 User Manual Chapter O Index 10 12 13 Saia Burgess Controls Ltd Saia Burgess Controls AG ll 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 following programs documentation and material CD Saia PG5 version 2 0 Documentation CD 26 803 1 x PCD2 M5540 controller 1 x PCD2 E110 module with 8 digital inputs m 1 x PCD2 A400 module with 8 digital outputs n 1 x USB cable All the necessary instructions for installing PG5 2 1 on your computer are provided on the PG5 version 2 1 CD see under CD PG5_InstallationGuide_E pdf 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
141. ave been used before are stored in the breakpoint History list They can be selected and activated with the Set amp Run button Breakpoint on a program line By selecting a program line followed by the menu or button Online Run To Cursor the program can be made to stop at the line PG5 WS K7 ProlL E1 19 09 03 Saia Burgess Controls AG 9 35 9 8 4 Online modification of the program and data When testing a program step by step it is helpful to modify the states values of certain operands symbols and check program behaviour under certain conditions Select one of the code view 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 Online Edit Data mw 8 Type Address Units Curent ale pT New Value 3 STL Places Libres HHb0016 STL T C 1400 Help Close STL Places Libres H STL T C 1408 Edit Data The Edit Instruction command allows you to modify the mnemonic and address of the operand of the selected instruction line STH Entree Auto 2 X HH6818 STH I 0 OOOOL0 STI Ijo O F Edit Instruction Cancel Help m Me STH Entree Auto 996816 STL IjO 6 CS Status flags can also be modified with the help of the Edit Status context menu W ACCU i M Zem Negative Cancel IY Positive Ero lo Index Help PG5 User Manual Chapter 9 Programming in IL 10 12
142. 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 button or menu Rebuild All Files 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 successful Total errors 0 Total warnings 0 Messages Menson Merion SIze eS Global symbols 27 Linkage complete 0 errors 0 warnings Generating Block Information files Block Information Files complete Build successful Total errors 0 Total warnings 0 Any errors will be indicated by a message in red A double mouse click on an error message will if possible open the relevant editor at the correct location Messages Build command file Parking lot mak Double mouse click Assembling Parking lot erc on error message Error 1042 Parking loterc Line 26 Symbol not defined 5TH 1 errors 0 warnings Assembly complete Errors 1 Warnings U Linking Parking lot oby Parking lot obj Tor Parking lat ocd The error is marked in red Correction of Mcoming car_signal Of free slots DEC STH Car incoming DYH Dynamise incoming car signal DEC Number of free slots PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 31 9 7 Load program
143. c sececcesseccteseseceseesccee see 22 PG5 User Manual Chapter 7 Program Structures 10 12 13 7 1 7 2 PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG Saia Burgess Controls AG 7 3 7 Program structure A good program needs a well designed structure It simplifies the program and makes it easier to develop and maintain The Saia PCD programming language is a language which uses organisation blocks to structure the program Each block encapsulates a task program or function These are the block types Cyclic Organisation Blocks COBs Program Blocks PB Function Blocks FB Exception Organisation Blocks XOB and Sequential Blocks SB COB 31 XOB 31 COB 0 XOB 0 FB1999 Function Block Program Block SB 0 TRansition sequential Block Each block type is described in the following chapters PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 7 1 Cyclic Organisation Blocks COB 0 to 31 Cyclic Organisation Blocks COBs are the program s tasks which run continuously without program loops or waiting for events When the PCD starts up it executes the instructions in each COB in turn in a continuous loop A program must have at least one COB Because each COB is executed cyclically it can regularly check for significant events such as input signals end stop switches emergency stop buttons etc lt is important
144. ccccccssssseeseseeeeeceeeeeeeeeeeaaeaessessseeeseeeeeeeeeeeeeeaeaas 5 1232 Asson Master channe loaysicarsanaceereecqncevsacsicassns sacasnaanasonsesgacsonasouneagacannanenebssas vase signe easnauaneartenonte 6 Dee NSS TR UN Ms rs ree cage ee esd dpe ente E E 6 12 5 4 Principles of data exchange in a multi master network ccccccccsccssssseeeeeeeeseeeeceeeeeeeeeneaas 6 12 5 5 Data Exchange between master and slave Stations cccccccecceeccceceeeeeeeeeeeeeeeeeeceeeeeeeeeeaeaas 7 1230 DIO SINC srera en ET E ESE EEEE SE ETE E EEES EEES 8 120 IL proram i aa a 11 12 6 1 Assign master Channel using SASI instruction cccceessseececececeeeececaaeeeeseeeeeeeeeeeeeeeeeneaas 1 126 2 Assign slave channel s escric A ASAE A ER arai 1 12 6 3 Principles of data exchange in a multi master network cccccecccccceeeasseseeeeeeeeeeeeeeeeeeeeaaas 11 12 6 4 Data Exchange between master and slave stations cccccccccccccceeeeeseseeesesseseeeeeeeeeeeeeeeaaas 12 263 TATOOS seneceprevensicene xonesesdies ias ener eaendseeeresaeatacesane aei EN EErEE RENE ETES DUTENE EnEn EAEn Eain 13 127 GAG Way T mnei essin 15 aT Ap a O EE E E E 15 12 7 2 Configuration of the Gateway PGU function neesesessssssssseeeeeressssssssssssseseseeererersosssssssseses 16 12 7 3 Configuration of the Gateway Slave port supplementary slave eennneessssssesooeeeeeesssssssssss 18 12 7 4 Communication TMNT sa aaseectieneartocenion
145. cccccsscccccccccccccneeeeeeceeeeeeeeeeseeeeeeeeeaeseeeeeeeeeaaaeseeeeeeeesaaaeseeeeeeeaaaaaes 9 3 5 4 S BUS Mode GG AAU OS areena e r E EA E E EE N EE NE veal 10 3 6 Profi S Bus communication properties eccecceccccssssossssssecccecceccoccccssssssesscccecoccocssssssssesscccceceosoo 11 3 6 1 Po Ba A N Taa E E E E AETA 11 3 6 2 Profil BUS Master GEWAN arerin na E T E T aaa 12 3 6 3 B s Parameters user delinedi erenn ESSE tials me E EEE 13 3 7 Ether S Bus communication properties eeseseeeceeecccccsssssseeccccccccocccossssssesecececococesssssssssssssesceceeoo 14 3 7 1 Bi eo ek el BO A Slave ne ne Tn ee 14 3 7 2 Profi S Bus Master Gateway sssssseeccccceeeeeeeeaeesesssesesseeeeeeeeeeeeeeeeaauaassseeeeeeeeeeeeeseeqaaas 15 3 8 On board slots properties configuration of the media mapping sssssssssssseececcooccccosssssssseccoooo 16 3 8 1 Device properties necessary configurations ssseeeeeesssssssssssssseeterreressssssssssseerrereesssssss 16 3 8 2 Onboard slots configuration of the E S modules nnnnnneeesnsessssssessssssesereressssssssssssseeeeeeeee 16 3 8 3 Properties of binary VO sssrinin ennie a E Eaa ae ETE a 17 3 8 4 Properes ot analogue O asisesataersesatesevesadesvacemaeecananent alawotasese cotanantaetatend 6lasuaaleaeriaenenenteane 18 3 9 Printing of labels for the I O modules sssssssssssssssessssssccsscssssesssssescsssesesesceesesesesesssssssssssssssso 19 3 10 Extension of t
146. cceeeseaaaaeeeseseeeeeeeeceeeessssaaaeassssssssseeeeseeeeees 20 6 9 Temp aes ces baz cesccecsieccasessecuvcvenvecessavcvaccycueasatienecucsscuestatvenssssevauusee testis sstvaneecetsarsanivere stn easieaeaess 21 PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 1 6 2 Saia Burgess Controls AG 6 9 1 CIS ALED NANG a a E N EN E E E 21 6 9 2 Hopor ne enmnp ae Sea E A E E EA 22 6 10 Editing your first Fupla program esssssssssssececccccccccoccccssssssesccccecccccccossssssscecccceccoccsssssssssescceeeoo 24 OAO ADDIE CMV S n scan weneamaes ie van med eanuaw adeno uaugeteemn ome oaeeaaumenaaes 24 010 2 SOMON sirene tae entation eee eee tan tacts 24 GN Os POT 210 a1 000118 Lara fee nae RCT Noreen ENO Rte MT NE rn Ot ane es NOT es SAS irin ree ie ce ree te 26 611 Burling the Dro eran secsccesesvcg sacesvessivss vee cecaceetaceesisesatadtoescteactusvesdassectectedsatestocsereeebevecaderlewtes deetoeade 27 6 12 Downloading the program into the PCD ssesscececcccccccsssssscecccccccoccccccssssesecccececocccsscssssssssssscceeooo 28 6 13 Finding and correcting errors Debugging sssssescesossssssseccccecccocccoscssssssssecceecccccocccsssssssseseceeooo 28 6 13 1 Go On Offline Run Stop Step by step esessssesssssssssserrrrrssssssssssssssssseseeeeressssssssssssees 28 Oikos Dre PONE ea A E a a ceecn li G 29 613 3 Display symbols oraddi sSeSinisesnnskatun aaa aiaa 30 6 134 Display symbolstate with Pu
147. click on the file name to open the context menu and select Open A E Example Fupla PCD2 M5540 S Bus Stn 0 a A Properties lige Online Settings S Bus USB PGU Mark file or open it ve ES Device Configurator By double clicking gt Build Options The mouse button SG Program Files Open file Open Enter Open With New Ctrl N Add Files ao Files Documentation 1 3 7 Editing a program User programs t i A KD Ca J Find Type a substring to find Oi o H Symbol Name Symbol Editor used symbols Block COB BL_3E310C Page 1 1 6454 80 EN Pos 6 x35 PG5 User Manual Chapter 1 Quick Start 10 12 13 1 12 Saia Burgess Controls AG Editing symbols Symbols reference the data needed by the PCD s user program e g the stairway lighting switches We edit symbols in the connectors on the Fupla page Read symbols are on the left write symbols are on the right This stairway lighting example has 4 light switches as inputs I 0 11 2 and I 3 and one output O 32 to drive the stairway lights The required period of 5 minutes during which stairway lighting will be on must be entered in the input connector 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 add a connector and its symbol to a Fupla page press the toolbar button Add Connector and position the mouse on the Fu
148. context menu Insert Page It is also possible to insert a page after the current page with the Insert Page button or the menu item Page Insert After Page Insert Before 6 7 2 Delete a page Open the Page Navigator window mark the page to be deleted and select Delete from the context menu 6 7 3 Page navigation It is also possible to navigate with the Go to Previous Page and Go to Next Page buttons allowing movement from page to page in a Fupla block If either of the buttons is grey you are already on the first or last page of the block Goto Next Page PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 19 6 7 4 6 7 5 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 To display the Properties page select the page in the Page Navigator open the context menu and use the Properties command Page navigator 1 x EM COB COBO Sevens d Page 1 Regulation Heating regulation bat Properties Page BE Regulation Comment Heating regulation Longer description Description Processing of program by the PCD The PCD processes the pages of each block from the top left of the fi
149. ctivation 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 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 parameters 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 parameters allows the definition of the slave stations to which data can be
150. d ends with the message Build successful Total errors 0 Total warnings 0 Errors are indicated with a message in red Double clicking on an error message will open the editor and select the location of the error if possible Selecting the error message and pressing F1 will display help on the error if it s available Compiling Files Compiling Daily Timer fup S FUP Error 3060 Daily Timer fup Page 1 28 21 1 C0B6_3487C0D 7 Bad label Error 911 Daily Timer fup Compile failed Sala PGS Program Builder 2 1 260 0 Licensed to Saia Burgess Controls AG Build command file Daily timer mak J4ssembling Daily timer sre Error is marked in red or by an arrow Error has been corrected Daily Timer PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 19 2 5 2 5 1 col Download Program Downloading the Program into the PCD Download Program If the build is successful the Online Download Program command or toolbar button will download the executable program into the PCD s memory E3 Download Program Daily timer Program File Name C Wsers Public SBC PG5_21 Projects Samples PG5 User Manual Chapter 6 Fupla examples Daily timer Daily tim Destnaton Device PCD3 M5540 on 5 Bus USB PGU Before Download After Download Backup To Flash Stay in Run Run the program V Backup to Onboard Flash Halt the PCD 5 Stay in Stop Delete backup
151. d the system clock The other data such as the user program S Bus configuration and the historical table cannot be accessed The orders Run Stop Step etc are placed out of operation Setting up communication on a password protected Device displays a dialogue for password entry before enabling use of the full protocol Selecting the Cancel button sets up communication in any case with the restrictions of the reduced protocol In the event of forgetting the password the PCD memory must be wiped and reprogrammed in order to configure it without a password or with a new password Wiping the memory This is very simple for RAM It is simply necessary to cut the Device s power supply and remove the battery for a while For EPROM the memory chip must be removed from the Device and wiped by means of the UV lamp then reprogrammed with an EPROM programmer by means of the user program and a known password For Flash memories the memory chip must be removed from the Device and wiped by means of an EPROM programmer which supports Flash memory chips On reading the hardware settings the PCD password is always absent PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 8 3 4 3 3 4 4 3 5 Otherwise this would enable unknown passwords to be read in order to then load them into another PCD which would become inaccessible until the memory was removed and wiped S Bus If one of the communication
152. d with the mouse and activated with the Set amp Run button Breakpoint on a program FBox Select any FBox within the program followed by the menu or button Online Run to Fbox to make the program stop at the chosen FBox and then continue in step by step mode PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 29 6 30 6 13 3 6 13 4 Saia Burgess Controls AG Display symbols or addresses The Change Symbol Resource view button allows information from the connectors to be displayed with their symbols or addresses If pressing it does not replace a symbol with its corresponding address that symbol s address is assigned by the build 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 a binary value is shown with a heavy or fine line heavy 1 and fine 0 Other data values can be seen by pressing the Add Probe button to connect Add Probe a probe to a line Double clicking on a probe opens the a 52 Probe Display Format window allowing Py torma a choice of format for values consulted Syl eee integer hexadecimal binary floating Finat Ok Integer signed point boolean or ASCII S Bowl mE Integer unsigned Lancel J Ast Hexadecimal J Binary Decimal point 1 IP 102319 193000 6 13 5 Use a default format Help 1 ONTIM
153. ddress Value Comment Tags Scope Mainsre Uo Roo S e e e Ln 3 Coll NUM INS PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 17 5 3 5 Adding a symbol while typing your program in Fupla The Fupla editor works exactly the same way like IL editor You can enter new symbols to the Symbol editor List directly from the Fupla input output field Syntax Symbol Name symbol type address comment Note Any new symbol defined directly from the Fupla editor will be added as local symbol If needed Scope can be later changed from symbol editor Sao eka es Write the symbol name type ge he comments and press Enter L pe Find Type a substring to find CX 0 H Address Value Comment Taga Scope p e et Local ME c o S o a Block COB COB_0 Page 1 1 6454 100 EN Pos Lxd PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 18 5 3 6 Saia Burgess Controls AG Symbol Addressing Modes A symbol definition does not necessarily include all the information presented below We distinguish between three types of addressing Symbol names Symbol Editor E EE ji k Ca Find Type a substring to Find he Symbol Hame Address Value Comment Actual Qddress Tags EqDaiylimeckp ROOT OOOO e e CSS p Fabie fo OOO o poe o e o a e A Daily Timer fup System All Publics The data is defined with a symbol name type addres
154. diehannteleakahanbsivacundulsaehdandnnniwastiegancss 16 6 6 3 Multiple link with automatic routing ccc ccccccccccceceneseesesseeeeececeeeeeeeeesaaaaasseseeeeeeeeeeeeeeeeaaaas 16 6 6 4 Link all inputs outputs on an FBOX to connectors ccccccceccececeeceeeeeeeeesessseseseeeeeeeeeeeeeeeeaaas 16 6 6 5 Delete lines FBoxes Connectors Or symbols ssseesssseeeecceeeeecececaaeesseeeeeeeeeeeeseeeeseeeeeaaas 17 6 6 6 Move FBox connector vertically without undoing links 2 0 0 ccssseeseeseeeeeeeeeeeeeeeeeeeeeaas 17 6 6 7 Insert FBox without undoing Lnk cc cccccccccsssssssssseeeececceeeeeeeeeseuaeeessseseseeeeeeeeeeseeeeeaaaas 17 6 6 8 Rules 10 GOMOW sssrinin E sins Wedearyunvonsceinectaneaterise E 17 607 Editme F plai pats oocs so cecs cacseeeent cunscspenscccecasecscssesseecsesssecoaverecercsudevevsecwiuceseioscseeeeisccieessesersevecsesneess 18 6 7 1 ISG UD 1 Oe asses E cians ainuceonen E E A E ET E TE ET A ET 18 6 7 2 B Ry bey E E E N A N E A E E A A O N 18 6 7 3 Parcan e Oe N E EE NE A EESE ANE 18 6 7 4 Pape COG WC HPAI OR serpa a E 19 6 7 5 Processing of program by the PCD osicisecricosancnsrienszaaanensiudaseasseenavensaesseanescnaesauisbayoaadarsansnerenanenss 19 6 8 Copy and paS TE are Er a an nen ne Sere arn nse 20 6 8 1 Copy paste part Of a program sceeessseececcecccceceeeeaaessesseeeeeeeeeeeeeeeeasaaessssseeeeseeeeeeeeeeeeeeaaaas 20 6 8 2 Copy and paste symbols cccccccssssssssssseeeecccccc
155. ding on the destination element s type step or transition and the elements to be inserted the sequence will be added below simple sequence or to the left alternate sequence of the selected element Inserting on a step Set the counter to 3 Wait ftor the starts_p signal Turn the output second Set the counter ta 3 0 Wart tor the starta _p signal a Turn the output Turn the output on on 1 Wait 1 ne Wait 1 second second PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Inserting on a transition Set the counter to 3 Wait Tor the starts signal Set the counter to 3 Wait Tor the starts p signal Turn the output On Second Turn the output a Wait 1 Second 8 18 8 5 8 5 1 Saia Burgess Controls SA Writing a first sequential block Objective Write a program which blinks output o 33 Three_pulses three times whenever input I 2 Start_3 pulses is activated Timing diagram Input Start_3_ pulses S 5 Output Three_pulses J COT LJ L 1s 1s gt Time Creating the Graftec structure We always start with the initial step which is the start up entry point It will initialise the counter If it is not used it can remain empty without code or a comment Next we wait for the signal Start_3 Pulses Edit the transition as below and enter a comment in the Properties window Properties Set the counter to 3 block PULSE_ TR_O 0 Go Wait f
156. ditor into the Watch Window Symbol Name Select this button and press the left mouse button Watch Window Car a oming Car_outgoing I1 Red_light 032 Number_of free_slots C 1400 Dynamise_incoming_ F 7502 Dynamise_leaving_c F 7503 ng_ca so Move the selection to the Watch Window Symbols with their comments and states values lt is also possible to edit symbols directly in the window Edit new address Daily timer Sww 4 ter loj x f Address Value Modify Value Symbol Comment O32 1 Daily Timer Modify value Symbol Comment 4 DailyTimer O32 1 Daily Timer ONTIME F z005 60000 Switch on time D x Daily timer sww Daily timer Symbol Comment Value Modify Value DailyTimer O32 1 Daily Timer ONTIME R 2005 000i Switch on time OFFTIME R 004 13000 Switch off time K PG5 User Manual Chapter 10 Additional tools 10 12 13 10 0 Parking lot src Gets high when a car comes Parking lot src Gets high when a car leave Parking lot src Stops new cars at the entr Parking lot src Counts the number of free Parking lot src Flag detects the rising edge Parking lot src Flag detects the rising edge Saia Burgess Controls Ltd 10 11 10 2 3 Online display of data The Start Stop Monitoring button lets you display values present in the PCD for each of the symbols in the Watch Window Check that the Wa
157. dresses must always be defined for inputs outputs and XOBs PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 11 9 3 3 Using the Symbol Editor When a program is edited symbols already defined in the Symbol Editor window can be used 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 Symbol Name Type a Address Pakngoese moor o FNumber oi freesots e Courts the numbe Local Es Dmamnise incoming casina F Fleg detects the Local Ee Dynamis leaving casina F Fleg detects the ri Local F Caineom i f0 diets igh when a Local ele Puen ean EEEE Ctrl Space 7 4 Enter sth Dyn gt sth Dynamise_incoming_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 arrow keys f 4 and confirmed by pressing Enter Symbol entry by drag and drop nooT SSS Fe Dynamise incoming ca sional F __ Flag detects the ri Move the mouse pointer over the button a
158. e 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 IP Address Ether S Bus station number connected to channel PGU Port 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 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 5 13 4 4 Download the Device Configurator parameters in the device 13 5 13 5 1 z Online Settings Master station A Select the channel 5 Bus USB Setup E S Bus USB PoU Usb Serial Number lt I don t care gt Refresh USE list Scan Number of retries 3 PGU When selected forces communication in POU mode ignoring the Bus Station Number Help ok Cancel With the new PCD systems the Device Configurator parameters 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 Configuration on the Device Configurator window Fupla Program Assign the channel using SASI Fbox IPChannel_ B64 IPChannel_ Bz S Bus Master IP S Bus M
159. e active device is marked with a green triangle Many of the menus and Tool Bar buttons work on the active device To change the active device just select another device in the Project Tree or use the Device Set Active menu command 2 1 1 Opening a Project The PG5 is installed with all the examples in this manual The Project Open command displays a list of all projects by finding all the project files saia5pj in the Projects Directory Double click on the project to open it or select the project and press the Open button Alternatively you can press the Browse button and find a specific project or device file saia5pc in another directory Projects Directory Folder containing the oe CA Users PublicSBC PG5_ 217 4Projects projects listed below 7 Search Subdirectories Project List Project Hame A Last Opened Relative Path Chapter 1 Quick Start Fupla 2013 10 17 08 14 ASamples pa5i Selected project BAal4 PCD and Fupla Chapter 12 Fupla and Profi Samples PG5 with Profi 5 Bus Chapter 12 IL and Profi 5 ASamples PGa5 Usp T Chapter 13 Fupla and Ether DT ASamples FGS User Manual Chapter Chapter 13 IL and Ether 5 ASamplest PGS User Manua Chapter Data exchanges with Ether S Bus Chapter 15 Froti 5 10 Net ASamples PG5 User Manua Chapter Data exchanges with Profi 5 I0 Chapter 4 Hardware resour ASamples PG5 User Manua Chapter How to use inputs output and PED clor Chapter 4 Software reso
160. e as those normally used but the mnemonic has an additional letter x Example Registers are non volatile This means they keep their information when the power supply is cut or if there is a cold start If we want to make a range of 100 registers volatile we would have to initialise these 100 registers with the value zero during the cold start To initialise a register with zero we can use the following instruction LD R 10 K O0 PG5 User Manual Chapter 9 Programming in IL 10 12 13 PG5 WS K7 ProlL E1 19 09 03 9 26 9 4 12 Saia Burgess Controls AG 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 A better solution is to initialise the index register with an index of zero and implement a program loop to load the first 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 causes the loop to be exited so that the rest of the program can be processed XOB 16 CoOmd stvart block SEL K 0 Index 0 Loop LDX R I0 Load register address 10 index with zero INI ch 99 Increment index and modify accu state JR H Loop lf accu is high program jump to label Loop BE XOB COB 0 PCvVCLLG Organizar ion block
161. e context menu command Insert Pre group will place the symbols below into a group with the name of your choice To update the addresses of symbols they can be sorted by type by pressing the column header button Type edit the address of the first element then drag the tiny square on the bottom right of the cell downwards to select all the addresses to be renumbered To import the same template several times see the parameters on the General tab It allows an index to be inserted into the symbol names or groups using the character This character is automatically replaced by the index number incremented by one for each copy of the template The context menu command ndexing can also be used PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls AG 9 1 Contents 9 PROGRAMMING IN IL INSTRUCTION LIST eee eceeeeeeeeeeeeeeeeeneeeees 2 9 1 Preparing an IL Ua sass eaecacestncdssewcucececs asus sas vaauausesuneicsvarsatecs seca a 3 9 1 1 EE Mb SY e e E A ES E E E E vessetct 3 9 1 2 Cae a e E E nn errr E A 3 9 2 Layout of the IL editor windoW sssecccsssssssesececccccoccccossssessccceccooccccsssssessscccccceosccsssssssssccccecesssesesssss 4 9 2 1 Ldt a neor Codeer E a a EE r EE 5 0 2 2 Automatic formatting of instruction lnes esesessesssssseeeeeteeeressrresssssssssssseeterererssssssssssssseerereee 6 9 2 3 Creating an organization block cccecsssseeececececeeeeecaaeeees
162. e corrective actions in master or slave station e Verify the Device Configurator e Verify that the Device Configurator parameters 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 Device Configurator 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 PSB Channel Protl s Bus Master Clr Err ref PS8Channel EMD i ref PSB Channel ROWO ref PSB Channel EMD a ref PS8Channel 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 Device Configurator parameters 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 powe
163. e for each type of data is defined in Build Options of Project Symbol Editor E E i Ja fele 2 kI Ca Find Type a substring to Find gt OF 0 j Symbol Hame Address alue Actual Address ROOT manager Untied ee eee Ke cob a CC J S A E E Pais Ee Da IR Soent DrainPumet 210 Pais Ke WatePuned O Comment Wate 207 Pio Ee WatePunet o O o Comment Water 202 Pais fe OipPumpd RT Comment OiPume0 fe Public po S S S All Publics System Untitled Fup gt PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 34 Saia Burgess Controls AG 5 3 20 Initialization of symbols There are two ways to initialise symbols used by the PCD initialization during a PLC coldstart power up n 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 only once 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 7 of this document When downloading program To initialise a symbol when the program is being downloaded to the PCD the symbol address should be
164. e libraries The Installed Libraries list shows all the libraries found in the library files directory which can be used by all projects The Libraries Copied To Project list shows the libraries which have been copied to the open project s local libraries subdirectory Only the open project can use these libraries Installed libraries can be copied into the project using drag and drop or by selecting the library and pressing the Copy To Project button User s libraries or versions which are not distributed as standard with the PG5 should always be saved with the project to guarantee that the project is complete and will always build lf different versions of the same library are present the library to be used for the build can be selected with the checkboxes in the Used column PG5 User Manual Chapter 2 Project Management 10 12 13 2 8 Saia Burgess Controls SA 2 2 4 Device folder Poo Each device folder contains the configuration and files for a single controller These are the main commands you will need for managing devices Context menu Device Set Active 2 Activates the device selected in the Project Tree The active device is indicated by a green triangle and many main menu and Tool Bar buttons work on the active device Note This command is only shown if the option Tools Options Project Manager Activate Device according to Project Tree location is set to No If Yes then the Project Manager will automatic
165. e library s common tasks to be managed such as initialisation of the Err library after the program has been downloaded or after a Fbox CVC Init PCD cold start power up Initialization CVC 7 After any program download and PCD cold start 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 l Reset Automatic Reset Activated Evaluate Reset Input AC startup 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 input 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
166. e name of the open file allows the definition of all the locals and publics symbols used by the program of this file New symbols created in the Symbol Editor or the Fupla editor are by default either Local or Public depending on an option defined by Fupla s View Options Symbols Add symbols with Public scope The ALL Publics view shows all publics symbols in the device The System view shows all the system symbols The symbols on the ALL Publics and System pages are updated when a file is saved or when a Build is done These pages use the results of the Build to gather all the publics and system symbols from all the files in the device s program and show them in a single view To place a public or system symbol into the program select the symbol on the Public or System view and do a drag and drop of the symbol onto the Fupla page The reference to the public symbol is placed into the file s symbols page with the scope External This shows that the symbol is defined in another file The symbols on the ALL Publics page are not editable Public symbol definitions can only be edited from the file which defines them You can use the context menu s Goto Definition command to open the file which defines the symbol The File column shows the name of the file which defines the symbol this is the file which must be opened to modify the symbols PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 13 9 4 9 4 1
167. e 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 20mA or a voltage of 0 10V PCD Vb 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 4096 distinct setpoint states The integer value at the FBox input determines the output voltage or current of the channel Input value at FBox Output Output voltage V 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 10V Adjust Parameters Channel 0 User scaling 100 User scaling 0 Reset value 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
168. e starts and ends Any sequence can be made into a template they can contain pages branches etc and be coded in Fupla or IL PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 29 8 1 2 Importing templates The templates can be used in any projects Open the Templates window using View Templates and drag and drop the template into the Graftec structure All the steps transitions branches symbols comments and associated Fupla or IL code are inserted A dialog box is displayed which allows the modification of the names addresses comments and scopes of symbols imported by the template and changes to various other data This functionality can be compared to a Macro or Function Box with parameters Fupla Page Import E Files General Symbol List FB List Source _ SymbolName Type AddressValue Comment Scope 6e moo S Feeks O o Cal F tter j ooo o a O Received new data_ Local Number ofreceived Local a Zz as sara Site the receiving loca Eee CaloulatedCheck es a E H CourterEnorComm a a e gt a a E Ee Numberescive Fie number ofrecei Local Ets ReceivedCheck es a EL eTimesutomn a E Cancel Help a EE EnoCode A Bo R S RRR The Symbol List tab shows all the symbols contained in the template The fastest way to rename the symbols and prevent duplication of symbol names is to put all the symbols into a symbol Group Th
169. eate new symbols Simple method To add a symbol to the list open the Symbol Editor 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 Symbol Name Type Address Value Comment and Scope Quick method 1 E a S EA SEE J T peran oe ew lat e ee ee ee It is also possible to enter variables for the different information fields from the Symbol Name field This is more practical and quicker See example below 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 validate and place information in the correct fields Quick method 2 Symbol Name rean OOO ie cre oen eoe E Parking otse Ror SS S E pano O O e Quick method 3 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 eg MySymbol R 123 this is my symbol Pressing the Enter key on the keyboard with automatically place the new symbol on the Symbol Editor PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 10 9 3 2 Saia Burgess Controls AG Operand addressing modes A symbol definition does not necessarily include all the information presented
170. eate the new project Project Marne Projects Directory Enter the project name C Users Public SBCSPG5 274Projects Description Create Device 9 1 2 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 New File se Equations logique ige Online Settings SS ii New File Example Enter the file name File Hame Logoc sre Directory C Users Public SBCSPG5_ 27 Projects S amples PGS User Manual Chapter File Type and select IL file type src Fupla File fup Graftec File Instruction List File src Profibus DP Network File dp Prof S I0 Network File sia LON Network File lor Watch Window File 5w Description Open file now PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 4 Saia Burgess Controls AG 9 2 Layout of the IL Editor window Mnemonics Labels Operands Camments r Parking lot SaiiPG5 IL Editor Parking lot src ioj x File Edit Seara Wi Project Online Tools Window Help Oak d amp B lt 2 H ob Gil Sum EE TF gt Cyclical Orgafisation Block Start of COB COB A Cyclical program Sequence of a No supervision time instruction processing within STH Car_incoming l l A car comes into the parkii DYH Dynamise_1incoming_car_signal On the positiv f
171. ecastsaunesategessadanwun aeimenreumenneteane 1 8 3 4 Adda Graec TE susini riai qeaende ties vavw clea EEEE aA EAE 1 8 3 5 Page Navigator adding an SB 0 ccccccccccccccccceeeeeeeessseeseececceeeeeeeeeaeaeaassssssseseeeeeeeeeeseeeeeaaaas 12 od Editing the Gramec SICUT sosis Ee anane Onia Oi 13 8 4 1 Paitane asimpe sego ieo eire ER 13 8 4 2 C a MOO E A E 13 8 4 3 PSE UIE SON OOD E A E E T A A A A A ET 13 8 4 4 Creating an alternate branch OU i czssnczeccamensancanbecsinncanadeernarzequnsanmaseteasbeonausanebepoaghegannsseteastoons 14 8 4 5 COMME CLINGS alternate DIANC MES scercesrearni nuiis E EREE ENEN E ES IERE EEN 14 8 4 6 Creating a simultaneous branch ET cc cccccccccccccccseesessseseeeececeeeeeeeseaaaeesseseeeeeeeeeeeeeeeeaaas 14 8 4 7 Connecting simultaneous branches ccccccccccccccaeesssseseseeeeceeeeeeeeeeeaaaaassnseeeeeeeeeeeeeeeeeeeaqags 14 8 4 8 Addine COMIC TG seie sectenneeecenbootouadestaasis OEE E EEEE ETE 15 8 4 9 ESC TEMS ASC GUC MCC oss oy onescrenwanndscuecenubes soondsewercinianbensesdueuopwvers vend Erroi EE NEER ENEN N EE Erer iiei 16 8 4 10 Deleting a SCQUeNCe siessen e a a a a Eae E E aAa aSa 16 S401 C py pas ng ASEQUCICS secere ae aae ai Er anaia 16 8 5 Writing a first sequential block sscceccccccoococccccccccccecccocosocooooscecccecceceeccocosoesoccccccecececesossessscceeceeee 18 8 5 1 A ee emi a me rance SIUC GUIS rs nn RE EEE E E 18 8 5 2 Choosing the editor IL or Fupla S Edit or S
172. eccseccccccccccccecccccccccececcecceccoccoosecccsccececcecccocsosssecccccceeseececssssssseee 2 13 2 Examples of the Data Exchange in Ether S Bu5 ccccccccsssssssssssssssssscsccscccccccccccccssssssssscscesees 2 Io TG PGS PO ooo E A AO OO OAOA O 3 13 4 Device Configurator parameters ssssssssssseeccccccccccsssssesecccccccecccccssssssseceseececccocccccsssssssessecceceeeosssss 3 13 4 1 Define the device type nnnenessssseoooeeeenssssssssssssssectererssssssssssssseccteeeereeeossssssssssseeetreeeesssssssssssees 3 13 4 2 Define S Bus station number in the Network ccccsseseeecceeeceeceeeeeeeeaaaeeeseeeseseceeeeseeeeeaaaas 3 13 4 3 Define communication channel of the Ether S Bus 0 00 0 ccccccccccccccsesssseseeeeeeeeeeeeeeeeeeeeenaaas 4 13 4 4 Download the Device Configurator parameters in the AeVICC cc ccecsseeseeeeeeeeeeeeeeeeeeeeeeaes 5 L gt BML POS GAN cs cove ciessescrecccevesvescesevccestvssausceeoces sau vasusecerscisssexecuadessecsavcevenccssesssiesseeeistess easeeeeraerenaess 5 13 5 1 Assign the channel using SASI FDOX 0 0 cccccccsssssesseeseeeeeeeeeeeeeeeeaaaeaeesssseeeeeeeeeceeseeseeaeaas 5 Doe SUS CLUS es ged 01210 E a reer een een ener een rece mony nrn eee cer ere cnet hie eter tert 6 13 33 ZASSIC Mie AV CIC AMC 02ss5acedvanaanedotehocancsasnacdarsagnedunna sncmseahede E OTRE AA OR i 6 13 5 4 Principles of data exchange in a multi master network cccccccceccsssssseeseeeesseeeeeeeee
173. ector position the mouse pointer in the red circle and repeat the sequence Insert FBox without undoing link Select the FBox to insert in the window Selector Place it above the link Rules to follow Loops are not allowed If a loop is created an error message g will be displayed Page 1 Error 55 Loop back detected FT No direct links are allowed between input connectors and outputs connectors An FBox must be used Binary Direct transfer or Integer Direct transfer PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 18 Saia Burgess Controls AG 6 7 Editing Fupla pages Page with its comment Page Navigator x ETR CallBax Show page 3 COB MainProgram Add Block Page 1 Insert Page i COB ModemHandling Page 1 sms Delete Block with its comment Move p Move Down F 2 Page ey COB ManProgram o 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 Show Hide faster if you don t have too many pages in a single file By default pages are put into a COB type block For more detailed information about blocks and their use please Page Navigator ae refer to the Program Structure section in this document 6 7 1 Insert page al Open the Page Navigator window mark the reference page and select Insert Page from the
174. ed and bus profiles are defined using the Edit Bus Parameters menu command Note 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 Symbol Editor He E t 7E APEIS T a cm Pring Symbol Hame Address alue o e ooo Pee e T o o y yy Pe e a Pan o Eo n Pe ao E o e o RemoteUutputl _SIO_SLAWE All Publics System TERETE Te tured cae Temperature T SIH Alarm Temperature t OUT RemoteQutputt Temperature 2 PG5 User Manual Chapter 15 Profi S lO 10 12 13 LD Temperature Saia Burgess Coi STH Alarm 15 7 OUT RemoteQutputt 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 15 8 Further information For more information please refer to these manuals e Profibus DP 26 765 e Profi S IlO in preparation e Example Profi S lO project installed with your PG5 PG5 User Manual Chapter 15 Profi S IlO 10 12 13 Technical data Technical data Operating system PC PCD instruction set Standard FBoxes Programming languages CPUs supported Compatibility Communication Ah SoC Windows 8 and Windows 8 1 64 bits Windows 7 32 and 64 bits and Windows XP 32 bits SAIA BURGESS CONTROLS Microsoft Net 4 0 Clie
175. eeeeeeaaas 6 13 5 5 Data Exchange between master and slave Stations ccccccecceeeceeceeeeeeeeseeeeseeeeeeeeeeeeeeeaeaas 7 Por D e a E E E T E E metsc antes 8 DIU aiina E tuscsues evacenaessteevaveeteseeeanc 11 13 6 1 Assign the master channel using SASI instruction cccceceeccceeeceeceeeeaaeeesssseeeeeeeeeeeeeeees 1 13 6 2 Assign slave channel lt 2 siccecrstanansdacdtehtosscdeassuraanednaradadedntdeeiessiabatiaasaiandncsddebidusdaasdersideaudicanendanes 1 13 6 3 Principles of data exchange in a multi master network ccccccccccccceeesseeseseseeeeeeeeeeeeeenaaas 11 13 6 4 Data Exchange between master and slave stations cccccccceccccceeeeeeeeseeeeeseeeeeeeeeeeeeeeeeaaas 12 MG Dia nosies cassia e ates oiout ea cananadonsiesuta dente aswah EA e EEE 13 PACE co ha UG 0 oe re 15 el Appie Oiee Ee a a 15 13 7 2 Configuration of the Gateway PGU function eeeesessssssssseeeeeeressssssssssssseesesreerersssesssssssses 16 13 7 3 Configuration of the Gateway Slave port supplementary slave esnnssssssssesseeeeeeesssssssssss 18 13 74 Communication TM eseas NR SE ERP ES 20 135 Other RelerenCeS esircssoninoe nnana aA a aTa an ERa 21 PG5 User Manual Chapter 13 Ether S Bus 10 12 13 13 2 Saia Burgess Controls SA 13 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 13 1 Ether S Bus network Exa
176. eeeeeeseeeeeeceeeeeeeeenaaas 39 6 15 3 Example for PCD2 W610 analogue output modules ee eeeeeeeeeeeeeeeeeeeceeeeaaaaeeseseeeeeeeeess 40 PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 Programming with Fupla The Saia PG5 Fupla Editor is the simplest fastest introduction to programming Saia PCD controllers The name Fupla means FUnction PLAn a graphical programming environment in which the user draws programs with the aid of hundreds of pre programmed function boxes These functions are organized into libraries covering the basic applications through to more specialized functions for certain professional applications The special libraries include a HEAVAC library for heating ventilation and air conditioning a modem library for networking PLCs to exchange data via telephone lines analog ISDN GSM GPRS SMS messaging paging and DIMF Other libraries for communications networks LON EIB and Belimo products are also available 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 User Manual Chapter 6 Programming with Fupla 10 12 13 6 4 Saia Burgess Controls AG 6 1 Preparing a Fupla project In the Saia PG5 Project Manager window select the menu command Project New and create a new project Project Name Chapter 5 Fupla
177. eeseeeeecceeeeeeeeeeaaaeasaassssseseeeeceeeeeeeeeeaaaas 6 9 2 4 Sequence of processing for instructions and blocks sssessssseeseoeeenressssssssssssssssseeererresssssssssseses 6 9 2 5 Rules to follow when editing DIOCKS cc ccccssssssssseeeeeecceeceeeeceeeseeaaaaeeeesseeeeeeeeeeeeeeeeeaaaaassesees I 93 Symbol FLUO WINAOW escc cece sees ea satcaneveseucccccuscasaseal vaigecstocacecesussvacescesdusssvesvecseconcvecssscssciscasesesvesseecst estan 8 9 3 1 Add new symbol to Symbol Editor ist ccccccccccccccssssseessssseeeeececcceeeccsaaaaessssseeeeeeceeeeeeeeaaaaggggsssses 9 22 Operand addressing modes cccccccccsssssseessseeececceceeeeeeeaaaesssseeseeeeeeeeeeeeeesseesaaaaeeessseeeeeeeeeeeeeeas 10 9 3 3 Using the Symbol EditOf sss cwassecwnenesansconisene ueietiaxouexedananedetastinen tuettieiueaiehasecucheneventesPeertenceedevetouenes 1 9 3 4 Local Public and External symbols cccccccccccsssssssssseseseseeeeeccceeeeeeeeesaaaaasssssseeseeeeeeeeeseeeaaaas 12 94 Introduction to the PCD instruction set scctsesssssesicccssvssestecesecnsvenssceteencsvatssvesesteesseuscsdencdessiseduecerussuds 13 9 4 1 The aecuma ator ACCU F aarian a E 13 9 4 2 Boan VM SEN O e a A E E E 14 9 4 3 Edge detec HON asern sorsia aE EE AE SNE EE EEIE 18 9 4 4 S TE r E E E E E E E paaeeuenand ae 19 9 4 5 Instructions for 11TCES ic s2ccasasncdoncsnsedeatstndeondudenbeatesdaddewidnebonatedadsonbuasatantixhedenbihedsaatadadioninsndtonteansiass 20 9 4 6
178. en opened with the Block Properties command General Mamet Number Comment Type Scope Editor Name Number Comment Type Scope Editor SB_O 5T_5 Stop the mouvement Step Local No code editor Symbol name for the step or transition Number of the step or transition By default this number is empty which means it is dynamic and is assigned by the Build If necessary a number can be defined either 2000 or 6000 steps and transitions are available according to the PCD type Free test comment which is shown on the right of the step or transition Step or Transition Scope of the symbol Local or Public If Public then the symbol name can be accessed from other files but that s not normally necessary for steps or transitions IL Instruction List or Function Block Diagram PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 9 8 2 5 Typical Graftec sequences Simple sequence Alternate steps and transitions Note that two steps or transitions cannot be connected together Alternate branching OU A branch with a choice of sequences The transitions are evaluated from left to right The first transition to be active determines which sequence is executed An alternate branch always starts from a step which is connected to several transitions and is terminated by transitions which converge into a single step The Graftec editor supports up to 32 branches If there a
179. ent the register Hext HOF sHo instruction IL program lines are formatted into 4 columns Label Represented by the default colour red the label is a symbol name for a program line which is used as a destination for jump instructions e g JR L Next Mnemonic Represented by the default colour blue the mnemonic is the instruction s name Operand Represented by the default colour black the operand defines the data type input output flag register etc which the instruction will operate on The View Symbols or Values button allows either the operand address or its symbol to be displayed STH Flag Os Fe Comment Program comments are shown in green and begin with a semi colon They are aligned on the right of the mnemonic and operand but may also occupy a whole line If the comment will take several lines it can be edited between two directives SKIP and SENDSKIP These tell the assembler to disregard all text which appears between them SSKIP Author Dupont Fred Date 28 10 2003 File Logic src SENDSKIP 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 as defined in the Symbol Editor window STH Flag Copy the Flag state into the accu gt STH Flag Control the incrementation PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 6 9 2 2 9 2 3 9 2 4 Saia Burgess Controls AG
180. ent 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 Daily Timer must be switched on HMS gt ONTIME HMS gt OFFTIME DailyTimer a a 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 a Current time o ee F y HMS 0 00 6 00 19 00 23 59 OFFTIME ONTIME PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 25 Saia Burgess Controls AG DAY NIGHT DAY_NIGHT mp a 1 lt 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 es ONTIME gt OFFTIME DailyTimer a a Current time M HMS 0 00 6 00 19 00 23 59 ONTIME OFFTIME Outputs active by night HMS gt ONTIME ee HMS gt OFFTIME ONTIME gt High Daily Timer Current time po y y y HMS 0 00 6 00 19 00 23 59 OFFTIME ONTIME PG5 User
181. enu 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 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 rji MyDataTo Upload dt5 E 5 x sExemple de script 0 99 Sauvegarde les registre 99 avec un format d cimal 12 h Sauvegarde le registre 12 avec un format hexad cimal G SF sauvegarde le registre 55 avec un format flottant 8 999 Sauvegarde les indicateurs O a 999 10086 Sauvegarde l indicateur 1000 PG5 User Manual I Chapter 10 Additional tools 10 12 13 10 6 Saia Burgess Controls AG 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 Upload From PCD For more information about script commands available please refer to program help See menu Help Helo Topics F1 General PG5 User Manual Chapter 101 Additional tools 10 12 13 Saia Burgess Controls Ltd 10 1 6 Restore data with help of script file A script file also allows you to edit data to be restored Example B pi MyDataToDownload dt5 x Download sExemple de script To PCD 8 99 B Charge les registre A 4 99 avec z
182. eption it doesn t need any parameters for the Gateway Slave port only the Gateway Master port must be defined Dont forget to download the new configuration into Master A Online Settings of the project CPU ZE Online Settings Master station B a EE Online Settings Master station A S Bus USB Select the channel O S Bus USB Channel Type S Bus USB Scan Po Mo lt I don t care gt 3 5 Bus Station Number 10 Scan Auto Station No 7 Usb Serial Number I don t care gt Refresh USB list Scan lt I don t care gt Number of retries 3 Vin PGU mode ignoring the Bus PG5 User Manual Chapter 13 Ether S Bus 10 12 13 13 18 13 7 3 Saia Burgess Controls SA To make a USB communication with each PCD the Online Settings should be configured with USB channel and S Bus station number Testing the functionality of the Gateway Function Activate one of the device 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 device 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 device and Go Online Remark With the G
183. er addressing Dynamic address allocation is a powerful feature introduced to free you from having to specify a fixed address for every workspace register and flag in the program Addresses are allocated if you define a symbol name and type without specifying the address this lets the Build assign an unused address for the symbol The address range used for dynamic address allocation is configured from the device s Build Options a Devicel PCD By Dynamic Registers 000 4095 Online Settings i 2000 E p Configuration 4095 Mt Build Options ie Double click lf a build error like this occurs Dynamic address overflow for type R increase the number of dynamic addresses for that data type PG5 User Manual Chapter 4 PCD Data 10 12 13 Saia Burgess Controls Ltd 4 2 3 Constants Constants are fixed values that can be used directly or loaded into registers timers or counters Constants can be integer or floating point numbers e g 100 0 25 or Pi 3 1415 Timers and counters accept only unsigned integer values 0 2 147 483 647 Example The following example loads register R 4 with an integer value 100 which is divided by floating point value 0 25 Because register R 4 contains an integer and we want to divide it by a floating point value R 4 must first be converted from integer to floating point First copy R 4 to R 35 a work register which we know is not being used and convert R 35 to a floating poin
184. erations but works with the media mapping Fupla IL program Input slot Output slot Input slot Output slot PCD3 E110 PCD3 A400 PCD3 W300 PCD3 W400 The media mapping is configurable with PCD1 Mxxx0 PCD2 Mxxx0 and PCD3 devices However it is still possible to access the inputs outputs directly without configuring the media mapping This makes it possible to guarantee compatibility with former projects by previous versions of PG5 and devices which do not yet support it PCD1 PCD2 M1xx PCD2 M480 Device properties necessary configurations If the Device s firmware supports the media mapping I O handling can be activated or deactivated by means of the parameters below Input output handling Input Output Handling Enabled Ves Peripherical Addresses Definition Auto recommended Input Output Handling Enabled Yes all E S parameters on the module are available to support configuration of the media mapping No all of the parameters defined in Onboard slots are without influence on the user program Peripheral Address Definition Automatic or manual definition of peripheral addresses for the media mapping of each module Onboard slots configuration of the E S modules Enables configuration of the I O modules present in the device by selecting them in the E S Selector window in order to drag them to an I O slot PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 17 3 8 3
185. es a subtraction R 0 R 1 and sets status flags according to the result CMP RO Perform subtraction R O R 1 Status flags will be R 1 modified according to result of subtraction ACE P OUT O37 eRe at Se RE L ACE Z OUT Oh se RUD SRE ACC N OUT Or 3A JR O RL 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 register and then the register can be used in the floating point instruction Addition Subtraction Square root FADD RO FSUB RO FSQR R 100 R1 R1 R 101 result R 3 R3 R0 R1 R 3 R3 R0 R1 Multiplication FMUL RO FDIV RO R1 R1 R 3 R3 R0 R1 R 3 R3 R0 R1 Sine Cosine Arc tangent FSIN R10 FCOS R10 FATAN R10 R 11 result R 11 result R 11 result PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 25 Exponent Natural logarithm Absolute value 9 4 10 9 4 11 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
186. es are ignored and are not downloaded into PCD memory This can be useful for test and commissioning code which will not be present in the final program PG5 User Manual Chapter 2 Project Management 10 12 13 2 14 Saia Burgess Controls SA 2 2 10 File Types A device can have several program files of different types Each type of file has a corresponding editor for a specific field of application Instruction List Editor src Allows programming in text form using IL instructions Suitable for all applications Code is fast and efficient but it requires a lot of 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 commands for motors actuators etc Web Editor Version 8 project sIn Editor of web pages for process monitoring and control Pages can be stored inside a PCD aweb panel PCD7 Dxxx or on the hard drive of the PC Web panels and PCs display the pages on a standard browser such as Internet Explorer and can use any netw
187. ese files are present in same device External Symbols Symbol type external is a reference to Public symbol definition present in other program file To use Public symbol defined in other program file External symbol definition is needed in current program file When Public symbol is Drag and drop from All Publics filter to program editor then External symbol definition is atomically added to current file More information on using Public symbols is in next section Working with Symbols PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 9 5 2 9 Filter Views lt is possible to navigate through filters in Navigator tree and also it is possible to open each filter view in new tab Following pictures are the views for few predefined filters Grey symbol grid indicates that symbols are read only in these views Symbol definition can only be changed at the source file where actual symbol definition is present Predefined filter A Publics displays the all Public symbols present in current device Symbol Editor 1 x EE SEE See hal Aelel kE Ca Find Type a substring to Find Cx oO aj Address value Actual Address Tags Elles Oil Purnp sre eto Aun I je SS Machine ein cond OO Pc 2 boc Ee Emergency 1 i Emergency Stop Pe a AUS NomalRun jt a Mache is in nom 3 Puke ss da System Ea Device IO EEE All Publics
188. ess 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 PG5d 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 ee Symbol_Test PCD Fai tianues Garett es reir tt Ioj x ge Online Settings Ee Configuration i 24 Last Timer Timer Timebase in milliseconds 10 10000 Has Volatile Flags Double mouse click Dynamic Monvolatile Flags Used Free 690 7500 6191 Dynamic Timers Used 0 Free 17 15 31 Dynamic Counters Used 0 Free 700 1400 1599 Dynamic Registers Used 0 Free 6192 2000 8191 Dynamic Texts Used 0 Free 500 S000 3499 Dynamic Data Blocks Used 1 Free 499 S500 3999 Dynamic RAM Texts Used 0 Free 1600 SOOO 6599 Dynamic RAM Data Blocks Used 0 Free 1592 6600 6191 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 After build allocated address will be displayed in Actual Value Column in symbol editor PG5 User Manual Chapter 5 PCD Resources 10 12 13 5 25 Saia Burgess Controls AG 5 3 10 Entering text In order to add a text to your PCD t
189. essages window indicates the results of the LE DE size 54 bytes Extension memor size 0 bytes build If the program was created Global symbols 39 Linkage complete O errors 0 warnings without errors the last line in the window will show Generating Block Information files Block Information Files complete Build successful Total errors 0 Build successful Total errors O Total warnings 0 Total warnings 0 Error messages are shown in red Double clicking on an error message will usually take you to the part of the program which contains the error Project Manager also has an Error List window which shows only the error and warning messages Online tools lt remains to download the program and go into online mode ie Using the Graftec editor the execution of the sequential block can be visualised when online A red dot indicates the active transition so the sequential operation can be viewed Turn the output second Turn the output ott PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 24 Saia Burgess Controls SA We can stop the program at any time by pressing the Stop button and then continue the program step by step Each time the Steo By Step button is pressed a step or transition executed The Step n button opens the step or transition with the Fupla or IL editor so that the code inside the step or transition can be stepped through x le The Run to Element butt
190. evices Use any standard USB cable Verifying the connection Use the Online Configurator toolbar button or menu command to connect to the PCD and display its details If the information in red is shown then the connection is working properly the details will vary according to the connected PCD ri Central Sud Saia PGS Online Configurator gt File Online Tools Options Help Online Settings S Bus USB PAU Go Offline Online Settings lnformation PCD Type PODS M5540 Fw 1 22 10 Program Example Fupla Date 25 7 1990 Day 1 Hardware Info Time 18 01 39 Week 30 Status Aun Device Configurator History Clock Ent Communications Error x If the connection cannot be made an error message like this is displayed Check the PCD has power and verify the Online Settings and the cable connection PG5 User Manual Chapter 2 Project Management 10 12 13 2 10 2 2 1 ES Configuration 2 2 8 Build Options Saia Burgess Controls SA Device Configurator The Device Configurator defines the hardware and physical features of the controller such as the device type memory communications channels fitted modules and I Os etc It also verifies that the power supply provides enough power and it can print labels for the I O modules To commission a PCD it is necessary to configure at least the PCD type and its memory size Other items such as communications and I Os can be configured
191. examples Projects Directory C Users Public SBCSPG5_ 274Projects Description Create Device Next create a new Fupla program file in the project by clicking on the New File button on the toolbar or click the right hand mouse button on the Program Files branch and use the New File command from the context menu f Daily timer PCD3 M5540 AT Properties hip Online Settings 5 Bus USB PGU New File E Device Configurator Bi Build Options cel J E Listing File Donma Add Fi Chapter 5 Fupla examples pec Daily timer HW cd Lot PED3 ME Paste New Project Marne Projects Directory LC Users Public SBCSPG5_ 274Projects Description Create Device Select the file type Fupla File and press OK to open the Fupla editor S Fup PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 5 6 2 Layout of the Fupla window Ja Daily timer Sata PGS Fupla Editor Daily Timer fun i File Edit View Device Online Mode 1 Read EEPROM Register 1 Read firmware version 1 Read IP configuration 1 Read S Bus PGU parameters 1 Read S Bus station 1 Read serial number 1 Read system counter T Readtime 1 Read user Lig nla name Dl e r Time related Read time 5 Fup Base 2 7 200 Reads the PCD clock LU e ee en ee ee oo 1 Symbol Editor E ES A kD Cu p Find Type a substring to find Symbol Name
192. f Downloading File dialog box is displayed Certain parameters and options on it will match predefined those in the PG5 project The person present at the job site can either leave these options as they are or modify them before downloading to the PCD This means that no special knowledge of the PG5 is needed to download programs and configurations into the PCDs The utility works without having to install the PG5 or user licences However the Stand Alone Online Tools package must still be installed on the PC Creating a self downloading file Create Self Downloading File Daily timer _ a File To Create saiasd5 C Uesers5Public SBC PG5_2175Projects 5 amples PG5 User Manual Chapter 6 Fupla exampl gt Comment User Saia Burgess Controls 4G Project Chapter 6 Fupla examples Device Daily timer PCD S M5540 Created 18 10 2013 08 00 Online Settings S Bus USB PGU End User Dialog Box Options E No Dialog Box show Progress only Show Advanced gt button Old Firmware below 1 16 17 see Help Actions Downoad Program Backup to Onboard Flash Downoad Configuration Backup To Flash Card W Update Communications and Options Default by Priority see Help Update Password File Format bak Image Format Options Clear Media A T CF Delete old backups from All Flash Cards Don t Clear Outputs Stay in Stop after download Clear History Check IP Address won t change Set Clack fr
193. f 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 PCD VS module to be defined This address indicates where the Add module has been inserted in the PCD 0 16 32 PLD VS Analogue measurements are available at FBox inputs 0 to 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 particularly when the value is used on several different pages of the program or by Graftec Steps and Transitions 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 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 39 6 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 PCD Was a Err Err Add Add FBoxes PCD2 W3 PCD2 W34 PCD2 W34 with error Add Units of measurement depend on the module FBox and adjust parameters selected The PCD2
194. followed by colon equals which is in turn followed by the initialisation value Example Be careful Remember to tick the following option when downloading the program iw First time Initialization Data PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 3 21 5 3 22 Reserved words The following words are reserved and cannot be used as symbol names a Assembler instructions PUBL EXTN EQU DEF LEQU LDEF MACRO ENDM EXITM z Codes de commande et notations abr g es des diff rents types de donn es du PCD 1 O F R C T K M COB FB TEXT X SEMA DB m Special instructions MOV N Q B W L D Conditional codes H L P N Z E z All instructions mn monics 7 Symboles pr d finis Internal symbols reserved to the automatic resources allowance begin with an underlined char Example TEXT F m Intern symbol _ CSTART__ used with Errors and Warnings Warnings and errors are displayed incase of non acceptable entries are made to symbol editor Following are couple of examples Too Short Symbol Name When only one character is entered as symbol Name editor gives an error as symbol Name too short min 2 Characters Duplicate symbol Names When new Public symbol is added with the Name which is already used by another Public symbol then editor displays the error and both symbols goes red When new Local symbol is added with the
195. from Onboard Flash Backup to Flash Card Options j Default by Priority see Help Download First time Initialization Data File Format sbak Image Format Clear Media R F T C C W Don t Clear Outputs Delete old backups from All Flash Cards E Advanced gt gt Help setDefaults Program File Name By default this is the path of the active device s PCD file All Downloads the entire program Code Text DB Extension Memory Downloadable Files Changed Blocks Downloads only the blocks COB PB FB SB ST TR XOB which have changed since the last download This option should only be used to save time when downloading minor corrections while developing a program The Changed Blocks button can be used to display a list of changed blocks See help for more details Download in Run Allows changed blocks to be downloaded without halting program execution Proper operation of the program depends on what changes have been made see Help for details Do NOT use this option unless you are sure that the changes are correct Selected Segments Only downloads the sections defined by the Selected Segments options Code Segment Program Text DB Segment Texts and DBs 0 3999 Extension Memory Texts and DBs 4000 Downloadable files Configuration files such as BacNet configuration First time Initialisation Data Specific media R T C F can be initialised when the program is do
196. fully edited program can be read and executed by the PCD it must be built or converted using the command Device Build Changed Files or Rebuild All Files from in the Project Manager or the Fupla editor The Messages 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 OEDEF F Code size 143 lines 572 bytes Text DB size 64 bytes Extension memory size 0 bytes Information segment size B0 bytes Global ymbols 56 Linkage complete 0 errors 0 warnings Any errors are indicated with an error message in red 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 PG5 Projects Chapterd Chapter D aly Timer fup S FUP Error 60 Daily Timer fup Page 1 1 27 11 Bad label Error Compile tailed d APG5 Projects Chapter4 Chapterd D aly Timer fup p Build Failed Error marked in red or indicated with an arrow Correction of error Daily Timer PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 28 6 12 coal Download Program 6 13 6 13 1 Saia Burgess Controls AG Downloading the program into the PCD The user program is now ready All tha
197. g Z is high P If status flag P is high N If status flag N is high E If status flag E is high 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 O 0 STA Ee lt i Copy flag state to accumulator DYN F 2 Force accu high on rising edge of flag Fl JR L Next If accu state is low jump to label Next ING R 10 Next NOP ECOB The instructions STH and DYN read information from flag F 1 and set the accu state high for a positive flank or low in the absence of a flank Depending on accu state the instruction JA 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 O 0 LD Fe 2 Load line number into register Next o CH Po Copy flag state to accumulator DYN I Force accu state high on rising edge OR Lag E oe Te A PLE accu is dow Jumea vo line number defined in register 2 ING R 10 Next NOP ECOB The indirect jump offers great flexibility The program can itself modify the line number to which it will jump PG5 User Manual Chapter 9 Programm
198. ges to indicate that an alternate or simultaneous branch will be created if the left hand mouse button is pressed 8 4 4 Creating an alternate branch OU 1 Activate Transition Mode 1 2 Select a transition which us already followed by a state 2 gt 3 Each time the left hand mouse button is pressed a new transition as added to the right 8 4 5 Connecting alternate branches 1 Activate Select Mode 1 2 Select a transition to connect 3 Press the Link mode button D 4 Click on the step the transition is connected after this step 8 4 6 Creating a simultaneous branch ET 1 Activate Step Mode a 2 Click on the first step to connect a new step on the right 3 Each click of the mouse on a step 2 connects a new step on the right 8 4 7 Connecting simultaneous branches To synchronize simultaneous branches Activate Select Mode Select the step to be connected Activate Link Mode Click on the destination transition P PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 4 8 Adding acomment 1 Activate Select mode 2 Right click with the mouse on the step or transition to display the Properties window 3 Enter the comment in the Comment field of the Properties window Tip To create a comment on two lines enter n for example Line 1 nLine 2 PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Turn input OP General Marne Mumber Comme
199. gram and data cccccccsssssssssssseeecccceeceeeeeeeeeeaaeaesssseseeeeeeeeees 35 9 8 5 Viewing and modifying symbol states with the Watch Window ccccccccsssseeeeeeeeeeeeeeeeeeeeeeneaaas 36 9 9 COMMISSIONING AN ANALOGUE MOAUIE ccccrrrsssssssscsssccccccccccccccssssssssscssccccccccsccccscsssssssssssssceees 37 9 9 1 Example for PCD2 W340 analogue input MOdUIES cccceccccceceeeecceeeaeeeeeseeeeeeeeeeeeeeeeeeeeaaas 37 9 9 2 Example for PCD2 W610 analogue Output modules cece ceeccccceeeccceeeaeeeeeeseeeeeeceeeeeeeeeeeaaas 38 PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 Programming in IL Instruction List The Saia PG5 IL editor S Edit can be used to create the fastest and most efficient programs for Saia PCD controllers IL stands for Instruction List which is a low level non graphical language using the PCD s native instruction set All PCD models share the same 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 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 1 Preparing an IL project First prepare a new project and file in which to edit the IL program 9 1 1 Create new project In the Saia PG5 Project Manager window select menu File Project New and cr
200. gs counters timers registers texts DBs COBs PBs FBs and SBs Inputs outputs XOBs and constants must always have a fixed address PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 9 6 3 3 Using a symbol from the Symbols list in an Fupla program When a program is edited symbols already defined in the Symbol Editor window can be used in different ways Symbol entry from the keyboard The symbol name is entered into the page connector in full using the keyboard This method might allow a symbol name to be entered with a typing error causinh a new symbol to be added to the symbol table Symbol entry by selective searching If only the first few characters of the symbol name are typed the 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 T 4 and confirmed by pressing Enter Symbol Hame Type Address alue Comment Scope H Daily Timer fup ROOT a Bs HMS S Ro Poko Ee daiyTine O a Daly Timer Local Ee onrive 60000 Switch on tne Local Ge OFF TIME 19000 Switch off tine Local o p Facsen a Ctrl Space Symbol entry by drag and drop This way of using a symbol excludes any possibility of typing errors In the Symbol Editor window place the mouse cursor ove
201. h lies outside the Flag s address range of 0 8191 XOB 13 Error flag set Many instructions can set the Error flag see the Reference Guide status flags If an error occurs the Error flag is set and XOB 13 is called so that error can be handled alarm error message to a printer etc XOB 13 is always called when the Error flag is set irrespective of whether the cause is a calculation data transfer or communications error lf a more detailed diagnostics is needed for the Error flag a PB or FB can be conditionally called after every instruction which could set the Error flag Example DIV R 500 vale 1 R 520 value 2 R 550 result R Dol gt remainder CPB E 73 sif error then call PB 73 PB Ta divide by zero SET O 99 INC C 1o71 EPB PB 73 is called after a divide by zero which turns on Output 99 Counter C 1591 counts how often this event occurs An overflow from multiplication could for example activate output 98 and increment counter 1590 XOB 13 should also be programmed but can be empty If it is not programmed the Error LED on the PCD s 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
202. hange 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 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 13 13 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 Station F200 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
203. he Device Configurator by means of new devices and I O module 20 PG5 User Manual Chapter 3 Device configurator 10 12 13 3 1 Saia Burgess Controls SA PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 3 ES Hardware Device configurator The Saia PG5 Device Configurator enables configuration of the Device s equipment parameters Device type memory communications channels input output modules but it also checks the power consumption by the input output modules on the internal power supply of the PCD and prints labels for sticking on the I O modules In order to place a PCD device into service it is necessary to define at least the type of PCD and its memory configuration The other configurations can then be added according to the required services such as communication networks or I O handling For those familiar with versions PG5 1 4 and older the Device Configurator is an entirely new program presenting configuration parameters with a new human machine interface organized in a very different way Although new configuration options are available both Devices and their configuration parameters remain the same as before Scanning the Device parameters to the configurator The simplest method to realize the configuration consists in linking the computer to the PCD using a USB cable and scanning the configuration already present in the PCD s memory using the menu O
204. he Devices to be networked in order to exchange data between PCDs and supervise the process It also supports all service functionalities by means of the Saia PG5 programming tool PGU PGS CI CI Ci Supervision Supervision eM fii Euli i masters PIN _ j a e PGU slave channel Serial S Bus Profi S Bus Ether S Bus or modem line Profi S Bus PGU slave channel The properties window corresponding to the S Net communication slot enables a Profi S Bus slave or master gateway channel to be configured Start by activating the desired configuration then add the active parameters Profi S Bus slave Defines Profi S Bus channel as slave or PGU slave This definition may be complemented by a master function by adding a SASI master instruction in the Fupla or IL program 4 Profi S Bus Channel Number Profi S Bus 10 Profi S Bus Enabled Yes A Full Protocol PGU Profi 5 Bus No Slave Yes FDL Address 0 Use S Net Configuration No Net File Name Baud Rate Profi S Bus 1 5 MBd Bus Profile SNet Full Protocol PGU PGU Slave Yes Supports the exchange of data with master stations supervision systems and terminals but also supports the programming tool and tool for setting up PGS Slave No Only supports the exchange of data with the master stations supervision systems and terminals PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 12 3 6 2 Address Address of the
205. he 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 Channel Settings S Bus Modem E 5 Bus USB Channel Type 5 Bus Port Type Miming TN Delay 1 TS Delay Delete Stefi To adjust the Timeout of the data exchange program to the PCD use Fbox SASI S Bus IP Extended IP Channel Adjust Parameters Channel Channel 8 Gateway Mo PG5 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 21 13 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 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 15 1 Contents INT IN icc eee aw cece ee ee ee sede ece ween receneceuneets 1 19 PROFFS IO eisai tie craters to awe at ore tae tise A aE 2 15 1 Prom TO network Ox aii ple sess scesccccacsas caves concaceececscwsssesssusvasacevsvaescedescosvevsrseecavsesuvoavercousevesssseavexsss 2 M52 eneral MNC ONA y vs ssececenscc csctcetezecteasucudecetscvetensuatstcesuanstcoseecetesteveussareicsGeasansususvassecseectansussasieesess 2 LS POSPONE a E
206. he communication channel this number may be used by program instructions in order to designate the assignment channel SASI or to transmit data exchange telegrams PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 9 3 5 1 3 5 2 3 5 3 Full protocol PGU Serial S Bus PGU slave for series line 4 Serial S Bus Port Port Number Serial S Bus O Serial S Bus Enabled No Full Protocol PGU Yes Extra Serial S Bus slave communication slots can be configured using a reduced protocol without the PGU function Only the PGU slot is configured from the configurator the slave function without the PGU function is configured from the program Fupla IL with the assistance of the instruction SASI Note the S Bus address is defined in the device s properties Public Line S Bus Modem PGU slave for a modem line This configuration is only available for series communications slots which provide all control lines required for linking with a modem Provides the same services as Full protocol PGU Serial S Bus but through a telephone line and an analogue or ISDN modem To enjoy simplified operation we recommend using SBC modems 4 Public Line S Bus Modem Port Number Modem 0 Use Serial S Bus For Modem Yi A Full Protocol PGU on Modem Po Yes Modem Name Modem Init Modem Reset Modem Name Enables selection of the type of modem used It is recommended to use Saia PCD modems thus they are al
207. he text must first be declared This can be done by selecting symbol type as TEXT in symbol editor Also it can be declared by entering data type as X after the symbol name as shown in below example Example Symbol Editor Stee sale eee eee ese KD Ca Ye Find Type a substring to Find gt Oe 0 fe Symbol Hame Type Addressalue Comment Actual Address Tage Scope C SS eC w J o O O a Re Pump al Vi Cintenc myc S A a Symbol Editor md EE El laele m KD Cu Find Type a substring to Find Ce O H Symbol Hame ppe Address alue Comment Actual Address Tags Scope Geisen O e y ocal ocal ocal Click here to define text Text Edit SmsTex W Fixed size bas Content of text Do not forget to use otherwise the text will not be valid PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 26 Saia Burgess Controls AG 5 3 11 Entering DBs DBs have a special editor too Define Symbol of type DB and Click on button in Address Value Coulmn to display following editor Enter size Number of DB elements and Click on Create button Also Default Values and Comments can be added E DB Edit DB1 DB F Definition Size of DB Size Default values and comment 5 3 12 Symbol Cross Reference Often a symbol will be used several times inside the program file or even in several different files After saving files you can right click with the mouse on any symbo
208. his is enabled by an option on the Build Options dialog box Advanced group set Generate SB calls to Yes This option is set to Yes by default You can create the SB first as described below and then add the call afterwards so you can use the symbol name of the SB instead of the number 8 3 4 Adda Graftec file New Ctrl N Add Files Project Tree u Project Chapt H E Common Files Paste New File Daily timer LIE Libraries ay i eti le ame 42 Devicel PCL Delete All I Pon Pulsed lle Online Setti Print E ES Configuratir rn Directory ean Build Options C Users PublicSBCSPG5_ 27 4Projects S amples4PG5 User Manual Chapter I L Program Files File Tipe COB Calls 56 fup 7 l Es Pulse sfc Grattec File stc nae Instruction List File src Listing Files Profibus DP Network File dp D tation Fil Prof S I0 Network File sic Sera LOM Network File lori Watch Window File Suu Descriptions Choose the file type Graftec File sfc Linked Built Open file now Help Cancel PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA Page Navigator adding an SB When a new Graftec file is created the editor automatically creates a sequential block containing the initial step Several SBs can be created inside a single Graftec file The Page Navigator and Block Symbols windows show the list of SBs in
209. i sUser Comments gt STH Flagi Comments From Symbol Editor Actual Value This is read only column It displays the dynamic address assigned by system to operand after build Tags Tags can be used to mark Public symbols by common functionality like Network HMI and Supervision Symbols etc Scope Local Public or external scope can be selected form drop down list PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 7 5 2 3 Grouping symbols together If desired symbols can be grouped together This makes the program easier to read Just use the right mouse button or CTRL G to add a new group to the symbol editor and then define drag and drop the symbols you want into the folder Group names can be nested up to 10 deep e g Group1 Group2 Group3 Symbol Example The Group named LotOne contains several symbols Symbol Editor ax 3 Actual Address Tags L Lot sre E Blocks Public Y Local H E All Publics i o New Car Arrived l Local 1 Car left the parking Local 0 32 Parking Place is Full Local l System E Device IO COB 0 0 Local Lot stc cok E i m gt out LotOne Lot full gt LotOne Lot_Fulll giii m In the program the group name LotOne precedes the symbol Name Lot_full and both are separated by a Dot In very large programs you may have many symbols with simila
210. ial number is only supported by the latest PCD3 systems The Online Configurator can be used to read it online using the menu Online Information command Downloading a self downloading file The Stand alone Online Tools package must be installed on the PC For more details please refer to the PG5 installation guide Simply open the saiasd5 file from Windows Explorer by double clicking on it A dialog box like the one shown below will be displayed so the destination and details can be verified before starting the download If the Advanced gt gt button is shown additional options can be configured before the download but that s not usually necessary Start the download process by pressing with the OK button PG5 User Manual Chapter 2 Project Management 10 12 13 2 23 2 24 Saia Burgess Controls SA Saia PCD Download Self Downloading File So File To Download saiasd5 C Users Public SBC PGS 214Projects S amples PG5 User Manual Chapter 6 Fupla examples Project and Device Project Chapter 6 Fupla examples Device Daily timer Created 18 10 2013 08 02 19 Comment User Sala Burgess Controls 4G Project Chapter 6 Fupla examples Device Daily timer PCOS M5540 Created 18 10 2013 06 00 Online Settings S Bus USB PGU 2 8 Flash Backup Memory Order No PCD7 R5xx PCD3 R5xx PCD R600 Slots M1 M2 I O slot 0 3 I O slot 0 3 Systems PCD1 Mxxx0 PCD3 PCD3 PCD2 M5 PCD3 All PCD models
211. ies fitted each Flash is shown with its directory structure Select the Flash and directory If necessary directories can be created and deleted with the associated buttons M1 FLASH and M2_FLASH Flash memory cards fitted in slots M1 and M2 of the PCD SLOFLASH SL1FLASH etc Flash memory modules fitted in slots 0 3 of the PCD NOTE This feature is supported only by new PCD models fitted with Flash memory that has the new Flash File System Restoring a project or device from Flash This is done with the command Online Flash Memory Restore Source From Flash This uploads the zip file from Flash memory and decompresses it 6 Restore Source From Flash e S Restore from PCD with Flash memory Daily timer PCD3 M5540 Pressing OK shows the FTP uploader dialog box with the same parameters as show previously for the download operation Use the PCD Directory Name button to establish communications with the FTP server and to select the Flash memory and directory containing the zip file to be restored Then confirm the upload a restoration of the project or device PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 8 3 2 9 2 9 1 Block Call Structure Backing up data to a file The FBox library called File System supports access to data files in Flash memory These files can be read and written and can be up and downloaded via FTP For more information about the number
212. igh 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 Device Configurator 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 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 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 15 13 7 Gateway Function The Gateway feature is commonly used to allow two different communication networks to communicate together or adapt a programming tool PG5 or a supervision system Visi to use
213. ilter Symbol Name Group Name Types Address Value Actual Value Comment Filter Name My AilterName Description My Alter omment Filter Name Filter user name OK Cancel PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 5 5 2 2 Elements of a Symbol Symbols are defined in program files and symbol grid associated with program file can be viewed by selecting Program file Tab Symbols can be edited from this tab window Name of resource Can be up to 80 characters long Type of symbol Comment Here you specify what Add a long comment kind of data you are to every resource It using For example Input makes the program or Register easier to read Symbol Editor oa E L Oil _Pump sre Blocks Comment y f Scope Public H Normal_Run 3 Machine is in normal run Public oe ea Fe Cond Run M pE Machine is in conditional run Pubic H E All Publics C Oi High fi 5 Dil Level is too high Local System j Emergency iI 7 Emergency Stop Public i Device I0 z Device liea Oil Pump Local Es Intermediate_Flag F Di Pump E 20 H OilPumpPrg COB 2 Oil_Pump sre Symbols in the current file s Ml_Pump sre X All Publics System Filename to which symbols belong Program F or Dil Pump Address Value Assign absolute address t
214. ing in IL 10 12 13 9 28 Saia Burgess Controls AG 9 5 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 cyclical 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 Symbol Hame Comment Do Gets high when a car comes into the par Gets high when a car leaves the parking Local 2 tops new cars at the entry Cou
215. ing tools 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 User Manual Chapter 1 Quick Start 10 12 13 1 3 1 4 Saia Burgess Controls AG 1 2 Preparing the hardware 1 2 1 Example Stairway lighting The commissioning of a Saia 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 I0 11 12 and I3 The 4 lights are switched on off via a relay The relay is controlled via a single output 032 on the PCD 1 2 2 Connection diagram of PCD2 M5540 Etage 3 Etage 2 HH HSH Etage 1 Rez de chauss e 4 voc 45 Batt lt p WD 45 Run 45 Halt 45 Eror lt p PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG 1 5 1 2 3 PCD2 M5540 assembly 1 Insert the supplied 3 0 V lithium battery 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 inpu
216. into PCD Now that the application program is ready it needs to be transferred from the PC into the PCD In Project Manager use either with the Online Download Program menu command Download or press the Download Program toolbar button Program If any communications problems arise check the Online Settings the cable between the PC and the PCD PCD8 K111 or USB and make sure the PCD is switched on A USB connection may take a few seconds before the PC is able to recognize the attached device 9 8 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 The white lines represent the original source code with symbols and comments The grey lines represent the code produced by the build with the addresses of operands and program line numbers Cyclical program No supervision time HHBHHs HBBRHE HH6818 Car incoming A car comes into the park go680811 IjO 8 9 Dunamise incoming car signal On the positiv flank of i Hb6812 F 7502 8 Humber of free slots Decrement the number of HHb81S C 1400 8 PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 32 Saia Burgess Controls AG 9 8 1 Go On Offline Run and Stop Online mode allows communication with the PCD to monitor the mode of operation Run Stop Step by step Any information needed to test the program can also be displayed Pres
217. ion C Temperature1 4 Write the temperature Master_B Temperature1 4 Dynamic registers measures to the master A R 100 104 PG5 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 3 12 4 12 4 1 12 4 2 The PG5 Project pe Project Fupla and Profi 5 Bus 3 Devices Ea TCP IP Settings Table E J Common Files ME Library Manager k papyrus Master station A PCD M5540 IPNode 13 Station 10 Bm Master station A PCD2 M5540 IPNode 13 Station 10 Define Device Configurator parameters for every device Program Files Listing Files H E Documentation Files E Master station B PCD3 M5540 Station 11 Ge Slave station PCD3 M5540 Station 12 Saia PG5 Project Manager The Saia PG5 Project Manager shows all the PCD stations in an application s Project and also the network communication parameters We will begin with adding a device to the Project for each of the Network Stations Device Configurator parameters The Device Configurator parameters are the similar for a master and Slave station Define the device type Description PCD M5540 CPU with 1M Bytes RAM 8 PO slots 2 communication slot Device Type Define the PCD type Define S Bus station number in the Network El S Bus 5 Bus Support Station Number Device properties Station Number S Bus station number is common to all communication channels of the PCD PG5 U
218. ioning 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 Daily timer 5ww Daily timer Ioj x Value Modify Value Symbol Comment a HMS R 2113 104852 PCD Clock with current time eos a Daily Timer O32 1 Daily Timer 1 Start Stop Monitoring ontime R 2115 43000 Switch on time OFFTIME Switch off time 4 2 Move the mouse pointer over value to be edited Click once to select the field and again to open it for editing 3 Download Values PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 32 Saia Burgess Controls AG 6 13 7 Setting the PCD s clock When a PCD is commissioned its internal clock may not have the correct time To adjust it proceed as follows 1 Press the Online Configurator button on the Project inane window Then press Clock Set PCD Clock zs PC Clock PCD Clock 2 Copy the PC s time to the PCD with Date 22 10 13 Date dd mm yy 22 10 2013 the Copy to PCD gt gt gt button or Time 11 21 04 Time hhimm ss 10 37 59 enter clock settings in the Saia PCD Clock fields and press OK Day of week 1 7 2 Lopy ta PLD gt gt gt Week of pear 1 53 43 a ok te 6 14 Adjust parameters an FBox HEAVAC clocks daily clock Some FBoxes which are indicated by a black triangle in the bottom left hand corner have addition
219. is is the file which must be opened to modify the symbols PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 4 6 4 1 Add Connector 6 4 2 6 4 3 6 4 4 6 4 5 Editing connectors Input and output connectors can be placed anywhere on Fupla pages and used to hold the necessary symbols for program functions described by FBoxes As a default each new page may already provide margins with connectors on the left and right If you prefer new pages not to appear with these connectors so that you can place them yourself at your own convenience please deactivate the corresponding option with menu View Options Workspace New pages with side connectors To remove any connectors present on the left or right of the page select menu Page Remove Unused Connectors To restore connectors to a blank page use Page Add Side Connectors Placing connectors To add a connector and its symbol to a Fupla page select the toolbar button Add Connector and position the mouse on the Fupla page A read input connector is added by clicking with the left hand mouse button A write output connector is added by pressing the Shift key while clicking the left hand mouse button The connector you have just added is ready for entering a symbol and a cursor is displayed inside the connector If you don t want to edit the symbol inside the connector straight away press the Esc key and place
220. istinct 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 9 2 5 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 Blocks cannot be written inside other blocks They must always follow each other No program instructions may be defined outside a block with the exception of symbol definitions texts and data blocks PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 8 Saia Burgess Controls AG 9 3 Symbol Editor window Symbol Editor Es EZ f A as T Ca 4 Find Type a substring to Find Show Hide symbol Mane Address alue symbois Ector PER Parking Tetra PE CaLincoming fo ets high when a car comes ina the F tur h h ets igh when acar leaves the par Eee o a Sipsrew cars athe erty HE Number oihes ss e Courts the numberof fee parking slo FE Dymamnise incoming ca_sanalF Fleg detects the tisina edge ofthe c Ee Dynamis leavin casina F Fleg detects the ring edge onthe c e a S All Publics System Parking lot sre The Symbol Editor window contains a list of the data 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 information relative to an operand and constitutes a symbol Symbol Name The symbol name is the name assigned to the input
221. itions 1 and 2 we have used two different timers One_S_ Timer and Pulse_Timer but to economise on the number of timers used we could have used one by using the same timer twice because they are not used at the same time Decrementing a counter Fupla program The counter is decremented each time the step is executed because the FBox input is high 1 Decrement Dec Counter Counter Fulse Counter FBox Graftec Decrement counter IL program if the ACCU is high dexcrement the counter DEC PulseCounter Remember that the ACCU is always high 1 at the start of an ST or TR so the ACCU dependent instructions are always executed Alternate branching The next two transitions make a choice Fupla program IL program Counter 0 Counte r ETR STL PulseCounter FBox Graftec Counter is zero PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 23 cal Invert Binary Connector 8 6 Build All 8 6 1 8 6 2 coal Download Program Transition 3 The input to FBox ETR is 1 if the counter is 0 Transition 4 The input to FBox ETR is 1 if the counter is not zero Place an inverter at the input of the ETR FBox with the toolbar button nvert Binary Connector Building and debugging the program Once the programming is complete press the Build button on the toolbar to compile assemble and link the entire program Messages window f Messages Project Manager s M
222. j invert output state HCOB 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 Square root ADD RO SQR R 100 R1 R 101 R 3 R3 R0 R1 Multiplication MUL K5 DIV RO R 1 R 1 R 3 R3 5 R1 R 3 R3 R0 R1 R 4 Reste Increment Decrement Initialize register INC RO RO RO 1 INC RO RO RO 1 LD RO SUR a US PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 24 9 4 9 Saia Burgess Controls AG Status flags All the above arithmetical instructions modify status flags according to the result of the operation Positive Negative 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 RO Rt1 Low High Low Low Low The compare instruction do
223. l and start the Cross reference List function Cross Reference also available from Right click context menu of Symbol Editor F Parking lot Saia PGS IL Editor Parking lot src File Edit Search View Device Online Tools Window Help ee ee ee aln l s os Ce Program executed at start up be Slots counter unconditionally ogram Ctrl F Cross reference Lisk Ctrl R view Galled Block Open sinclude File Edit Grate tbr E Car_incoming A car comes into the parking Dunamica incraminga rar sitanal fin the noasitin Flank af inramina cianal j Ln 7 Col 40 NUM INS OFFLINE PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 27 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 Cross Reference List Parking lot The place where the symbol s defined normally the symbol editor Number of free slots C 1400 Counts the number of f Definitions 1 Parking lot sre Symbol Editor Program filename and line where the symbol Number_Of_Free_Slots is used References 4 Parking lotere 7 Written Parking lot src 20 writter Rarking lot src 26 Written Parking lot ere 1 Written i e the symbol on these lines contains the res
224. l the Fbox are green data exchange are done correctly IP Channel o bus Mlaster IP 2 Clr Err ref IP Channel EMD a3 ref IF Channel ROV ref IP Channel M ref IP Channel pcv pcv 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 Master IP Clr Err ref IP Channel END i ref IP Channel ROWO ref IP Channel END amp ref IP Channel pev pev PG5 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 9 Possible corrective actions in master or slave station e Verify the Device Configurator e Verify that the Device Configurator parameters have been downloaded into the PCD e Verify that the communication Channel defined with the Device Configurator 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 Clr Eri ref IF Channel END a ref IF Channel ROYO E ref IPChannel END i ref IPChannel Possible corrective actions in the master station Verify the parameters of
225. lank of im block DEC Humber of free slots z Decrement the number of STH Car outgoing A car leaves into the park DYH Dynamise leaving car signal On the positiu flank of ow IHC Humber of free slots gt Increment the number of Symbol Editor End of COB an Symbol Name E Parkinglot sre ROOT E e Car incomina fi OO amp Ca_outgoing ff Gets high when a Local HeRedint o 2 Jaz Stopsnewcarsat Local Ready m amp Dynamise_incom F 2 Flag detects the ri Local m amp Dynamise_leavin F 750g Flag detects the ri Local eee l S G ee Globals System Parking lotenc The IL editor is similar to any other commercial text editor The same editing features are present such as Copy Paste or Find Replace However the IL editor offers more than just conventional text editing Automatic formatting of each line as it s entered Syntax colouring enabling each type of information to be identified Integrated Symbol Editor window Online step by step and debugging features PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 5 9 2 1 View Symbols or Values B View User or Auto Comment Editing a line of code Label Mnemo Operand Comment Increment a register 31TH Flag sCopy the Flag state into the accu DYH DFlag On a positiv flank of the Flag set the accu eigh JR L Next If the accu is low jump to the label Next INC Register Increm
226. later The easiest way to start the configuration is to connect the PCD with the USB cable and read the actual configuration from the PCD using the Online Upload Configuration menu command or corresponding toolbar button If the PCD s memory has not been configured it may show default settings so please always verify that this matches your hardware and application Build Options These options are used when the user program is built E Media Allocation Last Timer 31 Timer Timebase in milliseconds 10 100004 100 Has Volatile Flags Yes kd Last Volatile Flag 2999 Dynamic Registers 2000 4095 Dynamic Texts SU00 3499 Dynamic Data Blocks S500 3999 Dynamic RAM Texts 2000 499 Dynamic RAM Data Blocks 2500 2999 Dynamic Timers oy a Dynamic Counters 1400 1599 Dynamic Volatile Flags 2500 2999 Dynamic Nonvolatile Flags 7500 3191 Media Allocation This section reserves address ranges for dynamic Registers Counters Timers and Flags When the program is built addresses are automatically assigned to dynamic symbols defined in the user program and Fupla FBoxes A dynamic symbol is one for which no absolute address has been defined Dynamic address Et LE Hms R LL DailyTimer Gutput PCD Clock with current time Daily Timer It is not always necessary to change the dynamic address ranges The default settings are usually adequate for most applications PG5 User Manual Chapter 2 Project Ma
227. led No IP Filtering Policy White List IP Filtering List Configure IP Node Number of the TCP IP node The node is used in the Device s application program in order to reference the IP address of the slave station with which data is to be exchanged IP Address Address of the station on the Ethernet network In order to fully designate the Device with which telegram exchange takes place two addresses are required the Ethernet address and the S Bus address defined in the device s properties Subnet mask Defines the part of the IP address which belongs to identification on the network and identification of the host All bits corresponding to the network are at 1 while the bits PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 15 3 7 2 corresponding to the host are at zero The network identifier is the result of a logical AND combination between the IP address and the subnet mask Each TCP IP host requires a subnet mask even on a network segment The subnet mask by default is therefore 255 255 255 0 ClassC Default Router Address of the default router PGU port PGU slave Yes Supports the exchange of data with master stations supervision systems and terminals but also supports the programming tool and tool for setting up PGB5 Slave No Only supports the exchange of data with the master stations supervision systems and terminals Network Groups Displays the dialogue window
228. les s EE Library Manager Master station A PCDZ M5540 IPNode 1 Station 10 ie Se one Suu Define Device Configurator parameters for every device S Master station B PCD3 M5540 IPNode 2 Station 11 H Slave station C PCD3 M5540 IPNode 3 Station 12 Saia PG5 Project Manager The Saia PG5 Project Manager shows all the PCD stations in an application s Project and also the network communication parameters We will begin with adding a device to the Project for each of the Network Stations Device Configurator parameters The Device Configurator parameters are the similar for a master and Slave station Define the device type Description PCD M5540 CPU with 1M Bytes RAM 8 PO slots 2 communication slot Device Type Define the PCD type Define S Bus station number in the Network El S Bus 5 Bus Support Station Number Device properties Station Number S Bus station number is common to all communication channels of the PCD PG5 User Manual Chapter 13 Ether S Bus 10 12 13 13 4 Saia Burgess Controls SA 13 4 3 Define communication channel of the Ether S Bus Onboard Communicatons Onboard Roe sefRo 4d5 TCPIIP Enabled Yes Onboard Ro 4e5 s Net IP Mode i Cinboard LIS IF Address 197 166 12 126 Onboard Ethernet Subnet Mask 205 255 255 0 i Default Router 0 0 0 0 Fol port Yes Slave Yes Network groups Default Onboard Communication properties IP Nod
229. les are configured by selecting them in the E S Selector window in order to drag them to an E S slot As is the case with the other slots selecting one of the E S slots displays the relevant configuration parameters Expansion slots The expansion slots designated by means of can receive a bus expansion module in order to add extra E S modules Configuration of an expansion module is carried out by selecting the corresponding module in the E S Selector window in order to drag it to the extension slot indicated with Loading the configurator parameters to the Device Equipment configuration of the Device is necessary on first utilization but also in the event of all changes such as memory extension setting up a communication module etc These parameters are not only configured in the device configurator but also loaded in the Device s memory by means of the Download Configuration menu or the corresponding button Attention loading the program from the Project Manager does not load the configurations in the Device The configurations must be loaded from the Device configurator PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 4 Device properties Firmware Version Memory 3 6 From 1 22 00 or more recent and compatible Ree ee eae 1024 Kbytes RAM User Code Text DB Memory Backup Flash Extension Text DB Memory Backup Flash Program Directory Program Restore Options
230. lly automatically defined for binary symbols and can be displayed or modified using the symbol properties Trending Offset PG5 User Manual Chapter 10 Additional tools 10 12 13 10 16 Saia Burgess Controls AG 10 3 Online Configurator F Daily timer Saia PG5 Online Configurator feel r File Online Tools Options Help Online Online Settings Configurator C Bus USE PGU Go Offline Online Settings Information PCD Type PCDe M5540 Pw 1 22 10 Device Configurator Program Example Fupla Date 27 7 1990 Day 5 Hardware Info Time 04 00 Week 30 History S has Run Clack Help Run Shop Restart E sit PCD type PCD type reference number Version Version of PCD firmware Program Name User program name Date PCD clock date if no clock 1 1 92 Time PCD clock time Day Day of week 1 Monday 7 Sunday Week Week number Status Mode of operation Run Stop Halt Conditional Run Online settings Connection direct PGU or S BUS lf 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 Saia PG5 Online Configurator If so please check Is the computer correctly connected to the PCD with PCD8 K111 USB cable Have communications parameters been selected correctly with the Settings button 10 3 1 Adjust the PCD s clock 1 Select the Online configurato
231. 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 PCD tried to execute an invalid instruction code This can occur if the firmware is old and does not support the instruction or if the program has been incorrectly edited using the debugger S Bug Other errors are calling non existent blocks missing end of block instructions program jumps to the second line of multi line instructions jumps from one block into another etc XOB 9 Too many active Graftec branches More than 32 Graftec branches were simultaneously activate in a Sequential Block SB 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 31 nested PB FB calls PBs and FBs can be nested to a depth of 7 or 31 levels An additional call calling the 8th or 32nd level causes XOB 10 to be called The 8th 32nd level call is not executed XOB 11 COB monitoring time exceeded If the second line of the COB instruction is a non zero supervision time in 1 100ths of a second and if COB processing time exceeds this duration XOB 11 is called COB processing time is the time which elapses between the COB and ECOB instructions The original purpose of this monitoring time was the immediate discovery and subsequent eradication of any long delays in the user program resulting from bad programming w
232. lready contains symbol list then pasting symbols at the end of the grid does not disturb overwrites the existing symbol definition Example Showing Copy Paste symbol from Excel Sheet to Symbol Editor PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG i 1 e File Edit View Inset Format 4 z Arial 10 A2 e PumpsFrg koa ae F 14 SYMBOLNAME TYPE ADDRESS 2 PumpsPrg OF f 3 Input Cut 4 Inputt _5 input2 6 input3 Output 8 Outputi g Insert 10 Delete Clear Contents Mod bh MS Use Right Click Context Menu to Paste Insert Comment Symbol Editor New Group EE EB aje Insert Symbol Hame Cut EH And Gates Copy yi SS SC sr Paste Delete Select All Symbols after Paste Symbol Editor H And _ Gates se PumpPrg Inputt Input Inpute Inputs Outputt Output Result of Input 1 and 2 Global i Result of Input 2 and 3 Global 5 31 Tools Data Window Help GF X B z u aalala AA COMMENT Scope Pumps Program Global And gate Input0 Global And gate Input Global i And gate Input2 Global i And gate Input3 Global Ta cy NUM sum 71 A Symbols Ctrl G6 ax Ins BE Ce eo j Ekel Actual Address Tags Scope cec ee Ctrl Del Ctri 4 i x Actual Address a Pubie Pubie Pubie Paic CE Pumps Program 0 and gate Inout And gate I
233. lready provide margins with connectors on the left and right If you prefer new pages not to appear with these connectors so that you can place them wherever you want just turn off the relevant option with menu command View Options Workspace New pages with side connectors To remove any empty connectors present on the left or right of the page select menu Page Remove Unused Connectors To place connectors once again on a blank page select menu Page Add Side Connectors PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG 1 13 Editing program functions Program functions are inserted in the area between the read and write connectors This is done by positioning the graphical symbols of the function boxes FBoxes that are used to create user programs Function boxes are selected from the FBox Selector window Show Hide Filter Binary Time related T Ane 1 Chronometer Demux binary selection J 1 Cycle time H Demux integer selection Th Exclusive pulse 1 Dynamize Lt Off del H Even 1 Off delay with reset High 1 On delay 1 Low 1 On off delay H Move Lt Pulse Binary And Time related Off delay S Fup 2 7 200 S Fup V2 F 200 The output is high only if all inputs are high The rising edge of the binary input IN sets the output The first function required in this example serves to switch on the lighting in response to a short pulse from a stair
234. mcr rey rte 8 22 3 OO TUNG scar cesirateetacaernoue bs ynsanc asa te ancdceaasaconneanagesun E 8 2 2 6 Comme Come DEPE Oe PED oore r E AE E spacusaseodnes 9 2 21 Derice Conj CUT ALON saieti inira eaan ea ani EEE NEA dons OAE E ENEA AOA 10 2 2 8 Ul OM onsa seneuencins se ne nusies cane naot pedccuatnaatiaauansicier Sonitnantsoacianunitenanunecedentes 10 229 PEO TSS BOG CP oeae E E EE 12 De FAN A CS caret eretcturstinns aageraion hoa E A ER 14 23 WOMMMTUIN the Propra occa occ poccccce cn bes seen ecspaneeceesecceseeniecacececesssuecersacessscepececassetesecvececessaccesseutuans 16 ye Build Changed Files Rebuild All Files Rebuild All D ViCe ccccccccccccccccccceneeeeeseeeeeeeeaesneeeees 17 2 302 General Buld OD MONS ceivenicseiayusatavastranentcan tea EEEE E aierareieniera N E 17 24A Messages WAM OW sisisi 18 2 5 Downloading the Program into the PCD seececceeeecoossssssecccececococccocsssssesecececococosssssssssscecssceeeooo 19 2 5 1 DOW OC T rO EEE EEE TEATA E TEE EAN TOEA 19 22 Dow GE OPO societies areessancchs E E cet gacones 20 26 Commands for AM Devices iescissscssssssecisnevesccsssasuccascaciecsteassceasusscauabescivsccsssstsstiasucesssecaesesccssvseneesens 21 2 1 Sel DOW OAC FHES sirosis 22 2 7 1 Creating a self downloading file sso cscwanavosesriircnaniedscwadind deme taingeeundssOkewaunetsicwasdadeduanniedace hoannpedheencs 22 2 42 Downloading a self downloading file ccsssssssssssseeeeeeeececeeeeeeeeeaaaeasssseeeeeeeeeeeeeeeeeeeeaas
235. me value reaches zero Loading a delay time Reading the state of the timer LD T 4 Use a binary instruction such as lf the accumulator state is high timer T 4 will be loaded with a constant of STH T 4 ANH T 4 ORH T 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 _flLoioi Ff Integer value T 4 C i COE a Binary state T4 US LD o36 is LSI is L gt ime IL program COB O 0 OTH I 2 Detection of rising edge at input 2 DYN PZ sets accu state high LD T 4 li accu is high load time delay for 10 units oft tame 10 STH T 4 Copy logical state of time delay to output 36 OUT O 36 ECOB A time base other than 1 10th of a second default value can also be set This can be done from the Build Options PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 21 Example Send a one second pulse to output 37 with a 5 second delay for each rising edge at input 3 State diagram a fL Integer value T 2 Mo Binary state T2 J 55 L Integer value T 3 M Binary state T3 J 6s Lou 037 T gs L gt sS idime IL program COB 0 O STH e DYN F 3 LD T2 50 LD EE 60 STH T2 XOR T 3 OUT O 37 ECOB PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 22 Saia Burgess Controls AG 9 4 6 Inst
236. mple PCD2 M5540 Station Master A S Bus Station Number 10 PCD3 M5540 Station Master B 1 S Bus Station Number 11 Ether S Bus Onboard channel 9 IP Node 2 Ether S Bus External channel 9 IP Node 1 IP address 192 168 12 128 Ether S Bus Onboard channel 9 IP Node 3 IP address 192 168 12 130 PCD3 M5540 Station Slave C S Bus Station Number 12 13 2 Examples of the Data Exchange in Ether S Bus Master with data exchanges Master with data exchanges Pata on the network _ on the network _ Master stationA ___ station A P Master station B FO 7 Master station F 100 107 i R1 25 station B R O P Stave station i station C 3 gave Canayo 7 ae Read 8 flags in the slave Binary0 7 F 100 107 station C F 20 27 4 Value0 5 Write 6 registers in the Master_A Value0 5 R0 5 slave station C R 20 25 Master station B Master station A 5 Temperature1 4 Write the temperature Master_B Temperature1 4 Dynamic registers measures to the slave C R 100 104 Slave station C Temperature1 4 Write the temperature Master_B Temperature1 4 Dynamic registers measures to the master A R 100 104 PG5 User Manual Chapter 13 Ether S Bus 10 12 13 Saia Burgess Controls 13 3 13 3 13 4 13 4 1 13 4 2 The PG5 Project pe ARE Project Chapter 13 Fupla and Ether 5 Bus 3 Devicets 2 i TCPIIP Settings Table Common Fi
237. n 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 User Manual Chapter 11 Saia PG5 Networks 10 12 13 11 4 Saia Burgess Controls SA Communication network S Net ie ere reer S Bus Serial S Bus S Bus Modem Profi S lO Profibus DP Data Exchange Characteristics o o o o 10 and 100 Mbd 12 Mbd oo c transmission speed Max distance without repeater or switch Hub Cable type 4 twisted pairs 1 twisted pair 1 twisted pair if fl 1 twisted pair Protocol Saia PCD Saia PCD Saia PCD Saia PCD Normalized ISO Exchange mode Multi Master Multi Master Master Slave Multi Master Master Slave Max number of Unlimited 126 Unlimited 126 stations ee Industry building building Industry building Industry building Industry building building Industry building building 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 ap
238. n must be identical on all stations in the network Response Timeout Waiting time in milliseconds by the master station in order to receive the response to a telegram This timing is particularly important when the slave does not respond If it is too long this will severely slow down communication If it is too short the responses arrive too late and cause the telegram sent by the master to fail By default the value of the timings is zero this means that the default timings are applied In practice we only change them when Gateways or modems are used generally we restrict ourselves to stretching the Timeout on the external masters Training Sequence Delay TS Timing in milliseconds between activation of the RTS Request To Send signal and sending of the message With S Bus the activation of RTS enables drivers RS 485 or RS 422 to be selected Turnaround Delay TN Minimum timing in milliseconds between the end of a response and transmission of the next telegram This gives the outlying station time to switch the line from emission mode to reception after having sent a message The TN is particularly important when PCD7 1T100 receptors or modems for private lines are used PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 11 3 6 3 6 1 Profi S Bus communication properties Profi S Bus is a multi master field bus based on the Profibus FDL standards and the SBC S Bus protocol It enables t
239. n 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 PG5 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 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
240. nagement 10 12 13 Saia Burgess Controls SA 2 11 However if an error message like this appears during the building of a large program Fatal Error 2368 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 fitted with EPROM or Flash for main memory then the RAM Texts and RAM DB dynamic ranges must be configured from address 4000 upwards so that these Texts and DBs are in writeable RAM memory Last Timer Timers and Counters share the same address ranges The Last Timer value defines the partition between Timers and Counters it generates the DEFTC instruction Dynamic Timer addresses must be below or up to this value and dynamic Counter addresses must be above For example if Last Timer is 31 then Timers are T 0 31 and Counters are C 32 1599 Timer Timebase in milliseconds The default 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 NOTE Do not to define an unnecessarily large number of Timers or an unnecessarily small timebase because this will slow down your program s cycle times Dynamic Nonvolatile Flags By default all Flags are non volatile Volatile Flags are always set to O at start up nonvolatile Flags retain their values If necess
241. nd documentation Files 60 Ask before saving changed files If Yes the PG5 requests authorization to save source files which have been changed but not saved before building the program If No files are saved automatically Stop build on first error Set to Yes to stop the build when the first error appears in the Messages window Download program after successful build When Yes the program is automatically downloaded into the PCD after every successful build Download without confirmation Normally the download starts with a dialog box notifying the user and the download must be started by pressing the Download button If this option is Yes then the download starts immediately without displaying the dialog box This options is disabled unless Download program after successful build is selected Clear message window on build The contents of the Messages window is deleted at the start of every build Create Listing files Ist Creates and assembler report file Ist These can be viewed the Listing Files folder Create Map file map Creates the linker report file map This can be viewed the Listing Files folder PG5 User Manual Chapter 2 Project Management 10 12 13 2 18 Saia Burgess Controls SA 2 4 Messages Window The Messages window provides information on the progress of a program build It notes the different stages of the build compilation assembling and linking If the program has been edited correctly the buil
242. nline Upload Configuration or the corresponding button in the tool bar If the memory turns out to contain no configuration PCD firmware undertakes to return the appropriate information then check the configurations corresponding to your application PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 4 3 2 Device Type Memory Slots slot Type Description M1 M2 Onboard Communications Type Description USB PCD3 M5540 CPU with 256 512 1024 KBytes RAM 4 O slots expandable USB Prof S Net RS 232 RS 455 S Net R5485 portfor Profi S Bus or general purpose communications D Sub 2 RS 2324 PGU RS 232 PGU or general purpose serial port D Sub 1 The main view on the configurator Description Universal Serial Bus port PGU or general purpose RS 455 RS 435 portfor general purpose communications Terminal block Ethernet Ethernet port IP Settings DHCP Ethernet Protocols Section Description IP Transfer Protocols FITP ATTP Direct Protocols ODM IP Protocols DNS SNTP SNMP protocols HTTP Portal HTTP Portal Communication For PCD Over Private Network Onboard I O Slots slot Type Description slot 0 slot 1 slot2 slot3 The main view on the configurator represents the different equipment features making up the Device Device slot Indicates the current Device type If it is selected it displays the properties of the Device such as RAM EPR
243. nnected to symbol Battery_Failure goes high if the battery needs replacing x Battery Failure IL Example If there is a PCD battery failure the Batt LED on the front panel of the PCD is turned on and XOB 2 will then be called at regular intervals In the example below 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 and going low approximately 1 second after the battery has been replaced f SALA PGS IL Editor Interrupt inputs xob 13 src 48 0 x fiw Fle Edit Search View Proect Online Cools Symbols Window Help 3 x Group Symbol Address Value Comment c ee eee LC Battery Failure Timer 1 gt al System Ta Global o xob 2 Symbols x 2 Battery Failure k 10 AL arm Battery User program Battery Failure PG5 User Manual Chapter 7 Program Structures 10 12 13 7 16 Saia Burgess Controls AG Fupla example Output pulses to a digital output Use functions Special Install cyclic task and Binary Direct transfer H Adjust Install cyclic task XOB number KOB 14 p COB ER SIRES Interrupt interval ms gt 1000 XOB 1 4 Editor Interrupt inputs Ek Mie Call XOB 14 every 1000 ms IL example p otart uUp AOB
244. nout 2 and gate In And gate Input sul of Input Tand2 ecu of input 2and 3 _ Co Ph Paie Paie Puble 4 Oo Oo a toa Poa Oo oo oo to Pa All Publics System And _Gates sre PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 32 Saia Burgess Controls AG 5 3 17 Exporting symbols A program s symbol list can be exported to other applications such as Excel VisiPlus or Word for example to produce your commissioning report It also possible to Copy Paste symbols from symbol editor to other application like Excel Word or Text editor Example showing symbol export to Excel Select desired symbols to export and Select context menu Export Selected Symbols from the svmbol editor New Group Ctrl G Symbol Editor Insert Ins Cut Etri X Copy Ctrl C Paste Ctrl V Delete Del Select All Ctrl A Expand All lo Collapse All Fi 0 m i a Pumps sre System All Publics Go To Definition Cross Reference Ctrl R Columns b Add To Watch Window Ctrl Wi Export Selected Symbols Help Fl When exporting a symbol list to Excel we strongly advise use of the Tab separated Text file format txt You will obtain better results than if you use the Excel file format option x s Start up Excel and open the text file with the exported symbols Microsoft Excel AND_GATES txt a File Edit View Insert Format Tools Data Window Arial 10 B U fe SYMBOLNAME C D i ADDRESS C
245. nstructions 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 Then 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 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 7 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 d
246. nt Type Scope Editor 8 15 SB_O 5T_1 Turn input OM Step Local Mo code editor 8 16 8 4 9 8 4 10 Deleting a sequence 4 The marked sequence cannot be deleted if it would result in an invalid structure 8 4 11 Inserting a sequence Activate Transition Mode Click on a step which already has a transition A new step and transition are inserted Activate Select mode Click on the first step or transition of the sequence to be deleted Hold down the Shift key and click on the last transition or step The marked sequence in highlighted Press the Del key Copy pasting a sequence To copy a sequence to the clipboard 1 2 3 4 Activate Select Mode Click on the first element of the sequence Hold down the Shift key and click on the last element of the sequence Copy the sequence to the clipboard with the menu command Edit Copy or press Ctrl C To paste the sequence from the clipboard 5 6 T Activate Select Mode Click on the element before the sequence to be inserted Use the menu command Edit Paste or press Ctrl V PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA Turn the output Second Turn the output Wait 1 second Turn the output att Turn the output Turn the output Watt 1 Second Second 1 Set the counter Wait for the start3_p signal Saia Burgess Controls SA Note 8 17 Depen
247. nt Profile and Microsoft Net 4 0 Extended Net installer is available on the installation disk lt DVD gt Windows dotNetFx40_Full_x86_x64 exe For best performances we recommend installing PGS 2 1 on a PC with multi core CPU running at a minimum of 2 GHz with a minimum of 2 GB RAM 4 GB ore more is recommended The installation package requires about 600 MB free space on your hard disk All 150 PCD instructions are supported The PGS has over 250 standard Fboxes Saia Burgess Controls AG Instruction List IL FUPLA FBD and GRAFTEC SFC Bahnhofstrasse 18 CH 3280 Murten Switzerland All Saia PCDe models are supported excluding the xx7 Series PG3 and PG4 and PGS 1 x programs can still be used with PG5 2 1 Telephone 41 26 672 71 11 TCP IP SBC S Bus PROFIBUS DP BACnet and LONWoRKSe Telefax 41 26 670 44 43 communication are present in PGS ar f l E mail info saia pcd com Homepage www saia pcd com Support www sbc support com Your local contact Printed in Switzerland 26 732 E10 01 2006 Subject to change without notice
248. nto the names of symbols or groups using the character This character is automatically replaced by the base index incremented by 1 for each copy of the template It is also possible to select the symbols using the context menu command Indexing The FBox List page shows a list of all the FBoxes whose symbols are defined with a name These names can also be modified using the character PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 24 6 10 6 10 1 6 10 2 Turnoh 5 TUrnOFEF 5 II ke Fbox Saia Burgess Controls AG Editing your first Fupla program Objectives 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 Solution 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 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 curr
249. nts the number of free parking slots ocal Flag detects the rising edge of the car in Local F h Parking lot src Bs Car incoming Bs Car oubgoing Gs Red_light Gy Dynamise incoming car signal lag detects the rising edge on the car le Local TEE B Dynamise leaving car signal a iL x to O Gs Wurmber of free slots ia E PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG Cold start organisation block XOB 16 ACC H LD Number_of_free_slots 8 EXOB Cyclical Organisation Block pepa ee a a A COB 0 O STH Car ancoming DYN Dynamise_incoming_car_ DEC Number of free _ slots a St ES eA E STH Car_outgoing DYN Dynamise_leaving_car_s INC Number_of_free_slots EEE EE EEE eee STL Number_of_free_slots OUT Red light ECOB 9 29 Program executed at start up Initialize the free slots counter with the value 8 unconditionally End of start up program rCyclical program No supervision time A car comes into the parking Signal On the rising edge decrement number of free parking slots A car leaves into the parking ignal On rising edge increment number of free parking slots F no more free parking slots counter state Low set the red light 7 l 7Pnd of Cyelr a al program PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 30 Saia Burgess Controls AG Building the program The user program is fully edited
250. o select last symbol and Right Click for context menu gt Symbol Editor 1 x E EE eli za JO Find Type a substring to Find Symbol Marne Type Address alue en oe Address Tage Scope m AE ins aN TT i incoming Gets high when a car comes RR 2 oa n 3 Local So mmr afed oo tos new ar atthe erty J2 fa gt Gy Humber m raa elate fa E a E e a es ET 1400 i Local Se Dynami New Group Ctrl 6 502 jLocal E Dynami l AOS Local P Insert Ins All Publics System Cut Ctrl X Symbol Editor 1 x Ez El i Symbol Name Kj Ca P Find Type a substring to Find Actual Address New Group Ctril G Insert Ins Ctrl X CtrleC Ctrl V Paste Symbolsr X All Publics Sys PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 29 5 3 14 Sorting Symbol List Symbol list can be sorted in symbol grid with any column by clicking on column Name This means symbols list can be sorted by Symbol Name Type Address Comments Actual Value Tags or Scope Symbols Sorted with Symbol Name Click on any Column Name for sorting the symbols Symbol Editor Es ES Ca Find Type a substring to find a oO 4 t ah Symbol Hame Type ddes value Comment Actual Address Tags Scope pe Pakne foor o S y H Caicos ho Jo iets high when a cat comes 0 floa Em Cacag ooo o Gets igh when a carleaves O fioo
251. o symbol from allowable address range It is optional for resources other than inputs and outputs Symbol Scope is defined here Local symbols can only be used within current file and Public symbols can be used in all files in current CPU External symbols have Public symbols definition in other files Symbols are saved in this program file Symbol Name The first character is always a letter followed by other letters numbers or the underscore character Symbols are not case sensitive unless they contain accented characters MotorOn is the same as MOTORON but GRUN is not the same as grun Reserved words cannot be used as symbol names list of reserved words are present towards end of this chapter Type Defines operand type like input 1 output O register R counter C timer T text X DB etc Address Define absolute address of Operand here For internal data like registers flags etc If address is not entered it is automatically assigned by the system during the build process This is called auto allocation It is compulsory to enter address for Inputs and Outputs PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 6 View User or Auto Comment B Saia Burgess Controls AG Comment The comment is linked to the symbol In IL editor they can be viewed instead of the user comment linked to each line of program code Toggle with the button View User or Auto Comment TH Flag
252. of the diagnostic register SASI TEXT 10 MODE EM R0500 DIAG F1000 RO501 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 completed with Device Configurator parameters 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 Device Configurator 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
253. of unsuitable adjust parameters For more detailed information please consult the guides regarding FBox errors Note PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 34 Saia Burgess Controls AG Within the HEAVAC library you will find different versions of the initialisation function Initialisation HEAVAC 4 7 Version 7 is the most recent We recommend the use of function 6 for all new applications 6 14 2 HEAVAC FBox with adjust parameters The CIK_D FBox allows a daily clock to be produced just Clk_D like the one created earlier in this chapter but with a single En Ch FBox available in the HEAVAC library The FBox output can be switched on or off according to FBox HEAVAC clocks times defined in the adjust window 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 Adjust Parameters Objet pour diteur HMI Enclenchement D clenchement 6 14 3 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 execu
254. ojects Directory CU sers Public SBCSPG5_ 274Projects Description Program Files Listing Files Documentation Files Add a Fupla or IL file Project Tree Cy New File Daily timer oe Project Chapter 1 Device s H E Common Files bm Libraries LOB Calls SB 4 Devicel PCD2 lige Online Settings E Configuration Build options File Type File Hame Directory C Users Public SBC PG5 214 Projects S amples PGS User Manual Chapter Listin Docu Mew Ctr Grathec File sfc Instruction List File src man Filas Profibus DIP Network File dp gt Profi S 10 Network File sia Paste y LON Network File lon Delete All F 4 y Watch Window File 5wa Description Choose the file type Fupla File fup or Instruction List File src LinkedrBuilt Open file now PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 11 8 3 3 Calling the SB from a COB Depending on the choice of language IL or Fupla either call the SB with a CSB instruction or a Call SB FBox Open the new file and write the program as shown below IL Program Fupla Program COB 1 gt start of COB O 1 En p CoB O scall SB 0 FBox Block Calls Call SB BCOB send of COB The SB can be called as in the examples above But there s an even easier way The PG5 can automatically create a COB containing the CSB instruction to call the SB T
255. om PC C Verify Serial Number Fail if different Serial Humber Help Set Defaults Cancel PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 1 2 Use the Device Advanced Create Self Downloading File command to create a self downloading file for the active device The dialog box allows you to configure parameters and options for self downloading at the job site The options are the same as those we already know from other commands Download Configuration and Download Program but a few new options have been added It is advisable to check that the Online Settings and Device Configuration are correct and to perform a successful build before creating the saiasd 3 file File To Create saiasd5 Enter the path of the file to be created Use the browse button gt to select a path No Dialog box Progress only Downloads the saiasd5 file without displaying the Download Self Downloading File dialog box The download starts immediately and only a progress dialog box is shown Show Advanced gt gt button Hides the advanced settings from the end user so none of the settings can be changed before downloading the file Verify Serial Number The downloader checks that the PCD s serial number matches the one defined in the Serial Number field This serial number is unique to each PCD and can therefore be used to ensure that the download goes to the intended PCD NOTE The ser
256. om ot the Selector window Adding an FBox i Entiers Drag amp Drop F 3 Addition Soustraction q kMultiplication The functions needed for writing a program are selected from the FBox Selector then inserted into the Fupla program using Drag amp Drop Edit stretchable FBox Some FBoxes are stretchable which means that the number of links can be defined by dragging vertically with the mouse Drag amp Drop Binaire A it Eis f OL OU exclusif Select a stretchable FBox Drag amp Drop onto the Fupla page Drag the mouse vertically until the correct number of inputs or outputs is shown Press the left mose button to finish Edit logical inversion F Click on the Invert Connector button Position the mouse pointer on the input or output link of a logic function and press the left mouse button J PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 5 5 6 5 6 6 5 7 Triggering on a rising edge The inputs of some binary FBoxes have been dynamized They only trigger on the rising edge of the signal These are indicated by a little black triangle CH For example a pulse counter cannot be incremented when its Up input is one FBox Counter Up 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 t
257. on e Verify the Device Configurator e Verify that the Device Configurator parameters 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 Device Configurator 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 User Manual Chapter 12 Profi S Bus 10 12 13 12 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
258. on processes all the Graftec steps and transitions and stops when the selected element is reached If the program is already running it will stop at the selected element PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 25 8 7 Grouping a Graftec program into pages Graftec allows a sequence of steps and transitions to be grouped into a new element called a Page The element looks like a step and can have its own comment but is distinguished by an additional vertical line on the left hand side Pages allow the Graftec structure to represent the process from a higher level and each page can be opened to display the next level of detail which is composed of more pages steps and transitions Pages can themselves contain pages without any nesting depth limitations The nesting of pages is bit like a zoom function which permits the representation of the program to several levels of detail First step of the page a page always begins and ends with a step Icon for a page Pages can be created inside other pages Arrows for scrolling the pages Step which ends the page 8 7 1 Rules for editing pages Graftec sequences to be made into pages must respect a few rules e Apage must always start and end with a step e The sequence cannot be only one step e The entry and exit steps cannot be deleted PG5 User Manual Chapter 8 Graftec Programming 10 12
259. ond Gateway Ether S Bus Profi S Bus Onboard Communicatons Location Onboard PS 232 R5 485 PGU Onboard RS 485 S Net TCP IP Onbeard USB Samam Number 3 E IP Enabled Yes mainin oe Ethernet RIO Network None IP Address 197 166 122 130 Subnet Mask 2 oe be 2 0 Default Gateway 0 0 0 0 Access Control List Hide PG5 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 19 The second Gateway Slave port PGU is added configuring the Device Configurator with the node and TCP IP address Fupla or IL Program 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 Profi S Bus Serial Gateway Slawe_ Port Adjust Parameters S Bus Sh Channel Channel 1 Clr Err Transmission speed 9600 bps 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 R0501 ENDSASI N N Flag and diagnostic register Mode S Bus Gateway Slave Data mode Transmission speed 12
260. onnectors can be defined by vertical movement of the mouse he a 1 Press toolbar button Select Mode Select connector on area shown in red tid Copy Display context menu by right clicking mouse Baste Selection menu Stretch Cut Move the mouse vertically to create the 2 fm Dee Desired number of connectors Input Press the left hand mouse button tid Output stretch 6 4 7 Move connector vertically To move the connector place the mouse in the red circle Press and hold down the shift key Press and hold down the left hand mouse button Drag the mouse vertically onto a free space on the page Release mouse button and shift key PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 13 6 5 6 5 1 Show Hide Selector Window Placing a Fupla function box FBox selector Selector Filter l Alarming Analog Module Binary family Blinds Lighting Blinker Block Calls The FBox Selector window shows all FBoxes defined in the available FBox libraries They are orginized into Familes with similar application domains For example here are some of the main families Binary FBoxes for solving logical equations Integer Arithmetic with integer numbers Floating Point Floating point arithmetic Counter Counting tasks Time related Time related tasks Analogue Module Controlling analogue modules Communication Exchanging data on S Bus or Etherne
261. or the PULSE TR_O stata p signal Mumber Comment Wait For the nstarta_p signal Type Transition Scope Local Editor Function Block Diagram PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 19 At the start of the sequence set the output 7hree_pulses to the high state for 1 second then set it low for 1 second Repeat this operation three times then repeat the entire sequence including the initial step Set the counter to 3 Wait tor the starta _p signal Turn the output on Turn the output ott Vat on other Second Decrement Counter Counter PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 20 Saia Burgess Controls SA 8 5 2 Choosing the editor IL or Fupla S Edit or S Fup Now that the Graftec structure has been created it remains to write the code for each step and transition using the Instruction List editor S Edit or the Function Block Diagram editor S Fup The default choice of editor is defined from the Options dialog box Code Editor Default editor 8 5 3 Editing the symbols First declare all the data using the Symbol Editor assigning symbol names types addresses and comments as shown in the window below Symbols E EB j A T eo ca Ye Find Type a substring to Find Symbol Name Comment Gy Starts pulses Input makes the sequence start Gy Three_pulses Output will blink three times Local d Gy Pulse_Time Du
262. oreren ae E esti stanentngent etenepess saqestesdenenteneence 16 1052 PED HISO cerron iin A A cua yaaiueiueciae tees 17 10 4 Updating firmware Firmware Downloader ssssssssssssssssecccececcccccssescccccccocccccsosssssccecceoceososssssse 18 10 5 User Menis senssa aapa aoas n aa sa aaa 19 PG5 User Manual I Chapter 10 Additional tools 10 12 13 10 1 10 2 Saia Burgess Controls AG PG5 User Manual Chapter 101 Additional tools 10 12 13 Saia Burgess Controls Ltd 10 3 10 Additional tools The Saia PG5 provides you with several additional utilities for a variety of services PG5 User Manual Chapter 10 Additional tools 10 12 13 10 4 Saia Burgess Controls AG 10 1 Data transfer utility 10 1 1 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 10 1 2 Start up Data Transfer Start up the program with menu Start gt Programs gt Saia Burgess Controls gt PG5 Suite 2 1 gt Data Transfert Fi PGS Suite v2i 260 di Data Transfer I Saia Burgess Controls J SBC
263. ork for communications S Net Network Configurator dp lon srio For configuring device networks and communications Profibus DP LON et SRIO 2 PCD3 T760 2 PCD3 T760 3 PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA HMI Editor hmi Allows configuration of simple menus with PCD7 D1xx and PCD7 D2xx terminals installed in addition to PGS PG5 User Manual Chapter 2 Project Management 10 12 13 2 15 co SBC Terminal D230 _ L que Sos Saia Burgess Controls SA 2 3 Building the Program The PCD cannot directly process the text files created by the editors These files must first be compiled and or assembled and then linked to create a binary executable pcd file as shown in the diagram below Sources files zl e Graphical Editors at Rebuild Al l Compile Bunig FOC SRC Object and listing files 3 LNK a 4 Device ddvanced Dowaload o Create Documentation a Program ee Print THT es PCD Controller 1 Compilation converts graphical files into Instruction List files flod src hsr 2 Assembling 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 binary executable file pcd for downloading into the PCD 4 IL documentation files are gener
264. out By default the value of the Timeout is zero this means that the default timing is applied In practice we only change it when the Gateways or modems are used generally we restrict ourselves to stretching the Timeout on the external masters and never on the gateway channel PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 13 3 6 3 Bus Parameters user defined Bus Profile User defined E Bus parameters Slot time 300 Min Tsdr 11 Max Tsdr 150 Quiet time T Setup time 1 Gap update Factor 10 Highest station address Max retry limit The properties of the bus contain all of the Profi S Bus communication parameters These values can only be edited if the User defined bus profile is selected The parameters must be the same for all stations on the network All timings are indicated in bit number of bits Slot Time Maximum amount of time the data or token emitter waits for the addressee s response Min Tsdr Minimum waiting time by a slave after having received a telegram until emission of the response to the master Max Tsdr Maximum waiting time by a slave after having received a telegram until emission of the response to the master Quiet Time Waiting time by the emitter after the end of a frame before activating its reception Setup Time Time elapsed between an event and the corresponding reaction Gap Update Factor Number of rotations by the token between two
265. output flag register etc Using a name is better than using a number because it makes the program easier to understand and easier to maintain It allows changing an address data type or comment from the Symbol Editor window and it is updated throughout the open file Syntax for symbol names The first character is always a letter followed by other letters numbers or the underscore character Do not use accented characters 6 G Differences of case upper or lower have no significance MotorOn and MOTORON are the same symbol Type Defines the data type input 1 output O register R counter C timer T TEXT DB etc R FLOAT is a register which contains a floating point value Address Each data type has its own range of available addresses Inputs and outputs dependent on I O modules inserted in PCD Flags F 0 16383 Registers R 0 16383 Timers counters T C 0 1599 the number of timers is configured from the Build Options Comment 3 STH Flag sCopy the Flag state into the accu View User or gt STH Flag sControl the incrementation Auto 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 PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 9 9 3 1 En Add new symbol to Symbol Editor list There are several ways to cr
266. p lass vecscidsins cession ii tonerni ern a a ae aai 30 eD Edrie SyiMDOls online sersa e N T A T E 30 6 13 6 Display symbol state with Watch window oneeeeeesesssssssssssseeereresssssssssssssceereerssssssssssssse 31 oa Seti Tae PCD Si ClO Ke mna a 32 6014 Adj st parameters ssn reaa aar Ea aaar aa aaea S Eea 32 G14 AnitializanonOL HEAVACFBOX S m E N 33 6 14 2 HEAVAG FBox withtadjust parameters ission iae nai E A 34 6 14 3 Mini HEAVAC application cacecicncnuscrassvedenansacedenaseesecoundeadieslordersaneeadseatbucwduamtiodtesbandeesendeiatides 34 6 14 4 Modifying Adjust Parameters when online sneeeeeeesssssssssssseseeereressssssssssssseeeereessssssssssssees 35 6 14 5 Restoring the original parameters from the Fupla file cccccccccccccccceeeessseeseeeeeeeeeeeeeees 35 6 14 6 Saving the online parameters into the Fupla file ccccccecccccceeecceceeeeeeeeseeeeeeeeeeeeeeeeeenaas 36 6 14 7 Defining symbol names for Adjust Parameter cccssseeeeeceeceeecceeeeaeseeeeeseeeeeceeeeeeeeeenaas 36 6 14 8 Defining Adjust Parameter addresses oricine EEE EEEE 37 6 15 Commissioning an analogue MOMUIEC csccccccccccccccccsssssssssssssscssccccccccccccsssssssssssssssscsscscscsooes 38 6 15 1 Acquisition of an analogue measurements cc ceeseesseeeeesseeecceeceeeeeecaaaaaeessseeeeeeeeeeeseeeeeaaas 38 6 15 2 Example for PCD2 W340 analogue input modules cece ccccceccecccce
267. pla page A read input connector is Add added by clicking the left hand mouse button A write output connector is added by holding down the Shift key and pressing the left hand mouse button The connector you have just added is ready to receive a symbol and a cursor is displayed inside the connector If you do not wish to edit the symbol inside the connector straight away press the ESC key and place the next connector Connectors To edit or modify a connector symbol already present on the Fupla page select the connector by double clicking quickly A cursor will be displayed inside the connector It is now possible to enter the address 0 to 3 or output O 32 or the constant Make sure you always leave a space between the letter and the input address The same applies for the output To edit the input symbols 4 consecutive cells in the left hand column of the program screen are marked with the mouse and addresses 0 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 Show Hide Symbols Editor 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 Note By default each new page may a
268. pla page Place the mouse pointer over the connector to display its full symbol definition in a bubble STH Flag sCopy the Flag state into the accu gt STH Flag Control the incrementation Scope The Scope field defines the accessibility of the symbol Local the symbol is used only in the current file Public the symbol can be accessed from other files where the symbol is declared as Public External the symbol is defined as Public in another file PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 7 Saia Burgess Controls AG 6 3 1 Adding anew symbol Simple method To add a symbol to the list open the Symbol Editor window A free line is always available for entering new symbols Select and complete each field Symbol Name Type Address Value Comment and Scope press the Tab or Enter key to move to the next field Quick method 1 The entire definition can be entered in the Symbol Name field which is much faster Declare the symbol with this syntax the press Enter to automatically place the data in the correct fields symbol_name type address comment SymbolName Type Address MValue Comment Scopes United ooroo oo o So amp coe a eoe ooo o o y oa o BE nE S S S Da a J Femo O o e E C E Daly Timer Local Quick method 2 Use the same syntax when entering a symbol on the input or output connector of the Fupla page Symbol Name Daily Timer o d2 Daily Timer
269. plications PG5 User Manual Chapter 11 I Saia Networks 10 12 13 Saia Burgess Controls 12 1 Contents CONTENTS aire settee ts cee cewscaresen EEN ESAE EEEE 1 12 RO aise acces ec essence cesta cc es scene deus seuecedcceeuceabieussedsieeucessucesveusey 2 12 1 Profi S Bus network Example cio oscccccossvecsscescscnverevercstgevessecsuveesensuceesenrscsuceaesescateaveesswesennssvavevsveelenss 2 12 2 Examples of the Data Exchange in Profi S Bus esceecceeecccccssscssssssseccceccccccccsssssssesecececcocesssssssse p 12 3 WN PG PC sevice cc ccsecececs vnc caccctos evens ves ni Enne eE i EDENDE EEEN ENE iraa PENSE PiE N ERNER 3 12 4 Device Configurator parameters ccccccccccccccrrsssssssssssscccccccccccccccccccsssssssssssssscscscccccccccccscccsssssssscees 3 1241 Define the device typo aoviscnceassacincnsuoavseasaantneededdamesdsadanngeunsadesynatneaduedbesedueedtursensteiootaendandeneadzactbes 3 12 4 2 Define S Bus station number in the Network ccccsseseececccecceeeeeeeeeeaaaseseeseeeeeeeeeeeeeeeeaaas 3 12 4 3 Define communication channel of the Profi S BUus ccccccccccccececcceeeeseeesseeseeeeeeeeeseeeeeaaaas 4 12 4 4 Download the Device Configurator parameters in the AeVICC cccessseseeseseeeeeeeeeeeeeeeeeaes 5 129 BUNA PROS VAN eisescccsnccavacesccecesevssseecececssesseesevecenecesasavacdesdaressvassuecevscesecesasavetevsseiesevesevesevstasecesessveseuss 5 12 5 1 Assign the channel using SASI FDOX 0 0 c
270. ptocwanatun as nesataannaden oon vocoaaamaesenscaneasne cnnanbnadiandakecunoaamsesnecensoes 19 125 Other ROTC ECW CC pocnes aa ear E a a eeireteoaees 20 PG5 User Manual Chapter 12 Profi S Bus 10 12 13 12 2 Saia Burgess Controls SA 12 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 12 1 Profi S Bus network Example PCD2 M5540 Station Master A S Bus Station Number 10 PCD3 M5540 Station Master B 1 S Bus Station Number 11 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 Profi S Bus address 22 PCD3 M5540 Station Slave C S Bus Station Number 12 12 2 Examples of the Data Exchange in Profi S Bus Master with data exchanges Master with data exchanges Pata on the network _ on the network _ Master stationA ___ station A P Master station B FO 7 Master station F 100 107 i R1 25 station B R O P Stave station i station C 3 gave Canayo 7 ae Read 8 flags in the slave Binary0 7 F 100 107 station C F 20 27 4 Value0 5 Write 6 registers in the Master_A Value0 5 R0 5 slave station C R 20 25 Master station B Master station A 5 Temperature1 4 Write the temperature Master_B Temperature1 4 Dynamic registers measures to the slave C R 100 104 Slave stat
271. put applied to output 32 flag ACCU Example programming a simple binary equation This example of a program performs the binary equation O32 10 11 12 13 14 15 lt may also be represented by the following diagram 24 VDC k ve Relay 13 4 15 a e 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 O rSotart of cyclic program 0 STH I 0 JCopiss state of input I 0 to accumulator Accu IU ANH I 1 AND function between state of accumulator and gt anpure Liacc 1011 ORH I 2 OR function between state of accumulator and input 2 Accu I0 11 12 ORH I ACOu TO ILFIZ tIS ANH L4 3 Accu IO IIFI2 I9 I4 ANH I gt ACCU ITO LLHIZFL 14715 OUT O 32 Copies result of equation present in accumulator gt CO OGUCPUC ECOB End of cyclic program PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 16 Saia Burgess Controls AG Example Programming a binary equation with a specific order of evaluation This example of a program performs the binary equation O33 11 12 14 I3 lt may also be rep
272. r Symbol Definitions are saved in program files IL Fupla etc 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 Oil_ Pump src automatically opens the symbol editor with the same Name Esme o Ja oiPum ee ee amp DiPumpPrg COB 2 ProgamFor0iPump floa ee S A S PEx Al Publics System The Symbol editor window can be viewed with the Show Hide Symbol Editor button Show Hide or via the menu command View Symbol Editor Symbols Editor PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 3 Components of Symbol Editor Symbol Editor Symbol Editor ah x aS Name Type Add Aj A Se Comment Actual Address Tags Scope gt wae Pumps ROOT WP a C O T 7 T E S d Type a substring to Find ig t a E All Publics Pessa gel System i al Device 10 Water_Pumpsc Symbols in the current file Tabs for Filter Views Water Pump sre All Publics System Symbol Editor Grid lt is a spreadsheet type editor to define symbols An empty row is always present towards the end to define new symbol Various actions can be performed form Right Click Context Menu Symbol Editor Tool bar A set of buttons are present to perform actions in symbol editor These include show hide Navigator tree List view Group view
273. r 1 0 gt Iroad it with L 5s and toggle O 64 rend or COB U next COB PG5 User Manual Chapter 7 Program Structures 10 12 13 Fupla program START UP COB 0 Blink En S FBox Blinker Blink delay T 7 6 7 2 Saia Burgess Controls AG Program Blocks PB and Function Blocks FB The programming language also allows working with Program Blocks PB 0 999 and Function Blocks FB 0 1999 These provide a good way to organize the structure and hierarchy of the program The only difference between PBs and FBs is that an FB can be called with parameters and a PB cannot FBs provide an ideal solution for developing libraries which are usable in many projects They help to reduce the development time PBs and FBs must be called from other blocks COB PB FB SB or XOB There are two type of call conditional and unconditional The first depends on the result of a logical operation the second does not depend on a condition It is possible to call the same PBs and FBs several times in a program A PB FB can also call another PB FB and another up to a maximum call depth of 31 lf the maximum call depth is exceeded then Exception Organization Block XOB 10 is called if programmed PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 1 7 7 2 1 Program Block with conditional call Example of a two speed blinker controlled by the state of input Condition
274. r Names particularly if you have the same or similar pieces of code repeated several times Instead of having many symbols with slightly different names e g Motor A Symbol1 Motor_B_Symbol1 etc you can use the same symbol name but put it in a different symbol group e g MotorA Symbol1 MotorB Symbol1 PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 8 Saia Burgess Controls AG 5 2 4 Scope of symbols Scope of the symbol can be selected from Scope column There are three types of selection available Local Public and External symbols Symbol Editor 1 x E Ez t i KD Da Find Type a substring to Find Sa Address alue Comment Symbol Hame EHWaterPumpse ROOT O o l S O Aa Bl Wate Pum Jo Je lo ooo tic NT fe o E External Ji a E All Publics en mal System E Device 10 Water Pump erc System All Publics Example Device with three program files EM Parking lot PCD2 M480 ge Online Settings 2 E Configuration H Build a 7 SHting Files Documentation Files Local symbols Local symbols can be used only within same file where they have defined For example symbol of scope local defined in Parking Lot src is valid for use in Parking_Lot src only Public Symbols Public symbols can be used in any file within same device For Example Public symbols defined in Parking _Lot src are valid for use in Heating fup or Ventilation src since all th
275. r Set PCD Clock a i cl button in the SAIA PG5 Project Manager window Then select pe eur De Clock button Date 21 10 13 Date dd mm yy 27 07 1990 Time 15 51 34 Time hheramssk 2 05 14 2 Copy time from the PC to the nema wee steele S controller with the Copy to PCD Copy to PCD gt gt Week of vear 1 53 30 gt gt gt button or adjust the clock in the SAIA PCD Clock fields Help Cancel PG5 User Manual Chapter 10 I Additional tools 10 12 13 Saia Burgess Controls Ltd 10 3 2 History PG5 User Manual Chapter 10 Additional tools 10 12 13 PCD History 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 Notes If an error can be traced to a line of the program it will be specified Otherwise it is Reason CALL 7 CALL 7 CALL 7 CALL 7 CALL gt gt oF CALL 7 CALL 7 CALL 7 CALL 7 CALL 7 CALL 7 CALL 7 CALL BATT FAIL LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS LEVELS IR OVERFLOW ERROR FLAG Help displayed in hexadecimal XOB 0 only appears if it has been programmed al T72 Address lear History Date 0601 2003 0601 2003 0601 2003 0601 2003 0601 2003 0601 2003 0601 2003 0601 2003 0601 2003 0601 2003 0601 2003 0601
276. r of data s to exchange address of the first data source and the destination PG5 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 13 12 6 5 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 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 assignation isn t donne correctly then the communication will not work Possible corrective actions in master or slave stati
277. r the button at the start of the symbol line press the left mouse button and keep it down Drag the mouse cursor over the empty connector and release the mouse button The symbol name or type address is copied into the connector under the mouse cursor You can also drag a symbol onto a free space on the Fupla page and the connector and symbol are added automatically in a single operation _ Daily Timer fup ROOT eS eee E fF amp ONTIME A 60000 Gwh onime Local Place the mouse pointer on the button at the start of the line and hold down the left hand mouse button Drag mouse cursor into Fupla connector gt Omp Release mouse button PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG Local Public and External symbols The view with the symbols definition includes a Scope cell to define the option Local Public or External Daily timer PCD3 M5540 p ige Online Settings ES Configuration a A symbol s scope defines the accessibility of the symbol Local symbols are accessible only within the file which contains the symbol definition For example only inside Daily timer fup Public symbols are accessible from all files in the device For example publics symbols are shared by both the files Parking lot fup and Ventilation src in device Daily timer regardless of which file defines the symbol All Publics Systern Daily Timer HY
278. ration of a pulse in 100me Gy Pulse_Timer Timer measures the pulse time amp One_S_Timer ee A Ee All Publics System PULSE ste Symbols Block Symbols FB Number_of_pulses Constant gives the number of pulses a Eb PulseLounter Counter counts the number of pulses 8 5 4 Programming an initial step loading a counter Open the initial step to add the code which loads counter PulseCounter with the constant Number_of_pulses 3 Double click on the element to be edited and choose the editor L Instruction List or Function Block Diagram Fupla Fupla Program Use the FBox Graftec Load Counter Important Do not use timers or counters from other families which are reserved for cyclic programs Set the counter Number_of_pulses Load Counter FulseCounter ta 3 IL Program LD PulseCounter pinitialise the counter Number_of_pulses PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 21 8 5 5 8 5 6 8 5 7 Programming a transition waiting for the start signal A transition is reprocessed repeatedly until the ETR FBox input is high Fupla or the ACCU is high IL at the end of the transition Transition O waits for the input Start_3 pulses to go high Fupla program 0 Want for the ta rt 3 pulses ETF startap signal Add the FBox Graftec End of transition IL program Start High set the ACCU to the state of input Start_3_pulses STH Start_3_pulses
279. re Backup Shopping Arenal Backup what PROJECT Shopping 4rena Devices Backups Director SACI S oftware public Blakaj Backup File Hame Project Shopping 4rena_ 2013101 _ 0832 zip Comment ser Sala Burgess Controls AG Project Shopping Arena Created 17 10 2013 08 32 Backup Options All files S Net Device Files and Plugins D All files except listings and docs Source files only Help Cancel Backup Project or Single Device Selects whether the entire project or just a single device in the project will be backed up By default it is the entire project To Compressed File The path of the compressed zip file which will be created The default name contains the project or device name plus the date time in the format d lt path gt lt name gt _yyyymmdd_hhmm zip Comment Free text describing the backup By default this is filled in with the user name project name and date time of the backup Backup What Defines which will be saved It s not necessary to save all the files only the source ad configuration files are important PG5 User Manual Chapter 2 Project Management 10 12 13 2 6 2 2 2 2 1 72 Saia Burgess Controls SA The Project Tree window a je y Wee 1 Central S d PCD3 M3330 192 168 1 be Library Manager Build Changed Files Rebuild All Files A Properties lige Online Settings SOC
280. re more than 32 branches XOB 9 in called Simultaneous branching ET A simultaneous branch contains several sequences which are executed in parallel at the same time The simultaneous branch always starts with a transition which is connected to several steps and terminated by a single synchronising transition The Graftec editor supports up to 32 parallel branches If there are more than 32 branches XOB 9 is called Jump sequence The jump sequence is like an alternate branch which allows a sequence to be processed in a conditional manner Repeat sequence The repeat sequence is also like an alternate branch but it is connected to a preceding step In the example a counter is initialised with the number of loops then follows a simple sequence of any length the last step decrements the counter and if the counter is not zero then it repeats the loop PG5 User Manual Chapter 8 Graftec Programming 10 12 13 8 10 8 3 8 3 1 8 3 2 Saia Burgess Controls SA Creating a Graftec project For this example we will create a new Project to contain the files for the Graftec program For graphical programming prepare a Graftec file and a Fupla file For IL programming prepare a Graftec file and an IL src file Create a new project From Project Manager use the Project New menu command to create the new project Create Device 3 aa Libraries Devicel PCD bee ige Online Settings Pr
281. re 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 word 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 Cross Reference List Daily timer No Filter HMS A 2003 PCD Clock with current time Toi Definitions 1 Copy Daily Timer sym 3 Edit Data i References 3 Cross Reference List Daily Timer fbd 39 Fupla Block COB COB 3497COD Page 1 written Goto Demaian Daily Timer tbd 44 Fupla Block COB COB_3487C0DF Page 1 aes Daily Timer fbd 50 Fupla Block COB COB_3487COD7 Page 1 Print Symbol Properties Help Goto Close PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 31 2 10 Online Configurator 2 10 1 The Online Configurator di Daily timer Sara PGS Online Configurator timm File Online Tools Options Help Online Settings S Bus USB PGU ETENE in T Online Settings Information PCD Type PCOS M5540 Pw 1 22 10 Device Configurator Program Example Fupla Date
282. ready present in this list the parameters Modem Init and Modem Reset are already configured and tested Note the S Bus address is defined in the device s properties Serial S Bus Master Gateway The Gateway function is commonly used to link two different communication networks adapt a Saia PG5 programming tool for VisiPlus supervision a modem line on the Serial S Bus network or for creating a multi master network All telegrams received from external masters and which are not meant for the gateway station are automatically redirected to the master gateway channel 4 Serial S Bus Master Gateway Port Number Gateway 0 Use Serial 5 Bus For Gateway Yi First S Bus Station g Last 5 Bus Station 253 First Last S Bus Station Enables filtration of telegrams to be sent on the Gateway according to the target station numbers PG5 User Manual Chapter 3 Device configurator 10 12 13 Saia Burgess Controls SA 3 10 3 5 4 S Bus Mode and Timings 4 5 Bus Mode And Timing S Bus Mode Data Mode Baud Rate 9600 Baud Response Timeout ms 0 Training Sequence Delay ms 0 Turnaround Delay ms 0 Mode Choice of the method applied by S Bus in order to indicate the start and finish of the messages must be identical on all stations making up the network Preferably choose the data mode this method is suitable for all applications in particular for the use of modems or standardized network equipment Baud rate Speed of communicatio
283. red on e Verify the network wiring e Verify if the firmware version supports Profi S Bus PG5 User Manual Chapter 12 Profi S Bus 10 12 13 12 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 PSB Channel Prof 5 Bus Master Clr Err ref F B Channel ENDO 4 ret PSEChannel REMO ref PS Channel To ret PSB Channel Ee By 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 PS Channel Profil a Bus Master Clr Err ref PS8Channel Diag Prof s bus PG5 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 11 12 6 12 6 1 12 6 2 12 6 3 IL programm 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 sequence or initialization bloc XOB 16 SASI instruction contains two parameters communication channel address and address of the text wi
284. resented by the following diagram 1 ja 4 033 3 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 support 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 OEH ANH ORH OUT First equation AW oe eH A Oo O Ae NE Result of bracketed function FO I1 I2 I4 Hj O oH ANH OUT CO oe Final result 33 FO IS BECOB Second equation H 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 forced 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 gt Operands output COM 0 33 flag If accumulator state is high output 33 will be inverted high Otherwise the output will remain in its current state 4 ACCU PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls
285. rogram 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 using Project Manager s Download Program toolbar button or the Online Download Program menu command If any communications problems arise check the Online Settings and the cable connection between the PC and the PCD PCD8 K111 or USB PG5 User Manual Chapter 1 Quick Start 10 12 13 1 16 Saia Burgess Controls AG 1 5 Finding and correcting errors Debugging The first version of a program is rarely 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 2 Start program with the Run button Observe the Run LED on the PCD at the same time When the Aun 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 the Run LED on the PCD should turn off because the PCD has stopped executing the program je a When the editor is 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 a Other data values can be displayed by clicking the left hand mouse button on the connection to show a Probe window use the mouse to select the Add Probe button and the link s Example Fupla Saia
286. rols AG Drag and Drop Multiple symbol Drag and Drop Multiple 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 Use the mouse to select the first ee symbol ype a substring to Find hi Comment Actual Address T age Scope 2 Fm Din Purest o a renas nba A Local ES Drain Pumps o aa Dran Pumpin baldra OO OO oea e 0 E E e a Bran Pimps Jo E rein Pumps nudged o 38 Dran Pumpsinbwidnig a Sao a ran Pue nbarioF M T Ee Drain Pune 38 brain Pumps inbuldrig OOOO O OO oea NCES Dran Pumps JON S bran Pumps inbuldrigF OOOO O OOO oa qsa X System All Public Press the Shiftkey select the last symbol Press the CTRI key select an individual symbol Example showing symbol dragged into the Fupla or IL editor Keep Ctrl Shift Key Pressed adn Position mouse pointer as shown in figure Press mouse button DrainPump 4 DrainPump2 DrainPump3 DrainPump4 DrainPump7 A qian Wonca releasing Sate mouse button drag the symbol into the editor PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 23 5 3 8 Search for a symbol When large number of Public symbols present in the grid Find tool can be used
287. rresponding to the channel PG5 User Manual Chapter 12 Profi S Bus 10 12 13 12 6 12 5 2 12 5 3 12 5 4 Saia Burgess Controls SA According to the network the communication channel parameters can be partially defined from the adjust parameters of the SASI Fbox and to be completed in the Device Configurator The channel number is always defined in the adjust parameters of the SASI FBox The channel number depends from PCD Hardware and on the communication hardware used slot B1 B2 serial interface PCD7 F Assign Master channel Communication SASI Profi S Bus Master SASI Profi S Bus Extended PSB Channel Proti s Bus Ex PSB Channel Prof 5 Bus Master 3 i Er Master Station Master Station with timings definitions The assignment of the Master channel is done by combining the Device Configurator parameters 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 Device Configurator Adjust 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 the particular applications Gateway Assign slave channel No SASI FBox is necessary for the slave station in the Profi S Bus network All definitions neces
288. rst page to the bottom right of the last page For more 4 L 6 i precise details on the order in which FBoxes are processed by the PCD select menu path Page Show FBox priorities PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 20 6 8 6 8 1 6 8 2 Saia Burgess Controls AG Copy and paste Certain parts of a program may be repetitive It is not necessary to edit them again in full It is much faster to duplicate them by copying and pasting and then adapt them as required Copy paste part of a program Click on the Select Mode button Mark the area to be copied Press the left mouse button With button still pressed slide mouse Release left mouse button Add an FBox or connection to the selection Press the Ctrl key Keeping the Ctr key down select the connectors and FBoxes to add 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 3 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 Mark a list of symbols Position mouse pointer on first symbol 2 Left click with mouse Four x Position mouse pointer on last symbol Press Shift key Leute Keeping Shift key down left click with mouse Copy the selection with the Edi
289. rther details XOB 25 26 27 28 29 Cyclic interrupt XOBs XOBs 25 29 can be called periodically with a period between 10ms and 1000s The period is defined by the SYSWR instruction 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 master PCD calls XOB 30 This occurs for example when an online station is disconnected from the network or is powered off PG5 User Manual Chapter 7 Program Structures 10 12 13 1 22 Saia Burgess Controls AG 7 5 Sequential Blocks SB 0 to 96 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 the S Graf editor 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 must deal with a situation in a sequential manner SBs can be called from any other block 7 6 Summary Service Media Operand Notices Cyclic Organization COB 0 31 Minimum 1 COB by program Block Programme Block PB 0 999 Under programs called by a COB PB FB SB or XOB Function Block FB 0 1999 Function with parameters called b
290. rties window and fill in the Name in the General section General D Mamet DailyTimer1 En Ch Comment DaihyTimert ee En Ch Build the program and open the Symbol Editor Open the System symbols page EEF Rebuild All With the HEAVAC library all system symbols corresponding to adjust window Files parameters are grouped under A HVC name where name is the symbol name of the FBox Symbol Editor ix Show or Hide Seve pe eb JA c Elenms Sino EOGI SS Address Value Actual Value senese deao S S S E e e e pasuserarll a e a 2158 e e a e LJANA r e All Publics Sistem X Daily Timer HVC fup 6 37 Saia Burgess Controls AG Now it is just a question of using these new symbols in the Fupla program A HYG Dally Timer ON Time ALAYC Dally Timer OFF Time 6 14 8 Defining Adjust Parameter addresses Define the system symbol for the Adjust Parameters as described above and add the address from the FBox Properties Select the Define line and press the button at the end of the line Static Symbols EE 02F02 Switch Gn System defined Switch OFF System defined Define parameter s base address Edit Resource X Scape Local hd Type Array Size Register integer 2 Comment oo Help Build the program and open the Symbol Editor System symbols have been assigned the register addresses shown below Symbol Editor Rebuild All E
291. ructions for counters Integer value C 35 Binary state C 35 _ e 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 lf accumulator state is high counter If accumulator state is high counter 35 will increment by one unit 35 will decrement by one unit Otherwise 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 Negative Zero Error Example Counting pulses from a binary input with a counter COB O 0 STH EZ Copy input state to accumulator DYN F 3 Force accu state high at positive edge of I 2 INC C Bo If accu state is high increment counter ECOB Instructions STH and DYN read informa
292. s name description and read only attribute PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 2 2 Common Files folder f Lighting management PCD3 M5540 fge Online Settings Drag amp Drop T _ J Frogram Files a Build Options X Ea _ Librarie Fup _ Floord Fup This folder contains files that can be shared by more than one device in the project These files can be copied pasted or dragged into the Program Files folder of each device which shares them A common file s name shown in the Program Files folder begins with two dots which indicates that the file is in the parent directory one level up The file can be opened from either the Common Files or the Program Files folders In both cases the same file can be modified and the changes effect every device which references the file These are the main commands you will need for adding common files File New or context menu New File Creates and adds a new file to the Common Files folder Context menu Add Files Copies one or more existing files into the Common Files directory Not only PG5 program files but also commissioning and maintenance documents Word and Excel files etc can be added These files are stored with the PG5 project and can be opened from the Project Tree by double clicking on them 2 2 3 Libraries folder This folder opens the Library Manager window which shows all the availabl
293. s Controls AG IL program two speed Blinker LongTime EQU PB L ShortTime EQU PB 2 ShortTimeValue EQU k5 UIS LongTimeValue EQU Kilo PS Conde on EQU T Output EQU O32 WaitTime EQU 1 COB 0 O STH Condit2on PLE Cond epson Higi CPE i ShOrET LmMe 7 THEN Call PB Short rime CPB H LongTime ELSE Call PB LongTime ECOB PB ShortTime STEL WaitTime IF WaitTime Low LD WaitTime load it with a short value ShortTimeValue COM Output Invert the output EPB PB LongTime STE WaitTime IF WaitTime Low LD WaitTime load it with a long value LongTimeValue COM Output Invert the output EPB If the program is written in Instruction List the start of a block is begins with the instruction PB or FB with the block name or number as the operand The end of the block is defined with EPB or EFB The program code is inserted between the two instructions At the start of every block the ACCU is always High When a PB or FB is called the contents of the ACCU is saved set High as the start of the called block and is restored when the call returns This allows the programming of logical IF THEN ELSE structures where the blocks are called conditionally Notes The status flags Error Negative Positive and Zero are not saved and restored when a PB of FB is called only the ACCU state is saved If the status flags need to be saved they must be copied into normal Flags As with COBs PBs and FBs should not contain wait loops and delays
294. s Go On Offline button Supply 24VDC Put controller into Run mode with Run Run button Ie Error ro At the same time note the RUN lamp located on the front of the PCD When the Run button is pressed the RUN 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 shows the contents of counter 1400 To the right is shown the accumulator and status flags states and the index register value Car incoming A car comes into the pa 906014 IjO 6 8 Dynamise incoming car signal On the positivu flank of g g F 7502 8 Humber of free slots Decrement the number HBAS C 1488 8 AA 26 HG F1 EG ITAG888 PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 33 9 8 2 Step by step mode If the PCD is in Run mode mark the first line to observe in step by step mode and press the Run to Cursor button The PCD stops when it reaches the line with the cursor Now Run to Cursor begin step by step program 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 these with step by step mode The following three options are available Step In Enter the block and step through it Step Over
295. s an excellent tool for checking programs and installations It allows all the data of an application to be viewed and modified online 10 2 1 Open the Watch Window The Watch Window is displayed by selecting the View Watch Window menu or with ais 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 i Watter Distribution PCD T File Name New File Wether Parameters Directory C Users Public SBC PG5_ 27 Projects45 amples PG5 User Manual Chapter File Type LON Network File Watch window File Data Transter File tS Global Symbol File sy5 Excel Symbol File xl WisiPlus Symbol File rep BACnet Files brit Descriptions Linked Built Open file now 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 ee Watter Distribution PCD H Settings Programm Files watter control Fup oe Watter Parameters 5w PG5 User Manual Chapter 10 Additional tools 10 12 13 10 10 Saia Burgess Controls AG 10 2 2 Add datato a Watch Window Drag symbols from the program or from the symbol e
296. s and optional comment Correction of symbol type or address is supported from the symbol list and each user program connector line automatically updated if the symbol is changed Dynamic addressing Symbol Editor E ES KD Da Find Type a substring to Find j 7 Symbol Hame Address v alue Daytime Roo OOOO S S S E e Timer focal a Daily Timer tup System All Public 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 Build Options See Project Manager After build dynamic address will be displayed in the Actual Value Column Note 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 Absolute addresses Symbol Editor Es BE ij k u Find Type a substring to Find k Symbol Hame Address alue H Daily Timer_fup ROOT a ee Se E E E oo e Dame e S a Daily Timer tup System All Publics The data is defined only with a type 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
297. s relate to the active window i e the window identified by a blue header bar By default each open Watch Window document uses the Online settings of the device to which it belongs Data from different PCDs available in the project can therefore be displayed on the communications network r Processz 5WwwW Devicel Saia PGS Watch Window File Edit View Online Window Help D aM Gs BB neja v ls v Modify value Symbol Comment Car is leaved From the park Parking place is Full New car arrived Car_leaving Lot_full NewCar r Daily timer 5ww Daily timer Modify Value Module Symbol Comment HMS R 2003 111056 Daily Timer Fup PCD Clock with current time DailyTimer O32 1 Daily Timer Fup Daily Timer ONTIME R 2005 3000 Daily Timer Fup Switch on time OFFTIME R 2004 180000 Daily Timer Fup Switch off time PG5 User Manual Chapter 10 Additional tools 10 12 13 Saia Burgess Controls Ltd 10 13 10 2 7 Trend Function H Process 5ww Devicei Saia PGS Watch Window O x Fie Edit View Online Window Help F x Dae ed Ge Bea ela r elmo via in l d Trend Module Properties 1x m Red Binary Process Pup B oreen BinaryProcess Fup Blue Binary Process Fup m Flack Binary Process fup O Aqua BinaryProcess Fup Scale Sample Ti 10 Seconds Auto adapt Y Sce Yes Y Scale 1 10 A Watch window can trace a chart with maximum 8 values registers flags etc f more data needs to be traced i
298. sary are already present in the Device Configurator 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 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 7 12 5 5 Data Exchange between master and slave stations PSB Channel Communication channel P Master 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 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 a
299. seeteetrotoaa dup eaeas iaeacdote E 8 1 3 5 Adding a new program file ccceeeessseeecccccceeeceeeaaasessesseseseeeeeceeeeeseeseaaaaassssseseeeeeeeeseeeeeaqaas 10 1 3 6 Opening an existing TNC oo icavisxessenssncdiinicrcovesadessiesiswesveesansebevaadensewlevekaweasebssen bienbsacasmadeeseeenats 1 1 3 7 PT OT AM so serse catenins ease geneveerseinn E E Er E ier EE 1 1 4 Running and testing the program siscsesisccccasccccesvssccceevsesscesvecsccedeccuncuavsssesverecessevaccecwccatousssseveusestes 15 1 4 1 Boa DeO ANG cnet E E ad E E eres een etna 15 1 4 2 Downloading the program into the PCD sesesssessssssssssseseeressssssssssssssseerererssreesesssssssssseeereeee 15 1 5 Finding and correcting errors Debugging ssssscessssssssssecccccecccccsssssssecccceccccccossssssssesccceeceessssss 16 1 6 Correchna Progr AI psscisnsiins sane 17 PG5 User Manual Chapter 1 Quick Start 10 12 13 1 1 1 2 PG5 User Manual Chapter 1 Quick Start 10 12 13 Saia Burgess Controls AG Saia Burgess Controls AG 1 PCD Quick start 1 1 Introduction As your first point of contact with Saia PCD equipment we propose a direct approach tackling the production of a small real life application Even without any experience of Saia PCD products this is easy to do Everything is set out in detail in this quick start chapter This example shows how to commission a PCD2 M5540 Programming and testing using the Saia PG5 programm
300. sent from the master station SEND or from which slave stations the Master can read data RCV Adjust 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 User Manual Chapter 12 Profi S Bus 10 12 13 12 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 12 5 6 Diagnostics los 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 PSB Channel Prof 5 Bus Master 8 Cir Err ref F B Channel END ref PSBChannel ROWO oi ref PS8 Channel T ref PSAChannel 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 PSB Channel Protl s Bus Master a Llr Err ref PS8Channel END ref PSB Channel ROWO ref PSBChannel T ref FP 6 Channel pev pev PG5 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 9 Possibl
301. ser Manual Chapter 12 Profi S Bus 10 12 13 12 3 12 4 Saia Burgess Controls SA 12 4 3 Define communication channel of the Profi S Bus Onboard Communications Location Onboard AS 232 R5 489E Profi 5 Bus Onboard RS 485 5 Net Port Mumber Profi 5 Bus Onboard USB Enabled Profi 5 Bus Channel Onboarc Ethernet Full Protocol PSU Profi 5 Bus Slave ddress Use 5 Net Configuration S Nek File Mame Baud Rate Profi 5 Bus Bus Profile Onboard Communication properties Full Protocol PGU Profi S Bus Define the channel as slave or PGU This definition can be accumulated with master function adding a SASI Fbox in Fupla program Slave PGU 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 Address Profi S Bus station number connected to channel Baud Rate Profi S Bus Communication speed must be the same for all stations on the network 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 PG5 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess
302. sociated device File which is the access path of the master device 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 Slave 2 PCD3 1760 2 Parameters eS Modular Define Modules Max Number of Modules 17 Device Configuration Supported Modules Slot Installed Modules Slot Installed Modules Empty Slot O Wid 44 Temperature Diagnose Es 8D 15 30V00 0 W745 44 Temperature F112 SDI 15 30V0C 1 Elis 801 15 30VDC E168 1601 15 30 V00 E500 60 60 250V4A0 galy sep E612 601 15 S0 V00 galv sep Agus 4 800 Relais A300 600 24 10 32700 4400 6D0 5 30VDC0 A410 600 5 S0 V0C galv sep 446s 1600 10 30 00 Parameters Remove Installed Module Configuration Length Format Consistency Type Mapping word Vi ord R T emperaturel T emperatureS PG5 User Manual Chapter 15 Profi S IO 10 12 13 Saia Burgess Controls 15 5 For each input output module fitted in the slave station select the module type in the Supported Modules list and add it to the Installed 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 15 6 2 Configuring symbol names for remote data 6 word s input Mapping Media Definition Media Number Media Hame Temperature Temperature Media Type C
303. ssed PG5 User Manual Chapter 2 Project Management 10 12 13 Saia Burgess Controls SA 2 33 2 10 4 Saving program and data from RAM Ai Daily timer Saia PGS Online Configurator aa File Tools Options Help 0i Go Offline 5 Online Settings Go Urtline as Run Stop FR Restart Hard Info i Hardware Information T Program Information History Clock m S Bus Station tart Exit Download Program Upload Program Download via HTTP FTP Upload All Download All Flash Memory Clear Memory This is an interesting command which allows the save and restore of the user program and configuration and also all the Registers Flags Timers DB Texts etc present in the PCD s RAM memory This is very useful for copying programs to other PCDs when duplicating an installation changing the PCD or simply to restore the PCD to a previously saved state Tools Upload All Uploads and saves all of RAM into a file of type im5 PG5 memory image file Tools Download All Downloads a im5 file into the PCD s RAM 2 10 5 Create Diagnostic File This useful feature creates a file containing all the information needed when requesting help from Saia Burgess Controls technical support team The file contains details about the PCD type firmware version etc Use the Tools Create Diagnostic File command and note the path of the file which was created PG5 User Manual
304. station on the Profibus FDL network In order to fully designate the Device with which telegram exchange takes place two addresses are required the Profibus FDL address and the S Bus address defined in the device s properties Baud rate Profi S Bus Speed of communication must be identical on all stations in the network Bus Profile The timings for transmission are grouped into three profiles User defined the parameters are defined by the user e S Net uses the values which are most suitable for the Saia PG5 network Configurator e DP uses the values which are most suitable for the Profibus DP network The Profile must be identical on all stations in the network The S Net profile is required when RIO PCD3 T76x is used on the networks Profi S Bus Master Gateway The Gateway function is commonly used to link two different communication networks adapt a Saia PG5 programming tool for VisiPlus supervision a modem line on the Profi S Bus network All telegrams received from external masters and which are not meant for the gateway station are automatically redirected to the master gateway channel 4 Profi 5 Bus Master Gateway Channel Number Profi S Bus Gate 10 Use Profi 5 Bus For Gateway Yes A First S Bus Station Profi S Bus 0 Last 5 Bus Station Profi S Bus 253 Response Timeout ms 0 First Last S Bus Station Enables filtration of telegrams to be sent on the Gateway according to the target station numbers Response Time
305. stem oS Symbols sp5 E Device I0 PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 10 Saia Burgess Controls AG 5 2 6 Symbols definition in sy5 file As we have seen in earlier sections that symbol definition are stored in program files IL Fupla etc Alternatively it is possible to define Public Symbols at central location in sy5 file and use them in program files of current Device When Public symbols are defined in program files IL Fupla etc they are not lost when program files are copied from one device to another It is therefore advantageous to define Public symbols in respective program files instead of defining them at one place in sy5 file New sy5 file can be created and added to the project by selecting file type as sy5 Add sy5 file from Project manager similar to program file and sy5 file will be opened in Symbol Editor New File Daily timer HVC File Mame Global Symbol Directory C Users Public SBC PG5_ 274 Projects 5 amples PG5 User Manual Chapter File Type Watch Window File 5r Data Transfer File dt5 Excel Symbol File xls VisiPlus Symbol File rep BACnet Files brit DOC Suite dde Description Z LinkedB uilt iW Open file now Help PG5 User Manual Chapter 5 PCD Resources 10 12 13 Saia Burgess Controls AG 5 11 Sy5 File opened in symbol editor This Public symbol definition file will be opened in Symbol editor and symbol
306. t Files which are shared by several of the devices can be stored in the Common Files folder z Next are the device folders each device represents a PCD Each device folder contains the following sub folders z Online Settings Device Configurator and Build Options Program Files contains the program module files Listing Files contains files generated during the program build Build These are not so interesting to the inexperienced user 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 Project New define the name of the new project in the Project Name field check the Create Device option and confirm with the OK button Ctri J Project Name Exemple Fupla Projects Directory C Users PublicSBCSPGS_ 27 Projects Description This i the comment of my first application program Create Device E Help Opening an existing project Cancel A project which already exists can be opened using the Project Open menu command This searches for all project files saia5pj 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 you can press the
307. t Represents the RAM or EPROM available on the Device in order to receive the program as well as texts and data blocks included between addresses 0 3999 This memory may also be EPROM on some older PCD s Whereas the new ones provide the opportunity to carry out a program backup on a Flash memory Extension Memory Represents the RAM available for data blocks with addresses higher than 3999 User Program Memory Backup size Flash Indicates the size of the internal Flash memory of the Device if it is insufficient some types of devices support a Flash extension memory on one or a number of external slots See configurations under Memory Slots The Flash memory is used in order to realize program backup after loading on the Device Backup must be activated in the menu Tools Options of the Project Manager or realized on request by the Project Manager by means of selecting the menu Online Flash Backup Restore If a power outage causes a loss of the program in RAM when power is restored the Device Firmware automatically restores the program present on the Backup memory The Flash memory also supports other applications such as data backup or the source files of the project Password The Devices have a protection mechanism by means of a password If there is password protection only the reduced communication protocol can be used It only authorizes access to the registers timers counters indicators inputs outputs data blocks an
308. t Copy menu path or 2 with the Ctrl C keys lr Position the mouse pointer on a free part of the 4 L i margin Paste a copy of the selection using the Edit Paste menu path or the Ctrl V keys Ctrl V O Gamat The Ctrl key allows non consecutive symbols to be selected PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 21 6 9 Templates Fupla pages can be saved as a Template which can be used like a library of pages 6 9 1 Creating a template Page navigator ix EM COB COB_saA87COD7 Besa L Page 1 Daily Timer Contre H o Export Page Add to Tem E General Add Side Co oe fees Group Group Control an output ON OFF Description with the parameters time Version 0 File Name Daily_Timer fxp Show Import dialog Yes Name Template Name lt is easy to create a template Use the Page Navigator window to select one or more pages the execute the context menu command Add To Templates A dialog box will ask for a group aname and a comment for the template The template s Group is similar to the FBox Family The group organizes the templates according to the classification defined by the author The group name defines the tree structure of the Templates selector window Selector Templates W Template File deflst H Clock bese Daily Clock Control one binary state PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 22 6 9 2
309. t is possible to open a new watch window file Show Hide Trend Select the button Show Hide Trend to display the watch window chart then set some symbols present in the grid with a Trend colour and start the trend with the corresponding button in the tool bar e If we select the view with the symbols or the trend the properties windows Start Pause shows some adjustable parameters like the trend sample time and scales units Trend Update PG5 User Manual Chapter 10 Additional tools 10 12 13 10 14 Saia Burgess Controls AG 10 2 8 Log Function Open Watch Window and open its Properties Window from menu View gt Properties Window Select one or several Symbols in the Watch Window grid and set the option Logging Enable to yes then set to no if the measurement is finished l Logging Enable Yes ad Sample Rate 1 Second The menu Online gt Export Data allows selecting the data to be logged and the time period with date and time Export Data x Symbol Mame Close RF 1000 RF 1001 R 1002 RF 1003 F_101 F_i00 RF 1o04 EEE EEA From 8 30 2010 5 20 18 Ta 5 30 2010 8 30 28 ER Ei id al Preview Data Format standard x Column Separator E Help The button Preview displays the measurements Export Data Preview Valsinus Vallosinus 08 35 56 08 3557 08 35 56 08 35 59 08 36 00 08 3 PG5 User Manual Chapter 10 Additional tools 10 12 13
310. t networks Converter Converting binary to integer integer to floating point etc The FBox libraries provide almost all the operations ever needed by a program There are a many Families and FBoxes and it may be difficult to find the right one Various search facilities have been provided to help you If an FBox family is selected pressing a letter key scrolls to the next family name which begins with that letter If a family branch is open pressing a letter key scrolls to the next FBox name in that family which begins with that letter The Selector window s toolbar has a Filter field where a filter string can be entered For example type ADD and press the Enter key the Selector window will now show only the FBoxes which contain the ADD keyword which is Floating Point and Integer To see all the FBoxes again press the Clear Filter button PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 14 mi Libraries Favorites 6 5 2 6 5 3 6 5 4 Saia Burgess Controls AG Project Manager s Libraries branch shows all the PG5 s installed libraries and libraries local to the current Project Libraries which you don t want to use can be un checked which reduces the number of libraries shown in the Selector window FBoxes which are regularly used can be added to a Favorites list Select the FBox open the context menu and use the Add To Favorites command To show the Favorites press the ir button at the bott
311. t remains is to download it from the PC into the PCD This is done with Project Manager s Download Program toolbar button or with menu command Online Download Program lf any communications problems arise check the Online Settings and the PCD8 K111 or USB cable connection between PC and PCD and make sure the PCD IS powered up Finding and correcting errors Debugging The first version of a program is not always perfect A stringent test is always needed The program can be tested using the same editor that was used to write the program Go On Offline Run Stop Step by step 1 Press the Go On Offline button Supply 24VDC 2 Start program with the Run button Run Error At the same time observe the Rum lamp on the front panel of the PCD The Run command turns on the Run LED and PCD starts executing the program 3 When the Stop button is clicked the Run lamp goes off and the PCD Time stops execution of the user program 4 The PCD executes one FBox each fa time the Step by step button or F11 Day key is pressed Observe the Stop marker which indicates the step by step progress of the program PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 13 2 Breakpoints e Set or Clear Breakpoints Breakpoints let you stop a program at an event linked to one of its FBoxes or to a symbol Low or high state of input output flag or status flag Value in a register or
312. t the start of the line and press the left mouse button gt sth Dynamise incoming car signal Release the mouse button This way of using a symbol excludes any possibility of typing errors In the Symbol Editor window position the mouse pointer over the button at the start of the symbol line press the left hand mouse button and keep it down Drag the mouse cursor into the IL editor and release the mouse button The symbol chosen is inserted at the mouse pointer position Drag the mouse into the editor PG5 User Manual Chapter 9 Programming in IL 10 12 13 9 3 4 Saia Burgess Controls AG Local Public and External symbols The view with the symbols definition includes a Scope cell to define the option Local Public or External Daily timer PCD3 M5540 F tae Online Settings ES Configuration A symbol s scope defines the accessibility of the symbol Local symbols are accessible only within the file which contains the symbol definition For example only inside Daily timer fup Public symbols are accessible from all files in the device For example publics symbols are shared by both the files Parking lot fup and Ventilation src in device Daily timer regardless of which file defines the symbol All Publics Systern Daily Timer HC fup The Symbol Editor typically shows three views a view with the name of the open Fupla file two views called ALL Publics and System The view with th
313. t value then divide R 35 by 0 25 which has been loaded into R 36 The floating point result of the division is put in R 5 R 5 is then copied to R 6 to be converted back to an integer value some of these steps are not really necessary they could use the same workspace registers Instruction list program Fupla program COB 0 Cyclic Block Load an integer constant into a register O 100 LD R 4 load 100 into R 4 100 iii COPY R 4 convert integer R 4 R 35 7 to floating point P Rao In Bo O a U LOO LD 36 Load 0 25 into R 36 25 2 500000 0i1 PDIV 35 divide R 35 by 0 25 Convert a floating value to integer 36 put result in R5 convert result back COPY Fo Int oOo J dO UI 5 6 to integer in R6 __yx Er FPI 6 FBox Integer Move Converter Int to float ECOB Floating point Divide Converter Float to Int PG5 User Manual Chapter 4 PCD Data 10 12 13 Convert an integer value to floating 4 10 Saia Burgess Controls AG 4 2 4 Timers and counters Timers and counters can hold values between O and 2 147 483 648 31 bits and they share the same address range O to 1599 The number of timers is defined by the device s Build Options for example 0 31 are timers and 32 to 1499 are counters Timers have a default timebase of 100ms which means that the timer is decremented by 1 every 100ms and so counts down 10 times a second Usually addresses 0 to 31 are
314. tatements then simply mark the statements and import the corresponding symbols with menu path Tools Move Symbols to Symbol Editor The symbols are then moved from the program file into the symbol list F Parking lot 5aia PG5 IL Editor Oil_Pump src File Edit Search View Device Online Tools Window Help STH Syntax Check Symbol List Add Externals to Symbol Editor nbol Editor Hormal Run Move Symbols to Symbol Editor Cond_Run Auto Format Oi1High Mae l Emergency Convert from OEM to ANSI Intermediate_Flag Options 0il Pump ant All Publics System Oil_Pump src Moves symbol declarations to the Symbol Editor Ln 8 Col 58 NUM INS 5 3 16 Importing Merging symbols Symbols can be imported from another program Electro CAD VisiPlus 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 then Copy Paste symbols into symbol editor Copy paste symbols from other editors like excel word etc can be used to import merge symbols To do this write a list of symbols in Excel WinWord or any Text editor and Copy Paste them into Symbol Editor directly For example edit a symbol file as shown below and copy symbol definition from excel and Paste it in symbol editor Also if symbol editor a
315. tch Window s status bar indicates RUN mode If necessary force Start Stop the PCD into RUN or STOP with the Online menu Monitoring 10 2 4 Online modification of data The Modify Value column lets you define new values for a number of symbols and download them into the PCD by selecting the Download Values button Daily timer sww Daily timer Sree 1 Edit new values HMS R z003 102433 DailyTimer O32 1 ONTIME R 2005 60000 s000 m OFFTIME R 2004 19000 itch off tim A r Daily timer 5ww Daily timer 3 The values are in the PCD Symbol Address Yale HMS R 2005 102616 OCK with corrent time Daily Timer O32 1 Daily Timer ONTIME F 2005 83000 e000 Switch on time 2 Download Values OFFTIME Switch off time 10 2 5 Display format The display format of values can be adjusted as required Example Display register R 2004 in hexadecimal Cut Ctrl x Copy Ctrl C Paste Ctrl V Insert Line Ins Delete Line Del lise45 l Float Ctrl 5hift F Mowe U Ctrl U oe ae sa Chi i ASCII Ctrl Shift 1 o Bua Binary Ctrl 5hift 6 Hexadecimal gi Decimal ba T x R 200 1135245 IEEE Float RA 2OO4 O002 6F0H Double IEEE Float R 2005 S3000 PG5 User Manual I Chapter 10 Additional tools 10 12 13 10 12 Saia Burgess Controls AG 10 2 6 Watch Window and applications with several devices The Watch Window lets you open several documents at one time The menu toolbar and status bar alway
316. te Build All Download Program and Go Online Rebuild All Files col Download Program DailyTimert Clk D w En CA Go Online If the program is extended with several other HEAVAC FBoxes the nitialisation HEAVAC 7 FBox must be positioned once only at the top of the first Fupla page PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 Saia Burgess Controls AG 6 35 6 14 4 Modifying Adjust Parameters when online Adjust Window On Edit Data 12 00 Description Online Value The online modification of Adjust Parameters is supported by the View Adjust Parameters window It shows the parameters of the selected FBox in a window which works a bit like the Watch Window The Description column describes the adjust parameter The Online Value column shows the value of the parameter read from the memory of the PCD The Modify Value column allows new values to be entered and written individually or simultaneously into the PCD Writes a single parameter to the PCD Writes all changed parameters simultaneously It s also possible to select a parameter and modify it in the Edit Data field on the tool bar The values of modified parameters are written directly into the PCD s memory they do not change the contents of the original Fupla file 6 14 5 Restoring the original parameters from the Fupla file Adjust Window Eon lt gt Hi eta Description After online changes to the adjust parameters it s
317. terests us but the change of state 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 I 0 io LF LF LH DYN F 3 TM LY COM oO 34 O 34 Example detection of a falling edge STL I 0 10 _yvTeyy DYN F 3 T LJ COM 34 O 34 To help you see the influence of the DYN instruction on the program shown above try removing the DYN instruction and see how the program behaves PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 19 9 4 4 Status flags 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 Setin case 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
318. th 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 Device Configurator parameters 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 Device Configurator 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 User Manual Chapter 12 Profi S Bus 10 12 13 1
319. the file If necessary another SB can be added to the file using the Block New menu command then modify the block s details from the Properties window This window is also used to modify the properties of the SB which is created when a new file is created General Mame SB 7 58 2 Number Comment Type 5B Scope alobal Name The symbol name of the block Assigning meaningful names to the blocks it makes the program easier to understand and maintain Comment Free comment which can describe some details about the block Number Block s number By default the block s number is blank so it is assigned dynamically by the Build If necessary you can assign a number yourself Scope Scope of the SB s symbol name Local or Public Use Public if the symbol needs to be accessed from other files For example if it is called from a COB defined in another file To display the Graftec structure of an SB right click on the Page Navigator window and select the Open Block command from the context menu Next we will structure the SB with the steps and transitions PG5 User Manual Chapter 8 Graftec Programming 10 12 13 Saia Burgess Controls SA 8 13 8 4 Editing the Graftec structure A new Graftec file always contains the initial step which is executed the first time the SB is run Additional steps and transitions are added using keyboard or toolbar commands 8 4 1 Editing a simple sequence 1 Press the Transition Mode
320. the next connector Editing a symbol inside connector To edit or modify a connector symbol already present on the Fupla page click on the connector once to select it and a second time to open the field for editing A cursor is displayed inside the connector and it s now possible to enter the symbol definition Note that newly entered symbols are automatically added to the Symbol Editor window if they are not already there Quick way to place a symbol and its connector Symbols already present in the Symbol Editor window can be dragged onto a free space on the Fupla page This will create a new connector containing the symbol If the symbol is dragged onto an FBox input or output an input or output connector will be created and linked directly to the FBox Drag Copy Paste Delete symbol Selecting the area shown in red will only affect the symbol It is possible to select the symbol with the mouse and drag copy paste it to another connector or delete it The right hand mouse button will display a context menu with all available operations Copy Paste Delete connector i Selecting the area shown in white affects the connector and the symbol it contains The right hand mouse button will display a context menu with all available operations PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 11 6 12 Saia Burgess Controls AG 6 4 6 Stretch connectors Connectors are stretchable This means that the number of c
321. the next section 2 8 2 Saving the program s source code The program s source files are stored on the hard drive of the PC Only the executable code created by the build is downloaded into the PCD s memory Without the source files it is not possible to modify the programs for updates or maintenance lt is therefore important to create backups and to always have the latest version available for the maintenance technicians There are two ways to save the source files e The Project Backup command saves all the directories and files into a zip file This single file makes it easy to retain the directory structure and file layouts The project is restored from the zip file using the Project Restore command See section 2 1 4 for details e The command Online Flash Memory Backup Source To Flash creates the zip backup file and downloads it to the PCD s Flash memory using FTP via an Ethernet connection The source is restored by uploading and restoring the file using Online Flash Memory Restore Source From Flash This procedure is described below Backup Source to Flash The command Online Flash Memory Backup Source To Flash starts by compressing the entire project or single device into a standard zip file PG5 User Manual Chapter 2 Project Management 10 12 13 2 26 Saia Burgess Controls SA amp Backup Source To Flash Backup what DEVICE Daily timer PCOS M5540 oe Name of Backup File
322. the slave station number and verify concerned stations e Verify if the Device Configurator parameters 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 User Manual Chapter 12 Profi S Bus 10 12 13 Saia Burgess Controls 12 15 12 7 Gateway Function The Gateway feature is commonly used to allow two different communication networks to communicate together or adapt a programming tool PG5 or a supervision system Visi to use a different network that the one usually supported 12 7 1 Application PG5 Supervision Supervision m mli m TCP IP PEDI Gateway Profi S Bus am 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
323. timers is configured from the Build Options 3 Texts DBs 0 3999 are stored in program memory RAM EPROM FLASH 4 Texts DBs 4000 and above are stored in extension data memory RAM PG5 User Manual Chapter 4 PCD Data 10 12 13 Saia Burgess Controls AG Contents 5 SYMBOL EDITOR 5 1 Introduction 5 2 Overview 5 2 1 Components of Symbol Editor ae Elements of a Symbol 5 2 3 Grouping symbols together 5 2 4 Scope of symbols 5 2 5 Filter Views 5 2 6 Symbols definition in sy5 file 5 2 7 Symbols definition in xls txt rxp files 5 2 8 Define symbols for the communications networks 529 Symbols definition in Common file 5 3 Working with symbols 5 3 1 Adding symbols to symbol list 3 52 Adding several symbols to the symbol editor fo he Referenced symbols 5 3 4 Adding a symbol while typing your IL Program 5 3 5 Adding a symbol while typing your program in Fupla 5 3 6 Symbol Addressing Modes I7 Using Symbols in Programs 5 3 8 Search for a symbol 5 3 9 Auto allocation 5 3 10 Entering text 5 3 11 Entering DBs 5 3 12 Symbol Cross Reference 5 3 13 Editing Symbol Grid Areas 5 3 14 Sorting Symbol List 5 3 15 Importing symbols from EQUATE statements 5 3 16 Importing Merging symbols 5 3 17 Exporting symbols 5 3 18 Symbol Tags 5 3 19 Actual Address 5 3 20 Initialization of symbols 5 3 21 Reserved words 5 3 22 Errors and Warnings PG5 User Manual Chapter 5 Symbol Editor 10 12 13 13 13 14 15 16 1
324. ting alternative solution for this kind of application They bypass the need to use PCD2 3 Hxxxx counting modules which have a maximum counting frequency between 10 to 160 kHz depending on the module type PG5 User Manual Chapter 4 PCD Data 10 12 13 Saia Burgess Controls Ltd 4 7 4 2 4 2 1 Internal Data Flags A flag contains a single binary bit of data either O or 1 By default all the flags are no volatile This means that if you turn off the PCD when the flag is a 1 it will still be a 1 when you turn the PCD back on assuming the RAM backup battery isn t flat All volatile flags are reset to 0 when the PCD is turned off The number of nonvolatile flags is defined from the device s Build Options see below Example The following example writes a high 1 to flag number 11 as soon as input 1 or input 3 is high Boolean equation F 11 I 1 OR I 3 Instruction list program Fupla program CoB 0 STH I1 i TL 1 as 1 RH I i I is 1 5 at a Fbox Binary Or OUT F 11 then set F 11 ECOB Configuring the number of no volatile flags The partition between volatile and no volatile flags is defined in the device s Build Options in the Project Manager The ranges for dynamic addressing can also be defined there Dynamic addressing is described in the next section Device1 PCD2 lle Online Settings El Media Allocation eae a Configuration Last Timer 88 Build Gptions Timer Timebase in milliseconds 10 10000
325. tinue to be handled set reset or polled by the user program 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 The battery can fail even if the PCD is not in use for a long time Even a new PCD which has never been used can show the same symptoms XOB 4 Parity error on address bus XOB 4 can only be called if the PCD has extension modules 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 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 The PCD s input and output modules return a signal when they are accessed If this signal is not returned XOB 5 is called Generally occurs if the module is not present but it can also happen in case of faulty address decoding on the module On the PCD1 2 3 this mechanism is not implemented PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls AG 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
326. tion 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 INC instruction will increment counter 35 PG5 User Manual Chapter 9 Programming in IL 10 12 13 Saia Burgess Controls AG 9 23 9 4 7 9 4 8 Accumulator dependent instructions We have seen that binary instructions make much use of the accumulator and that some word instructions also use it 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 E Only for timers and counters COE Only for timers and counters INC Only for timers and counters DEC Only for timers and 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 O 0 STE chapel If the timer state is low the accu state will be high LD ae zak load time delay with 10 units of time 10 COM O 38
327. to understand the concept of COBs Since all COBs must run continuously they should not contain wait loops or delays because these would prevent the regular handling of events If you use the Fupla editor S Fup it creates a COB by default Fupla programs are continuous function chart programs which are executed cyclically and are therefore well suited to COBs lf the program is written in the Instruction List language the block begins with a COB instruction and ends with ECOB End COB The block s code is written between theses two instructions At the start of every COB the Accumulator ACCU is always High 1 you will see that this is very important for cyclic programs The COB instruction has two operands The first is the COB number the second is the COB s supervision time If the supervision time is 0 then the COB s execution time is not monitored If the supervision time is not 0 then it represents a timeout in 10ths of a second e g 10 100ms 100 1s If the COB has not finished within that time the Exception Organization Block XOB 11 is called At the end of XOB 11 the COB which timed out is resumed from where it was interrupted and the supervision time is restarted The Error LED is not lit because the error has been handled by the program If XOB 11 is not programmed the PCD s Error LED is lit and execution continues with the next COB which starts its own supervision time On the next cycle of the program the CO
328. top the PCD Depending on the application or process it could be dangerous to stop a running program e g if it s controlling a Large Hadron Collider or nuclear power station Selecting this option allows a warning message to be displayed before the program 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 Auto close Up Download dialog boxes on success If this option is selected the Up Download dialog boxes close automatically after a successful download and will only remain open if there was an error 2 6 Commands for All Devices If the PC and all the project s devices are connected together on a network then Project Online Commands dialog box provides some useful commands for controlling or downloading to all devices on the network amp Project Online Commands Chapter 6 Fupla examples Commands Edit Options Seg A Device Status Destination Channel aali Daily timer Stn S Bus USB Wo2 Daily timer HC Str PGU S Bus USB Iw 3 Lot Str PGU 5 Bus USB Hep Sequence Options Test Close The dialog box shows a list of all devices in the project and has checkboxes for selecting the devices to receive the commands By default all devices are checked The device list s context menu contains some commands for
329. trol Program For winter time l FB 156 H Maintenance Control Program for maintenace time PB 12 Test_Install Test your installation PB 13 Diag _Instal Installation diagnose COB 1 Light_Control MOBs Exception Organization Blacks E SOB 16 Init Initialise your parameters PG5 User Manual Chapter 2 Project Management 10 12 13 2 29 2 30 Saia Burgess Controls SA 2 9 2 Global Symbols and Data List Views The commands View Global Symbols and View Data List display the symbols and data used by the program e All Publics Symbols shows all used global symbols from all files in the active device using the Symbol Editor This list cannot be edited to edit global un UOR symbols you must open the file which defines them Symbols e Data List shows all symbols and data used by the active device Global and local symbols and absolute addresses are shown This list cannot be edited Symbol _ Type Address Daily T imer Daily Timer tbd Daily Timer Data list HMS Daily Timertbd PCO Clock with current time OFF TIME Daily Tinerfbd Switch off time OA TIME Daily Timer fbd Switch on time If a local symbol is defined but is not used in the program it will not be shown in these windows 2 9 3 Cross Reference List The All Publics Symbols and Data List views offer the possibility of selecting a symbol and showing its cross reference list which a list of all program locations whe
330. ts 10 to 14 will be used 4 Plug a PCD2 A400 module into socket 3 addresses 32 to 47 as previously described This provides 8 digital outputs O32 to O39 for 24 VDC 0 5A 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 0 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 29 floor 1 floor Ground floor N 230 VAC p 24 VDC olil2i3ialslel7 slo ao a1 a2 aslaslasjas az D Module base address 32 for this example 4 Connect the PC s USB interface to the PCD Note For more detailed information about hardware assembly and wiring please refer to your PCD hardware manual PG5 User Manual Chapter 1 Quick Start 10 12 13 1 6 Saia Burgess Controls AG 1 3 Editing the program 1 3 1 Software Installation Install the Saia PG5 programming tool for Saia PCD on the PC if it has not already been installed following
331. tussssamaninsdowsncahanwieverietabuomesiuideriwivedenisiaedentens 1 6 4 5 Copy Paste Delete connector iui fo ccreievecscausansedesaneasneasinonsabenteanbeavtiesunbannseneccasabeaeanaagnacendameneaanonts 1 6 4 6 Be UM OTIC COON action acts E sce ciccn en emptus se sntuad E E geen pen aenpueutscnne 12 6 4 7 Move connector vertically cccccccssssssssssseseecccccceeceeeeacaeessssseeeeceececeesesseaueeesssseeeeeeeeeeseeeeeaaags 12 6 5 Placing a Fupla function OX seccascccices scccccosccceccesuscscesccvstecesceseccescecvcondvccasexeioesosccecesscccesssbusceccavense 13 6 5 1 PEO Se O a E E EE 13 6 5 2 AUG al BOX 2 ssnotesccsveseenswahurcssiiesnenehvataacdeoecvanvebbecsiawsraleinsbesauwmeinaryouresianessshestadusiaieemnandoeatt 14 6 5 3 Edit streichable TEOK cesesesiverwasntsavecesises cusi inensis pE arein Eend Eoi EN Ene eA EOT EEEE RENES 14 6 5 4 Edit logical InyversiOM eisni a e ea aN e a a a a Rea 14 6 5 5 TDS GSTS on arising COC ra ccccndscavoscdnepaanctanadienacenasnacdgastadeduihatsaahasecenaoaneegoicensdeagacueanendeananse 15 6 5 6 COA TA tac ceca aioe fac dates cds dacs neta seg tataste a sm ada Goncigs E E E 15 6 5 7 MONS OVC ceases saccatpaac enanaeandanauct E E 15 6 6 Links between FBoxes and connectors ccccccscsssssssssssssssssccccccccsssssssssssssssssssssssssscccssssees 16 6 6 1 Link by shtine FE Oooo sree ce ae cee nce E S cata ean onc E EAE E 16 6 6 2 Link with automati TOU ges coratasodsanneixienaanaaneancoantatebwianainu
332. ult of an operation 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 6 Block Call Structure Symbol_Test Ej COBs C ydic SS Ble tle COB O Filter Ctrl T oe COB 1 CL No Filter Ctrl U I OBS Excepti MOB 16 jG Find Ctrl F Cross reference List Ctrl R Expand All Ctrl Collapse All Ctrl Print Ctrl P Properties Alt Enter PG5 User Manual Chapter 5 Symbol Editor 10 12 13 5 28 Saia Burgess Controls AG 5 3 13 Editing Symbol Grid Areas It is possible to select area in symbol grid and perform Edit actions like Copy Paste Cut Paste etc Edit actions can be performed in same symbol grid or different symbol grid This is useful to quickly transfer duplicate symbols definitions from one file to another Few possible areas which can be selected in symbol grid for edit actions include Symbol definitions full row Part of symbol definitions Example Only Symbol Names Several Symbol definitions Part of Grid Example Only Symbol Names and Types Symbol Groups etc To proceed with symbol editing select symbols area and right click to perform action from context menu Go to desired location in same grid or different file and right click to perform action from context menu Example Copy Paste Symbol Definitions Select First Symbol press SHIFT key t
333. ur ASamples PG5 User Manual Chapter How to use flags timers counters regis Chapter 6 Fupla examples ASamples PG5 User Manua Chapter How to program with tupla editor Chapter 7 Program structur ASamplessPG5 User Manua Chapter Howto use PB FB 0B Chapter Grattec Samples PG5 User Manual Chapter Howto use Grattec editor rh mb mr m lambri abami l ek fe ararnlaal DOr E l lhak ha L 1 a by rhe rmb mr Ul siii k LE Ca Tani lI Epe A 2 1 2 Creating a new Project To start a new project use the Project New menu command enter the name of the project in the Project Name field default ProjectX and press OK PG5 User Manual Chapter 2 Project Management 10 12 13 2 4 Saia Burgess Controls SA Project Name Project Projects Directory CU sers Public SBCSPGS_ 274Projects Description Dermostration Project 1 Revision 1 Author Freddy Frinton J Create Device Project Name The name of the new project Projects Directory Name of folder which will contain the project Description Free text description of the project Create Device Automatically creates a single device with the same name as the project 2 1 3 How projects are stored on the PC By default all projects are stored in the following project directories depending on the Windows version XP C Documents and Settings All Users SBC PG5_21 Projects Windows 7 C Users Public SBC PG5_21 Projects If
334. waedanceacencnebacedesuunzaeindaadeladeeneds fi UN RIO AD OD MOUS a E E E E E E T 10 1 8 Save data with command line mode nnssosseseeeoeeeeenessssssssssssesssseerrerrssssssssssssseetreeressssssssssees 8 W2 NVC WOW oat secre cacsccasccocascacseae esa uccntasuastsasescas E 9 10 2 1 Open the Watch Window o iccccccccccccccsssssssseseeeeeeeeeeeeeeeeeeeeea eee eeeeeseeeeeeeeeeeeeeeaaaaaaeeaeaeeseeeeeeeeeeeeaaaas 9 10 2 2 Add data to a Watch Window u cccccccccccccccceceeeeeseeeeseseesesssssssssssssssssssssesssssesesseesesssssesseesseeeeeesees 10 MV CIMT TSA Oe A a a acheter pesca ts pecs E Godse vate cnet an ne aennoe begged eenee ne onanee 11 10 2 4 Online modification of Calais sisaacsscscsmsrecseiarexenesausetqaeneareaamnccnagesadaeapinetandgenseoendasecsnidiexiaesaaaetautes 1 KO Diao Eee eo ner een ere E terror ere tenet errr 1 10 2 6 Watch Window and applications with several GeVICES 2 0 0 ccccccecsssseeeseseeseeeeeeeeeeeeeeeenaaas 12 Wer WTA UC Oaa E E E roan sesscmanatirementnidancn E T 13 10 2 8 L s FUNGUO axe senetgemestsasa nicest atieneanes snionnntonaucinie EAEE EREE EEE ORENA OE EEIE EEEREN EENT SENOS 14 10 2 9 Symbols with a small and big magnitude on the same trend nnnnnnsesssssseseseeeresssssssssssese 15 10 2 10 Trend with several binary SYMbOIS cccccccccccccceeesseseeeseeeecceeceeeeeeeaaaeasesseeeeeeeeeeeeeeeeaaaas 15 103 Onine CNL e211 eeeeeeeen ee eee ee en eee ee re 16 IOSA Adusi the PELD s COCK
335. way switch This is an OR function which is found in the Binary family The second function Off delay defines the 5 minute period during which the lights are on It is found in the Time related family Further information about the 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 box has been selected from the FBox Selector window the left hand mouse button is used to place it in the edit window between symbol columns With certain function boxes 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 User Manual Chapter 1 Quick Start 10 12 13 1 14 Connecting function 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 Drag the FBox back to its original position and release the mouse button Use this method for the other connections Press the Line 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
336. wnloaded First time initialisation data is defined using symbol EQU type address initialisation_value or PG5 User Manual Chapter 2 Project Management 10 12 13 2 20 Saia Burgess Controls SA H Untitled fup se oF esymbolel R 1034 First time initialisation value 324 pe symbole ROO A O First time initialisation data is not initialised every time the program starts but only when a new program starts Other data can be initialised by code in the start up XOB 16 Copy User Program to Flash Once the program has been successfully downloaded into RAM memory it will be saved in backup Flash memory if fitted 2 5 2 Download Options Additional 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 B Downloader Options Daily timer ei Downloader Security Options for Download Prograrn Warn if PCD contains program with different name C Download automatically after successful build Warn if different Station number or IP Address C Download program only if changed MW Warm if a running program will be restarted stopped Go online after successful download C Warr if different Serial Number L Show Program Information before downloading MW Warn if LON Bindings may be lost Hep Set Defaults Cancel Download program only if changed Does not downlo
337. y a COB PB FB SB or XOB Sequential Block SB 0 95 Sequential under programs called by a COB PB or FB SB XOB Step ST 0 5999 Transition TR 0 5999 PG5 User Manual Chapter 7 Program Structures 10 12 13 Saia Burgess Controls SA Contents 8 GRAFTEC PROGRAMMING cccccceeceeeeeeeeceseeeneecnseceeseeneseaseoeeeoees 3 8 1 sequential Blocks SB 0 to 95 ssssssscssaccvcscaccesenccssnscscasessssedecsneseseecucccevenucuasssasaudcveviecedeaudccsnvenesnstseas 4 8 2 Structure of a Sequential Block SB sssosansnanonioinnronndnnnonman 4 8 2 Structure of a Sequential Block SB ssssssssecssssssssceccceccococcssssssseccccceccocccossssssessceccccceccecessssssssssse 5 8 2 1 Rules for connecting Steps and Tramsitions ccccssssssssssssseseeeecceeeceeeeeeeaasaeesseeseeeeeeeeeeeeeeeaaas 5 8 2 2 MSU OS RD e E E ede cain E A assert ade E N E E E ET 6 8 2 3 eien aea E I EE A O IEE AOE AEA 7 8 2 4 Properties of steps and transitions c0 52 icentavscasvivcenixccesveastns dowanssieneiexecseniereceeun siaddanseeeivesieenddentness 8 8 2 5 Typical Graftec sequences srssincnnzectsecabocsasansebenwanncehooeatommsheduonseuutesuisnwnheenatebenoasiaunasensssaneannaetenchi 9 8 3 reatme a Grate a 0 9 x ol Ee eE eE eae E E nar en 10 8 3 1 ean a O a ieee cee eases tenance een ae 10 8 3 2 Add a Fupla or ILTIS sorprenen aenn Eer EEEE E E EEn eaor EE 10 8 3 3 Calling the SB from a COB ccsaneuarevtnecancnetasesecesnannasatetenhsauasdusuat
338. y line between different data types 5 A A i A A eee Wa Ay Address Data Values separator separator per line PG5 User Manual I Chapter 10 Additional tools 10 12 13 Use Desktop Docking 10 8 Saia Burgess Controls AG 10 1 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 lOnnn 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 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 I 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 RO05 1010 PG5 User Manual Chapter 101 Additional tools 10 12 13 Saia Burgess Controls Ltd 10 9 10 2 Watch window The Watch Window i
339. ype of application that certain digital inputs have been dynamized Therefore only the positive edge of a Up signal will increment the counter n It is sometimes necessary to add dynamization to the A input or output of an FBox We then use the Binary Dynamize function Comments Comments can be inserted anywhere on the page foa 1 Click on the Place comment button 2 Position the comment field on the Fupla page then press the left mouse button 3 Write the comment 4 Press the Enter key FBox Help To obtain a full description of any function select the FBox in the Selector window or on the Fupla page and then press the F1 key For rapid identification of an unknown FBox found in a program open the Selector window position the mouse pointer on the unknown FBox and single click on the left mouse button The Se ector window will select the FBox PG5 User Manual Chapter 6 Programming with Fupla 10 12 13 6 6 6 6 1 6 6 2 6 6 3 6 6 4 Saia Burgess Controls AG Links between FBoxes and connectors Link by shifting FBox lt lt 1 Click on the Select Mode button on the toolbar 2 Point onto the FBox then press the left mouse Cmp button 3 Keep pressing the mouse button as you drag the FBox towards a neighbouring FBox Cmp 2 4 The FBoxes are linked as soon as the two FS connections touch 3 Link with automatic routing lt _ Click on the Line Mode button on the toolbar
340. ys off and the XOB is called After executing the XOB the program returns to where it Description Power problem in the main rack PCD6 or Watchdog PCD1 2 Power problem in the extension rack PCD 6 Battery low Parity error on the I O bus PCD6 No response on a module I O PCD4 6 Overload of the system due to multiple events Instruction not valid To many active tasks Graftec To many PB FB levels Watchdog COB To many index registers used Error flag is set Interruption cyclic Interruption cyclic PCD cold start S Bus telegram S Bus telegram S Bus telegram Interrupt input INB1 Interrupt input Interrupt input Interrupt input Interrupt input INB2 Cyclic interrupt Cyclic interrupt Cyclic interrupt Cyclic interrupt RIO connection lost was when the XPB was called XOBs have different priorities to ensure that the most important XOBs are processed first Priority 4 is the highest Only XOBs O and 8 can interrupt the execution of another XOB If an XOB event occurs during the execution of an XOB with a lower priority it will be handled as soon as the current XOB is finished Error diagnostic XOBs and their programming is described in the following chapters XOBs cannot be called directly by the user program PG5 User Manual Chapter 7 Program Structures 10 12 13 Priority 4 POMONNWWWWWWA WW HWW HSH Wr FW HH ND 7 13 7 14 7 4 2 PG5 User Mi Saia Burgess Controls AG Use of XOBs X
Download Pdf Manuals
Related Search
Related Contents
APCON100 RS-232 to Ethernet converter User Manual Lennox Hearth BT8010 User's Manual 取扱説明書 (3.97 MB/PDF) Rexel 2103762 folder CE-MA TEKNA 260 X 6 Samsung SMART CAMERA DV300F راهنمای محصول Bosch 2609256243 Élaboration d`un test explorant les processus sous Jasco 18101 Instruction Manual Copyright © All rights reserved.
Failed to retrieve file