You are on page 1of 10
<2.4 Overview of POU > 2-33 2.4 Overview of POU POU (Program Organization Unit) is a general name for programs, function blocks and func- tions. Use POU properly according to the following lst Table 24-1 Proper Usage for POU In this section, lists of function blocks and functions are shown and data types of variables for POU are explained 1 Application Logics Written in POU In ProSafe-RS, user can use Function Block Diagram (FBD), Ladder Diagram (LD) or Struc- tured Text (ST) to create a POU for the application logics. FBD can be used to create a program by using the Functions (FU) or Function Blocks (FB), and FBD can also be used to create user defined FU and FB. Some Ladder elements can be used in FED. In LD, programs and user-defined FU and FB are created using Ladder elements, Some FU and FB can also be used concurrently in LD. ‘Structured Text can be used to create FU/FB using the conditional statements and other statements, <2. Overview of POU> 2-34 A IMPORTANT Structured Text cannot be used for creating a program. SEE SEE For more information about designing, generating and testing the application lages, refer to ‘Appendix 1., "Guidelines for Developing Applicaton Logic” on page App.1-1 ® Function Blocks and Functions ‘Some FU/FB provided by the ProSafe-RS system can be used in safety loops (Safety FU/FB) and others cannot be used in safety loops (Interference-free FU/FB). FUIFB that cannot be used in safety loops are designed to be interference-free to avoid interference with the safety functions. © Safety FUFB Safety FU/FB are shown as follows, All of them can be used in FBD, Some FU/FB can also be used in the Ladder Diagram. ‘Table 2.4.2 Safety Functions (FU) ‘sin |- SUB |-, meaning “subtraction” cy DIV /, meaning “division” cy st eatehs Rasaenrasi manna ne MON Ten em RSENS Seema RS AON ISELLR Selects one of two input values (REAL) ct) 3) ISEL_T | Selects one of two input values (TIME) cy (3) MAX Selects the larger of two input values (INTEGER) cy MIN Selects the smaller of two input values (INTEGER) ct) LIMIT Limits the range of the input values to output (INTEGER) ct) Continues on the next page <2. Overview of POU> Table 2.4.2 Safety Functions (FU) (Table continued) 2-35 “er IMUXB | Selects one of eight input values (INTEGER) cy) |MUXBOOL4 | Selects one of four input values (BOOL) cy) |MUXBOOLB- | Selects one of eight input values (BOOL) cy) IMUXREAL4 | Selects one of four input values (REAL) cy) IMUXREAL8 | Selects one of eight input values (REAL) cy [GT |>, meaning “greater than’ cy IGE >=, meaning ‘greater than or equal to” cy) LE meaning ‘less than or equal to" cy) UT ‘<, meaning “less than" cy INE }#, meaning “unequal” cy scan Reese TARRY 18_TO_V Converts |0_BOOL-type input to data value cy) (3) 118_TO_S [Converts |0_BOOL-type input to data status cy 3) IR_TO_W | Converts |0_REAL-type input to data value ct) (3) 1R_TO_S | Converts 1O_REAL-type input to data status ct) 3) ncn tock ert BE | nema ie, ISR ‘Set dominate bistable Yes(*t) RS Reset dominate bistable Yes (*1) F_TRIG Detects a falling edge Yes (*1) [CTU ‘Count up counter Yes (*1) eruption ca ee TON (On-delay timer Yes ("1) TOF Off-delay timer Yes (*1) IREPEATTIMER | Alternates TRUE and FALSE outputs at specified intervals Yes ("1) Continues on the new page <2. Overview of POU> Table 2.4.3 Safety Function Blocks (FB) (Table continued) 2-36 neon ose PE | woman oer JANLGVOTER | 3input analog voter (|O_REAL) (2) 3) [BOOLVOTER | 34nput BOOL voter (IO_BOOL) (72) isas— [gurrimeeeamumeacnwninimaiane fy |B Taal [out aw alam wih sale oven CTC SYS FORGE | Manges rare cafe S¥S-SECURE [Mages Seariy vel a] SYSLSEC_CT [Proc ecary ove a [eae S¥5_NODEST [Detect fut a VO chonnels oe a] SYS OUTST ~ [Detect natut mocle rae V8 ae) [rad 5¥5_OUTSTTS [etc faut nal rosie anes (or amet) [ea [ PTS) SVS. HST [Dec fut nchomes ca |e) SYELGERR [ndcaee compton oro ea [eaear S¥S_SCATincicates the extension of can period 2 ce) S¥S.OVR [Manages overs felon Does fern [eH SYS PSWD | Manges passer ction Bld Yeo [05 SYS: OUTEN [indeses Oxo wed ut Sats ca [ears S¥SIALLSD — | Sul dow Sato ub ca ere) Bo ORCS | Manages forcing of Inter-SCS safety communication data Yes (rt). |(75)(°8) °S-FORCEL | anaes cng of S08 ink Treason ca |eoca [SYS_LTSTS __|Indicates SCS Link Transmission reception status (72) (75) (9) lovR_B Overrides from HIS (BOOL) (72) (74) (*5) jovR_I Overrides from HIS (INTEGER) (72) (74) (*5) lovR_R Overrides from HIS (REAL) (72) (74) (*5) OVEC1@ | Overs fon HS 16_BOOT ra ears) OVAL Overs fon HI (0 REAL ra fears) PASSO |Manouates800L ype dia usha pasono om HS [ra [P03 jnoa_t+ [Osarransloprsion wih teposonareverack(@00u) fray (22) jno8 2+ |atamanvalopatonwiniveepssten anweec@oot) oa) (CT Continues on the nex page <2. Overview of POU> 2-37 Table 2.4.3 Safety Function Blocks (FB) (Table continued) a rant tok Deron taeaer | Romane ogra 1no3_ns | adoveet aa mana! praton (001) ca [ge juon [Anat anal pean ca (eg cas di oh connie or nS a aT = cons _|Reowvenaas ra feo Feces conor oe Br Rar SCS oe comm ay |p CONS! cation (INTEGER) cae Feces a on coma oe Fr SCE wa COTTA oy Ye CONS_R cation (REAL) cay |e prove |Tanntedas ra |es Tanai an prodicer e o rSCS ay : PRODI cation (INTEGER) 2) cs Tanai ai on PoaicT ae arr SCE RY IAT om) Io roo.n _|Tarwniedeh ca feo B_TO_B Converts data values and status to |O_BOOL-type outputs. (2) (7) [R_TO_IR: Converts data values and status to |O_REAL-type outputs. (72) (7) cove | croupng overs tom HIS (8001) a (Rae 2076 | euingoverces fom HS 10_B001) Ee oe ERGY | Reaves Say Tanarinnda aes) ETSND [Sends Safty Yvan dt ea |e) Jann. ruP | rate Alam anna pac [QB |FUP_RST Resets the First-up alarm annunciator yes ("1)[(°5) (°8) St Yor Available o use {2 Though apoteabein Ladder Diagram, since EN and ENO ae attached cannot be appietn Safety ors *3.Therange stator ofthe fsa aes fr SCS Sytom Programe 3.07 OO cr ere rer fom hat of err ve tone. versonsgarer tan R01 the ange Htaton rom 25.0% fo 128.0%, Tare sano rang Fnationn 23.07 and ino versions 4 Bs that can dene ag names for instances By defring tag nares, mapping bockselemers are created, which can be ‘eoessed tom te HS, 18: The operation of Bs an SOS simaton estan alg simulaton tests erect rom the operation in an actual SCS. %6 These tincions ean be Wns in new SCS uatabane eats by SENG NR 03.00 or 7 These neon back canbe ses in now SCS aatabae eas by SENG in 8,31 30 orale, “8 Those incion blocks canbe used new SCS datapae ceatd by SENG i R209.0 or ater 3) Thete tincion block canbe aed in new SCS database creates by SENG in R103. orl, Safety Ladder Elements Safety Ladder Elements are shown as follows. All of them can be used in Ladder Diagram. ‘Some elements can be used in FBD. ‘Table 2.4.4 Safety Ladder Elements Elements Name Description Use in FED Direct Contact Direct Contact Yes Inverted Contact Inverted Contact Yes [Contact with Rising Edge Detection Contact with Rising Edge Detection [Yes [Contact with Faling Edge Detection Contact with Faling Edge Detection [Yes ‘Continues on the nex page <2.4 Overview of POU > 2-38 ‘Table 2.4-4 Safety Ladder Elements (Table continued) Elements Name Description Use in FED Direct Coit Cail Yes Inverted Col Tnvered Col Yes [SET Coil SET Call Yes RESET Col RESET Col Yes [Col with Rising Edge Detection Coil with Rising Edge Detecion| No [Coil with Faling Edge Detection Coil with Faling Edge Detection No Interference-free FU/FB ‘The following table shows the Interference-free FU/FB (No interference in safety functions). All of them can be used in FBD and Ladder Diagram. When they are used in Ladder dia- grams, EN and ENO terminals are added. Table 2.4.5 Interference-free Functions (FU) Function Name Description Remarks: ANY_TO_BOOL _ [Converts te BOOL-ype [ANY_TO_DINT [Converts to INTEGER ‘ype: [ANY_TO_REAL | Converts to REAL‘ype ANY_TO_TIME __|Converls to TIMEAype o POW Performs power calculation POWE [Calculates with a exponential function with base & ie ACOs [Calculates the Are cosine ofa real value ASIN [Calculates the Arosine of a real value ATAN [Calculates the Arc tangent ofa real value [cos [Galoulates the Cosine of real value SiN [Calculates the Sine ofa real value TAN [Calculates the Tangent ofa real value Los [Calculates the Common logarithm ofa real value LOGE [Calculates the Natural logarithm of real valve (2 MOD [Calculates the Modula of an integer value ©. ‘Y,Ganbe vad regerdes the SCS database revison number when SENG aotware release number R.03.0 or ae. ‘Table 24-6 Interference-free Function Blocks (FB) Function block ction b Description Remarks JANN Transits annunciaor message Ga [S¥S_SCAN [Outputs scan time information (2) [SYS_IOMDSP | Outputs the IOM status (2) [SYS_NODEINF [Outputs node status cay e3) SYS_ESGINF | Outputs ESB bus status 2) 3) SYS.NETST [Outputs Contra bus status cay e3y [S¥S_ALROSP [Outputs status of subsystem communication modules cay cay [S¥S_ALARM [Outputs alarm transmission status (2) Gontinues on the nex page <2. Overview of POU> 2-39 Table 2.4.6 Interference-free Function Blocks (FB) Table continues) Funaton block Description Remarks [SyS_TIME [Outputs SCS clock information 2) [SYS_FORGE_SC_|Manages forcing of subsystem communication data eaycay [SYS_STAT_SC__| Indicates output enable operation in subsystem communication cay cay S0E_B BOOL-ype SOER 2) SOE! INTEGERype SOER 2) SOE_R REAL‘ype SOER 2) ECw_B [Seis data of @ BOOL-Type variable fom an erteral davioe en cay ECW [Sets data of a INTEGER-Type variable rom an external device en cay ECW_R [Sets data of a REAL-Type variable from an extemal device en cay AVERAGE [Calculates the average ofa specified duration [LIM_ALRM Hysteresis on a real value for high and low mits SCLB Input from a subsystem (BOOL) enya) Sol Input from a subsystem (INTEGER) en 2) 74) SCLR Input from a subsystem (REAL) enya) [sco_8 [Output to a subsystem (BOOL) ny 2 4) [SCO [Output from a subsystem (INTEGER) enya) 4) SCO_R [Output to a subsystem (REAL) en cz) 4) LTFOs Receives Interference-tree Link Tranemission data ca esy [SYS_SETTIME __|Selsthe ime of SOS ca) “1 Fs that cn don ag names for nstances By defring tag nares, napping bockelements are created, whch can be Secossed on the HIS, 1:2 The operation of FBS an SCS simaton eta fai simulaton ts ferent rm the operation in a aca SC. “5: Those neon oes can be use in new SCS database rote by SENG in 8.02.09 ole, “Those ncn blocs an be use n new St “5 Thete tineion block canbe aed in new SCS dstabae costes by SENG in R1.03.0 orate. “%Thofuncbon block ean be vaedin anew SCS databace sealed by vn 832.10 ene, 1 Data Type of Variables © Basic Data Type Basic data types are shown as follows. ‘Table 2.4-7 Basic Data Types Data Type: Description Remarks [BOOL [Boolean (tue or false) value _[TRUE=T, FALSE=O DINT [Integer value 2147489648 to ¥2147489687 (32 bi) REAL | Real Mloating) value [Complies with the IEEE format (32 bi) a ig vals om ilesecond io 2ansonos080ns we [STRING | Character string [Use this data type only a a level (character-ating constant), Up to 255 characters can be used ‘Some data types can be used as arrays in Structured Text but only as one-dimensional ar- rays. <2. Overview of POU> 2-40 SEE S85. For more information about datatypes handled as one-dimensional arrays, fer to ‘= Data Types Available in ST" on page 2-43, © Structure ‘The types of structure used in ProSafe-RS are shown as follows. A structure is a combination of basic data types, Table 2.4-8 Structures Data Type Description Remarks IO_REAL Used for input variables of analog input 10_BOOL Used for nputfoutput variables of discrete inpu’ [ro soon output [COM_BOOL | Used forinter SCS safely communication containing Boolean data, JCOM_DINT | Used for inter SCS safely communication containing integerype data. JCOM_REAL | Used for inter SOS safely communication containing realtype data, <25 Structured Text > 2-41 2.5 SEE ALSO Structured Text Structured Text (ST) language can be used to create user-defined FU and FB. Aer downloading the FU and FB created by ST to any SCS, the downloaded FU and FB act ‘as POUs just like those written in Function Block Diagram (FBD) or Ladder Diagram (LD) and ‘ean also be called by other POUs. ‘Since various statements such as the conditional statements and iteration statements are pro- vided by ST language, ST language is more versatile than FBD and LD, sometimes the struc- ture of the logic scripts becomes more complicated. In order to use ST language in ProSafe- RS for safety purpose, some restrictions are applied and some types of descriptions are rec- ‘ommended. This section explains the restrictions and the recommendations regarding the ST language of ProSafe-RS. For more information about the programming procedure in ST, refer t: Project Architecture” inthe "Language Reference” of the Workbench User's Guide For more information about the detailed check items of ST Integrity Analyzer, refer to: ‘= Checking Program Source Code and Object Code" in 8.1.3, “Confirmation of Analysis Results by Proj- ‘ect Tree" in Engineering Reference (IM 32G04810-31E) @ Basic Statements ‘The following table lists the ST statements defined in IEC 61131-3 and the ST statements used in ProSafe-RS. Table 2.6-1 Basic Statements Basic ST State TEC 61137-3 Statements Taterference tree | Re- ments a Safety Usage ("2)| ""Usago("2) | marks [Expression _ | =Variable> =, Yes Yes [cal FU :=(=part..),_| Yes Yes 3) F( ..), 3) call FB result» = \ |No Yes 8 result =., F Yes Yes cy [Conditional [CASE Yes Yes FOR Yes Yes ce) eration WHILE No No REPEAT No No xT Yes Yes mm IContel RETURN No Yes Th Ya gel dedorten 3. When usng 81 srogram to callFUor FB le np parameters spect onthe lek gram rem opto betom Shaul be dsgnatad one By ene, No ane sami, FU or FA ca be called recuraely Speci ani the Vlucexgresion nthe argument lt or each of -ep2> ed 0 on) No need to inp parameter Tani statement contains more than one contona expression concatenated, athe canditonal expressions ae always falusted rogaraas of he osu ote fst on. For example te fling loge evon te Bs eau 10, that, he resul of (20) ae, te scand expression (A B>0) is always evaluated and dvison by Zero eos not be declaedn an ST statements, The dictionary abou be used 0 t= beaer <25 Structured Text > 2-42 Nestea oops canna be uted. The tia values, end values ad top value of a FOR lop should abe constants xcept in FOR top, EXIT statement carne oes SEE For more information about syataxes ofthe statements, refer o ‘ST Language" of "Language Reference" in the "Language Reference" of the Workbench User's Gude ™ ST Operators ‘Among the IEC 61131-3 operators, those that can be used in ProSafe-RS ST are shown as follows: ‘The available operators can be used in either safety purpose or interference-free purpose. Table 2.6-2 Operators that can be Used in ST ST Operator Description ‘Reality FAS) Remarks (2 Parenthesized expression [Yes Fancont....__[ Function ealing (4) yes s Exponeriiaion (Rawetea— |ygeay Use POW ang ANY_TO_REAL power IANY TO_DINT : Regan ee eal ore NOT Boolean complement OCS) Use NOTFU Matipcaton Yes 7 Division Nes Moo Modis operation Nor) Use MOD FU ' dation Yes i Subtraction hes === [Comparison operators (Nes E Equality Ineqaliy yes AND 8 Boolean AND Res xOR Boolean exchsive OR Res [oR Boolean OR Res SE Teeter me poston ofan opeaarln i be heigherreceence Ha. sa) The applesble operators canbe used fr ather afty purpose or wtererencete purpose

You might also like