background image

 

<9. Advanced Engineering > 

193

 

 

 

TI 34P02K35-02E  May 31, 2017-00 

 

 

9.1.14 Avoidance of the Error during Execution 

The control task stops when division by zero (integer variables) or access exceeding 

the range of the array occurs. 

It is recommended to insert a code to avoid a careless stop. 

 Avoidance of Division by Zero (integer variables) 

  IF I_COUNT > 0 THEN 

   

V_AVE := V_SUM/I_COUNT; 

  END_IF; 

●  Avoidance of Access Exceeding the Range of the Array 

  IF I_REPORT_M > 0 AND I_REPORT_M < 13 THEN 

   

BUFFER_M [I_REPORT_M] := 10; 

  END_IF 

Summary of Contents for STARDOM FCN-500

Page 1: ...Technical Information STARDOM Engineering Guide FCN 500 FCN RTU TI 34P02K35 02E TI 34P02K35 02E Copyright Apr 2016 YK 1st Edition Apr 28 2016 YK 3rd Edition Jun 6 2018 YK...

Page 2: ...Blank Page...

Page 3: ...elated Documents GS 34P02Q02 01E FCN RTU Autonomous Controller Functions GS 34P02Q03 01E FCN Autonomous Controller Functions FCN 500 IM 34P02P25 01E NPAS POU Overview IM 34P02Q01 01E STARDOM FCN FCJ G...

Page 4: ...sold distributed including delivery via a commercial PC network or the like or registered or recorded on videotapes Trademarks and Licensed Software STARDOM is a trademark Company names and product na...

Page 5: ...2 2 3 Checking FCN 500 FCN RTU Performance 13 2 2 4 Determining FCN 500 FCN RTU Scan Cycle 15 2 2 5 Retentive Variable Retain Data Considerations 18 2 2 6 Time Synchronization 23 3 Hardware Setup 25...

Page 6: ...ct 64 4 8 5 Importance of Source 65 4 9 Control Application Backup 66 5 Function Test Debugging 69 5 1 Equipment Used for Testing 69 5 1 1 Precautions of Testing When Using In house Equipment 70 5 1 2...

Page 7: ...are Wiring 117 6 2 3 Equipment Communicating with FCN 500 FCN RTU 117 7 System Delivery Precautions 118 7 1 System Delivery Checklist 119 7 1 1 System Delivery Prerequisites 119 7 1 2 Forms of Deliver...

Page 8: ...1 5 Inter FCN FCJ Communication Concept 169 9 1 6 How to Create User Data Types 175 9 1 7 Jump Connector and Return Functions 178 9 1 8 Cross References 182 9 1 9 Specifying Retain Data and OPC Prope...

Page 9: ...In system test combine external equipment and control panels with the STARDOM system and perform function test including communication tests Verify along with customer that the designed created appli...

Page 10: ...Blank Page...

Page 11: ...d check that it does not exceed the rated output current of the power supply module Rated Output of Power Supply Module The rated output current of the FCN 500 power supply module is given by System p...

Page 12: ...umption of the control unit as well as that of the extended unit shown in the figure below Calculating current consumption of control unit System power supply Current consumption of NFCP501 modules 12...

Page 13: ...system power supply as well as the current consumption of the analog field power supply of both the control unit and the extension unit are below the rated output of the power supply modules so there...

Page 14: ...communication modules are saved in the on board flash memory of the FCN 500 and FCN RTU Using Resource Configurator whether to automatically load configuration information into a new I O module when...

Page 15: ...Module FCN 500 of IM STARDOM FCN FCJ Guide Section 7 2 Operation using Duplex FCN CPU Modules of TI FCN 500 Technical Guide FCN 500 and FCN RTU Operation When Configured with Duplexed Power Supply Mo...

Page 16: ...transmitted and one receive processing is performed for each duplexed device within each cycle When there are many duplexed devices the CPU load increases proportionally due to increased receive proc...

Page 17: ...g in house development equipment instead of the target equipment upgrade the FCN 500 FCN RTU Logic Designer and all software tools to the latest versions before starting application creation For Syste...

Page 18: ...em revision control may be more tedious with intermixing of FCN 500 and FCN RTU s of different revisions Matching the existing revision In this case the new FCN 500 and FCN RTU will behave the same as...

Page 19: ...mand with the s option to perform a clean upgrade along with initialization of configuration information Checking Service Packs and Service Releases Service releases or service packs may have been pub...

Page 20: ...d on calculated values which should be verified by checking the actual control application size during function test SEE ALSO For details see Section 5 5 2 Checking Application Size For projects using...

Page 21: ...TI document and calculate the CPU load using the following formula NPAS_POU s execution time Control task interval CPU load x 100 For projects not using NPAS POUs The above mentioned TI document does...

Page 22: ...ction Downloading of boot project and source To allow such processing it is recommended that the CPU load be kept at 60 or lower IMPORTANT The CPU load calculation described in this section considers...

Page 23: ...ed in requirement specification If no scan cycle is stated in the requirement specification the engineer is given the responsbility determine the scan cycle from the execution time of the control appl...

Page 24: ...ains unchanged Execution time Scan cycle CPU load 70 ms 100 ms 70 70 ms 200 ms 35 IMPORTANT After changing the scan cycle which is the most fundamental setting affecting FCN 500 and FCN RTU operation...

Page 25: ...me that a CPU error has occurred and perform output fallback SEE ALSO For details see Section 8 1 2 Checking Operation Specification of Analog Digital Output of Chapter 8 Detailed Description About wi...

Page 26: ...if the FCN 500 or FCN RTU is powered off Volatile memory Data including retain data resident in the volatile memory is cleared when the FCN 500 or FCN RTU is powered off The management of retain data...

Page 27: ...ith all initial variable values Some circumstances under which retain data in the non volatile memory will not be restored are listed below If the structure of retain data of the application at startu...

Page 28: ...nge in retain data area If there is no change in the retain data area control is started using retain data values current before offline download even if the control application has been changed 1 2If...

Page 29: ...memory From these two error messages retain data saved on the flash memory was restored by a warm start after an offline download is understood 2 If FCN FCJ is cold started After a cold start the FCN...

Page 30: ...ory we recommend saving retain data to the flash memory regularly as a safeguard against unexpected situations where data retained in memory cannot be used In addition to saving retain data manually s...

Page 31: ...ing as its reported time includes internal timer error of 17 5 to 12 seconds day 1 JEROS Basic Setting File DOUNUS PRP It specifies whether to start the SNTP server function This setting is for only F...

Page 32: ...Blank Page...

Page 33: ...bling disabling of automatic loading of I O modules Duplexed operation Enabling disabling of hardware backup of retain data SEE ALSO Section 2 1 2 Checking Operation Specifications of I O Modules Sect...

Page 34: ...igurator at this stage the system reads a state of no I O module The engineer then downloads this information using Resource Configurator resulting in I O module information being overwritten and info...

Page 35: ...ial Communication Port Settings Section 2 2 6 Time Synchronization In addition to the above configuration items setting system date and time saving retain data read log files of the FCN 500 or FCN RTU...

Page 36: ...TI 34P02K35 02E Jun 6 2018 00 Blank Page...

Page 37: ...signer select a project type from a list of template projects For details on how to create a new project and select a template see Section 4 1 2 Creating a New Project of TI STARDOM FCN 500FCN RTU Pri...

Page 38: ...tion using NPAS POUs select the STARDOM FCX template when creating the project and then add the related NPAS_POU library Which library to add depends on the function to be aded For details on the type...

Page 39: ...tions A task name cannot begin with a number A task name cannot contain two contiguous underscore _ characters A task name cannot end with an underscore _ character Types of Control Tasks There are th...

Page 40: ...n only under specific FCN 500 or FCN RTU conditions Hence this task type is in general not used in control applications except for some special purpose applications IMPORTANT As default and system tas...

Page 41: ...on 2 2 4 Determining FCN FCJ Scan Cycle 2 Priority When running multiple tasks concurrently on an FCN 500 or FCN RTU specify a value ranging from 0 to 31 in decreasing priority for Priority on the tas...

Page 42: ...OM Technical Guide and this complicates desk investigation of control applications Therefore running one task per FCN 500 or FCN RTU is generally recommended When deciding on control application execu...

Page 43: ...aves when its execution time exceeds the specified watchdog time described in Section 4 1 2 Control Task Setup differs whether the The task aborts when the execution time checkbox described above is t...

Page 44: ...n this way a watchdog error will be generated and recorded in the system log file whenever a control task fails to complete execution within the specified duration Moreover as described in Section 2 2...

Page 45: ...of resources that can be defined within one project of Logic Designer is limited to 100 as described in Section 4 1 6 Application Size This system limit though present is actually large enough for mo...

Page 46: ...documentation we elaborate on some of the more important limits here 1 Maximum number of resources in the project tree 100 2 Maximum number of program instances in the resources 1000 This is the maxi...

Page 47: ...00 11 Maximum number of code worksheets in the logical POUs 255 12 Maximum number of types of available functions function blocks in the logical POUs 620 13 Maximum number of available functions funct...

Page 48: ...ed using symbols of contacts and coils as basic components Besides offering a visual representation of data flow like FBD LD allows not only analog signals but also digital signals to be represented v...

Page 49: ...t SFC Sequential Function Chart Step execution languages Continuous execution languages Graphical languages Text based languages TIP As IL is seldom used in practice descriptions about continuous exec...

Page 50: ...uited for an application leads to complicated logic with greater likelihood of bugs Simple Application Creating an application that is easy to understand simplifies logic checking at the time of appli...

Page 51: ...alog output MV 0 sequence logic PV value calculation processing Logic for writing SV value Segmentation pattern B Analog input NPAS_PID Analog output MV 0 sequence logic PV value calculation processin...

Page 52: ...allowed Analog input NPAS_PID Analog output Program POU A MV 0 sequence logic Program POU B Analog input NPAS_PID Analog output MV 0 sequence logic value calculation processing Logic for writing valu...

Page 53: ...apsulating of this part to enable reuse in multiple locations Comparing the logic for setting MV to MAN 0 and the logic for writing SV value both logics write to access parameters and are executed whe...

Page 54: ...application is created using Logic Designer For details on know how relating to control application creation see Chapter 9 Advanced Engineering Section 9 1 General Application Development Know how of...

Page 55: ...rk templates simplifies control logic construction Basic control loop templates published on the Members Only Page of the Yokogawa Partner Portal STARDOM website https partner yokogawa com global memb...

Page 56: ...e efficient application creation and debugging arising from using a registered component in multiple places As such encapsulating logic that is used in only one place in Logic Designer has little meri...

Page 57: ...cution validation is still required but compared to the checking required for copied logic application encapsulation is expected to save debugging effort 3 Better support of specification changes Some...

Page 58: ...R and VAR_EXTERNAL are similar with general programming languages VAR_INPUT External data to be read into a POU Besides global variables data of VAR_INPUT type are read and used for calculation within...

Page 59: ...block named SAMPLE is created under Logical POUs Next create logic within this block 2 Create logics 2 1Open the SAMPLE code worksheet place one AND function block and one EQ function block and then...

Page 60: ...for Usage and DWORD for Data Type the same data type as the system global variable Connect GM to the terminals of AND and EQ 2 4Create a terminal for outputting the calculation result of the POU For...

Page 61: ...018 00 3 2In the figure below the first row shows the basic logic of the POU while the second row shows two logics which make use of the created POU for detecting HH and LL alarms of NPAS_PVI_1 respec...

Page 62: ...s modified the modification will be reflected in all logic using that POU This also means that it is not possible to apply a logic modification to some applications A new POU should be created if prev...

Page 63: ...usage and TIME as its data type Precautions when adding terminals Sequence of variables The sequence of terminals follows the sequence of the variables on the variable worksheet In the above figure th...

Page 64: ...comes true variable V001 becomes true Next the preset duration TM is compared against 0 second using EQ If the preset duration is 0 second logic execution jumps to label TM_SET_0s skipping TON_1 As a...

Page 65: ...odified The display is shown in the figure on the right below 3 2In this state double click user function block SAMPLE in the Edit Wizard 3 3A dialog is displayed Click OK without modifying anything 3...

Page 66: ...rol if ignored Fix all reported compile warnings TIP Performing downloading without first removing all compile errors will cause the following dialog to be displayed Figure Compilation Error Message D...

Page 67: ...another location now becomes ON As variable a connected to input parameter CLK of R_TRIG_1 in the first location remains ON after the first rising edge is detected R_TRIG_1 fails to detect the rising...

Page 68: ...fline Download and Online Download A control application can be downloaded in offline mode or online mode Offline download There are no restrictions associated with offline downloading except that con...

Page 69: ...ask differs in the target setting dialog When the check box Array boundary check on the extended setting is checked the task will stop recommended Please check the array boundary If you do not check t...

Page 70: ...or FCN RTU is powered on and control begins Source A source is a Logic Designer project stored on the flash memory A source is downloaded to the flash memory by Logic Designer The project is compresse...

Page 71: ...three checkboxes should in general be left unticked Clicking the Delete Source on Target button causes existing source loaded in the flash memory to be deleted 3 Download Boot Project Clicking the Dow...

Page 72: ...ine inspection the FCN 500 or FCN RTU was powered off and then powered on The FCN 500 or FCN RTU started control using the boot project which was out dated so control was unfortunately started with an...

Page 73: ...t recovery difficult In such unfortunate situations if the source of the latest project had been downloaded to the flash memory previously restoring the Logic Designer application would be easy While...

Page 74: ...as the Logic Designer project and a file named project name mwt Depending on the size of an application the folder named after the project may be several tens of megabytes making direct backup a litt...

Page 75: ...has been edited Even if you are creating a user library user library please do not compress It will also be compressed libraries such as NPAS POU and APPF POU at the same time When you unzip the compr...

Page 76: ...TI 34P02K35 02E Jun 6 2018 00 Blank Page...

Page 77: ...ng for application bugs Function test may also help discover contradictions in the requirement specification This chapter describes know how and precautions relating to debugging of FCN 500 and FCN RT...

Page 78: ...may be old and the style code of its CPU may differ from that of the in house test equipment A control application can be debugging using in house test equipment whose CPU style code differs from that...

Page 79: ...to check revision of system card Connect to the FCN FCJ Maintenance homepage using a Web browser to display the Top Page as shown in the figure below On the Top Page check the displayed OS Revision a...

Page 80: ...AS_POU license was purchased for the target equipment In this example the FCN 500 of the in house equipment ran normally during function test as an NPAS_POU license was present However when the applic...

Page 81: ...not support the following functions I O function Input to I O cannot be done as no I O module can be installed CPU duplex function Switchover test for a duplexed CPU cannot be done as the FCN FCJ Simu...

Page 82: ...Simulator As described earlier the I O function is not supported by the FCN FCJ Simulator Therefore debugging using FCN FCJ Simulator is in fact debugging with I O in disconnected state Moreover as va...

Page 83: ...unit 1 and expansion units unit 2 to 9 When using the E2 bus set the unit number with the rotary switch of the E2 bus interface module It is unnecessary to change the setting of hardware switch on th...

Page 84: ...rget equipment and starting the FCN RTU while the second kind of hardware setup described below are done at installation before starting the FCN RTU Unit number setting of base module FCN RTU uses the...

Page 85: ...equipment to a PC 4 Define the IP address on the target CPU module 5 Execute the FcxRestore command to migrate the data of the CPU module of the in house equipment saved on the PC earlier to the targe...

Page 86: ...WorkSpace Current USERS STARDOM RETAIN If FCN FCJ Simulator is installed in its default location this folder corresponds to C YOKOGAWA FCN FCJ FCXSim WorkSpace Current USERS STARDOM RETAIN 2 Download...

Page 87: ...ol logic and control loops are tested Combination test Including FCN 500 or FCN RTU application graphics displays and third party equipment sub systems and communication functions Applications using p...

Page 88: ...warnings see Section 4 8 Handling Compile Errors and Warnings TIP If multiple compile warnings on unused local variables and unused FB instances are reported they can be removed from all POU variable...

Page 89: ...and restarting heating User function blocks As the above conditional logics are used in multiple places they are registered as user function blocks START Conditional logic for starting heating END Con...

Page 90: ...peration is correct within the plant environment For instance when a failure occurs consider whether the valve controlling the temperature should be fully open fully closed or maintained at its curren...

Page 91: ...hen the condition is true Depending on how the application is programmed or the requirement specification it is possible that both calculation results may be true at the same time With these considera...

Page 92: ...n debugging control logic in addition to checking normal execution paths it is important to also check exception paths For exception paths consider the following events IOP or OOP event due to equipme...

Page 93: ...nnections or invalid connection related settings 2 Test communication application After completing the checks described in step 1 check the operation of the communication application Connect variables...

Page 94: ...application has bugs To avoid this always complete unit tests of FCN 500 or FCN RTU control applications before starting combination test Unit tests of graphics and displays are completed For the sam...

Page 95: ...g purposes However how the system behaves in the event of a system failure depends on the factory condition and requirement specification Verify that the control operation both after a system failure...

Page 96: ...r supply compare the actual operation of the control application against the IOP and OOP operation and recovery stated in the requirement specification and ensure that requirements are met Details on...

Page 97: ...r If automatic APC is disabled execute APC manually using Resource Configurator Moreover control continues during APC execution but the control cycle is lengthened by 1 to 2 seconds for one cycle Veri...

Page 98: ...on that path is diagnosed as error Therefore wait several seconds before checking the operation After that restore the control network and again check the operation Operation and Recovery after Failur...

Page 99: ...k if it detects a loss of line access with the CPU module beyond 4 seconds Cause output fallback using the following procedure and check the control operation after output fallback is activated 1 Stop...

Page 100: ...tion creation give desk calculated values which must be verified by actual size and performance during function test 5 5 1 Checking CPU Load In Logic Designer display the CPU load and verify that the...

Page 101: ...e CPU load 5 5 2 Checking Application Size Among the application size related limits check retain data size and ADLST size which are the most restrictive and calculate their respective utilization rat...

Page 102: ...igner is installed in its default location this folder corresponds to C YOKOGAWA FCN FCJ LogicDesigner Projects Project name C Configuration R Resource name Click the right mouse button on the ADLST e...

Page 103: ...lication using Logic Designer switch Logic Designer to Debug mode This section describes the know how and precautions when debugging a control application using Logic Designer SEE ALSO For details on...

Page 104: ...tly open in Logic Designer the following dialog is displayed Explanation of warning The above figure shows that the name of the project currently running on the FCN 500 or FCN RTU is TEST1 while the n...

Page 105: ...yed 3 If project on FCN 500 FCN RTU and project in Logic Designer have different contents If the project on the FCN 500 or FCN RTU and the project open in Logic Designer have the same name but what is...

Page 106: ...Designer projects of the same name are found on multiple PCs but it is unknown which one is identical to the control application currently running on the FCN 500 or FCN RTU For this example connect ea...

Page 107: ...ation during each scan cycle In normal state even if you switch Logic Designer to Debug mode and modify status information or I O values these values will be overwritten in the next scan cycle Moreove...

Page 108: ...initial value to TRUE perform an offline download and start the FCN 500 or FCN RTU SEE ALSO For details on how to change the initial value of GS_NFIO_DISCONNF to TRUE and disconnect I O see Section 4...

Page 109: ...l input DI001 Digital output DO001 Modifying Status Information To modify the status information of the device label variable of an analog or digital input modify the Status of the variable To modify...

Page 110: ...us see How to Check Modes Status and Alarm in Logic Designer of Section 9 2 2 How to Detect Mode Status and Alarm of Chapter 9 Advanced Engineering Entering Value to Device Label Variable of Analog In...

Page 111: ...og I O and I O data processing POU of NPAS_POU are described below for reference For analog input PV data measured by field equipment are input to an I O module of FCN 500 or FCN RTU as an electrical...

Page 112: ...50 12 mA 3 V 50 75 16 4000 16384 75 16 mA 4 V 75 100 16 5000 20480 100 20mA 5 V 100 The figure below shows the data flow for the above analog input output The figure shown is for FCN but applies simil...

Page 113: ...a device label variable either write 0 or 1 to the WORD type Value of its device label variable or write FALSE or TRUE to the variable with _BOOL suffix Entering and Checking Value of Device Label Va...

Page 114: ...wiring function provides two input form options for selection closed loop and time series Use these input forms as required by the application to be debugged Closed loop With closed loop software wir...

Page 115: ...tup items of Software Wiring wizard are described below 1 Direct Reverse Action Specify whether the input value is to be varied directly or inversely to the output value according to actual operation...

Page 116: ...l for increasing the analog input value from 0 to 100 or the time interval for decreasing the analog input value from 100 to 0 Instantiating Software Wiring and Starting its Execution Defining a softw...

Page 117: ...cified by the first order lag time constant Similarly a digital signal always responds to a change in an ON OFF signal after a lapse of time specified by the first order lag time constant On the other...

Page 118: ...nalog digital input output values of I O modules During testing with I O equipment connected to an I O module if values cannot be read from or written to the I O equipment the Loop Check Tool can be u...

Page 119: ...e Loop Check Tool displays analog digital input values after A D conversion and analog digital output values before D A conversion Analog output value Engineering volume D A conv Analog input value En...

Page 120: ...this case check the connection between the I O module and the equipment and check the hardware settings Case 2 Loop Check Tool and process I O have the same values which are different from the values...

Page 121: ...ower supply verify that 24 DC is indeed properly supplied Terminal connections Verify that cables are correctly and securely connected to each terminal 2 wire 4 wire system setting of analog input mod...

Page 122: ...erequisites Before starting UAT ensure that the following preconditions are met Function test is completed Verify that operation of all items described in the function specification or requirement spe...

Page 123: ...Test procedures must be thorough Verify that the test procedures for all control applications to be tested during UAT ensure thorough testing of their functions Specifically verify that other than no...

Page 124: ...times has to be performed by in house equipment for various reasons such as early shipment of target equipment for convenience of construction and installation or non availability of production equipm...

Page 125: ...ted I Os and control will stop As selective disconnection of I O is not allowed disconnecting only I Os connected to I O equipment and input simulator devices cannot be done In I O disconnected state...

Page 126: ...last process in STARDOM engineering An unsuccessful system delivery may put to waste all work up to this point or necessitate rebuilding of the system Thus it can be said that system delivery is the...

Page 127: ...up described in Section 7 2 Delivery for New System 2 Delivering CPU module and PC This form of delivery is applicable if the FCN 500 or FCN RTU was delivered early for convenience of construction or...

Page 128: ...CN 500 or FCN RTU from the site PC In this case it is necessary to perform retain data setup and Resource Configurator definitions required for the system modification on the site system Although it i...

Page 129: ...ave Retain Data Save retain data to the on board flash memory For more details see Section 2 2 5 Retentive Variables Retain Data Considerations Record Various FCN 500 FCN RTU Information Keep a record...

Page 130: ...next command execution to avoid overwriting previous backup data Moreover the renamed folder say FCX01BACKUP must be renamed back to BACKUP before data restoration Items saved by FcxBackup command Th...

Page 131: ...control application backup In addition prepare a procedure instruction sheet for checking Resource Configurator configuration information for the site system and redefining the configuration accordin...

Page 132: ...m expansion job involving adding a new FCN 500 or FCN RTU to an existing system pre delivery preparation is the same as described earlier for a new system Moreover delivery engineering for a system ex...

Page 133: ...t included in the system delivery it is necessary to rebuild the system on site To prepare for that perform pre delivery preparation and application backup as described earlier for delivery of a new s...

Page 134: ...a general rule restore the delivered application using the same name 2 Compile and download After restoring the control application compile the project and then download it to the FCN 500 or FCN RTU i...

Page 135: ...n one way should be avoided in the procedure instruction sheet For instance the expression Download to FCN 500 is ambiguous as it does not clarify whether it should be an offline download or an online...

Page 136: ...y these settings on the actual hardware Module Based Settings The following settings apply to the entire I O module Input range of NFAV144 16 point voltage input module Two input span options are avai...

Page 137: ...board on the right face of the I O module The NFAI141 does not require 24V analog field power supply except when used with a 2 wire transmitter NFAI43 and NFAI841 requires 24 V analog field power sup...

Page 138: ...4 seconds system defined and not user configurable SEE ALSO For details on the specification of the output fallback operation see Section C3 2 Operation When an I O Module Malfunctions of IM STARDOM...

Page 139: ...failure is detected NO Ignores any detected CPU failure Output fallback operation channel based setting HOLD Maintains current output state when CPU failure is detected SETV Outputs specified value w...

Page 140: ...input resistance etc depends on the selected input mode Verify which mode is used by the transmitter Input frequency NFAP135 s allowable input frequency range is 0 to 10 kHz Verify that the transmitt...

Page 141: ...ovides 4 channels of Up Pulse Down Pulse pair for pulse width output Although not many points can be installed in one I O module the module supports high resolution pulse width output Check that the s...

Page 142: ...put ON OFF signals at intervals shorter than the scan cycle the minimum output pulse width is the same as the scan cycle i e 100 ms For the same reason the output increment is also the same as the sca...

Page 143: ...rial communication port 2 COM2 to COM4 for FCN RTU only Confirm transmission specification and perform setup Confirm the transmission specification for the serial port Perform the required setup from...

Page 144: ...nfirm the following transmission specification items Connection type for NFLR121 only 2 wire system or 4 wire system Transmission mode Full duplex or half duplex Baud rate bps 300 1200 2400 4800 9600...

Page 145: ...A Next let s consider a multi tasking scenario where Task A and Task B have different execution intervals and Task B is incorrectly specified for updating device labels AI001 and AO001 which are used...

Page 146: ...dating AI001 and AO001 2 Sharing of Global Variables When sharing data between tasks for a multi task control application use global variables but observe the precautions described below for the sende...

Page 147: ...essing Scan cycle Task B Variable P ON Input processing Control calculation processing Scan cycle 2 Scan cycle 3 Logic M Logic N ON Input proces sing Control calculation processing Output proces sing...

Page 148: ...n the first cycle it is received in the next cycle Logic M Logic M Scan cycle 1 Task A Input processing Control calculation processing Output processing Scan cycle Task B OFF Input processing Control...

Page 149: ...ce and competency in specific languages rather than a well defined standard set of programming language selection criteria Nevertheless the same application coded in different languages results in dif...

Page 150: ...tput AO001 NPAS_PID FIC001 Tag comment TEST The earlier figure shows the sample application represented in FBD or LD while the above figure shows the same application represented in ST Comparing these...

Page 151: ...t TProgram The following first figure shows the application represented in FBD or LD while the following second figure shows the same application represented in ST It can be seen that FBD and LD logic...

Page 152: ...b2 b3 V2 V2 6 3 1000000 0 The left picture shows the FBD LD application while the right picture shows the ST application The FBD LD application captures the data flow visually but does not allow intu...

Page 153: ...for understanding The ST application in contrast represents the IF statement as a conditional and a calculation which enables intuitive understanding of the application TIP Return function The Return...

Page 154: ...on the left while the LD application on the right The two applications though represented somewhat differently are essentially the same The lower figure shows the ST application The FBD and LD applica...

Page 155: ...Example are identical in LD and FBD On the other hand as can be seen from 3 Calculation Example Conditional Example 1 and Conditional Example 2 even simple calculations and conditionals are not intuit...

Page 156: ...alculation for which FBD LD are indicated as suitable while ST is indicated as most suitable so programming using any of the three languages should be fine However in this particular example the calcu...

Page 157: ...tory control of analog signals and have similar application representation and coding method Thus there is no need to differentiate strictly between FBD and LD Engineering can begin with either FBD or...

Page 158: ...Is is regulatory control of analog signals for which FBD and LD are well suited while the part for difference calculation comparison against a preset value and mode comparison comprises calculations a...

Page 159: ...n signal B Signal A Create a user function block containing the calculations and conditional decisions coded in ST and combine it with FBD or LD User function block In this way calculation and conditi...

Page 160: ...ves to STEP1 and ACTION1 is executed While the process is at STEP1 and TRANSITION2 becomes true the process moves to STEP2 and ACTION3 is executed Similarly while the process is at STEP2 and TRANSITIO...

Page 161: ...STEP1 becomes true it causes a jump to STEP1 After processing in STEP1 is executed executions of STEP2 and STEP3 are skipped using a Return function and STEP0 is executed in the next control scan In S...

Page 162: ...tion based on an engineer s knowledge experience and competency However the execution of an SFC action block is selected from multiple qualifiers so it is important to understand the the differences a...

Page 163: ...Blank Page...

Page 164: ...ksheet of a logical POU is copied to the code worksheet of another logical POU In this example only the image on the FBD is copied but no corresponding variables are defined on the variable worksheet...

Page 165: ...l variables on the other hand can be used in all logical POU The figure below shows four created logical POUs namely Main LogicA LogicB and LogicC and three code worksheets namely LogicA1 LogicA2 and...

Page 166: ...above example local variable V001 can be defined in LogicA while another local variable with the same name V001 can be defined in LogicB Precautions When Defining Variables Up to 15 000 global variab...

Page 167: ...Group for digital inputs DeviceLabel_Output_A Group for analog outputs DeviceLabel_Output_D Group for digital outputs Precautions about device label variables As the four variable groups described abo...

Page 168: ...or the device label variable of an analog output or digital output _BOOL Suffix Variable of Digital Input Output Device label variables for digital inputs and digital outputs have data types DTag_I_St...

Page 169: ...igital Output For the device label variable of each analog digital output a variable with _RB suffix is automatically created for read back input AO001 and DO001 which are device label variables of an...

Page 170: ...der between Multiple Tasks For a multi tasking control application each task executes independently without synchronization so execution order of the control application between multiple tasks cannot...

Page 171: ...OU Multiple code worksheets created within one logical POU are executed from top to bottom In the figure below three code worksheets namely LogicA1 LogicA2 and LogicA3 are created within logical POU L...

Page 172: ...or make open the code worksheet for which execution order is to displayed and select Layout Execution Order from the menu bar The execution order of POUs within a code worksheet is displayed In the fi...

Page 173: ...om Execution Order within a Set of Line Connected POUs Within a set of POUs connected by lines that is within a circuit unit the execution order of flow branches cannot be specified by a user To contr...

Page 174: ...on Functions function blocks and NPAS POUs are executed from top to bottom according to their reference positions POUs whose reference positions are at the same height are executed from left to right...

Page 175: ...of the right LD so the left LD is executed before the right LD Reference position Reference position To control the execution order for LDs do not place two or more LD circuits on the same row When i...

Page 176: ...before the AND and MOVE logics on the left Reference position IMPORTANT The execution order of a control application is decided by a combination of factors including relative height manner of connecti...

Page 177: ...on In unconfirmed communication no response for Read Write requests is received from the destination FCN FCJ In general use unconfirmed communication for inter FCN FCJ communication unless otherwise r...

Page 178: ...ed only on the source FCN 500 or FCN RTU but not on the destination FCN 500 or FCN RTU In the figure below FCX01 writes data directly into variables of FCX02 and reads data of variables of FCX02 direc...

Page 179: ...responses so any communication error also cannot be detected On the other hand as unconfirmed communication does not require the PDD property to be turned on for destination variables it does not affe...

Page 180: ...d communications as well as much communication data If you specify a virtual IP address in the control network duplexed setting the control network duplex communicaion in inter FCN FCJ is possible The...

Page 181: ...owever using USEND_1V requires 10 send processing while using USEND_10 requires only one send processing thus reducing the total time required for send processing Moreover using array data allows more...

Page 182: ...tablishes a connection from an FCN 500 to itself for inter FCN communication As the two IP addresses are identical so that automatic assignment of client and server roles by comparison of IP addresses...

Page 183: ...Definitions To create user data types first create a worksheet for user data type definitions and then define data types on the created worksheet The procedure is described below 1 Click the right mo...

Page 184: ...ystem defined structure data type Lines 13 to 20 in the figure below Defines a structure data type named TEST_TYPE comprising one BOOL type data named A one REAL type data named B and one DINT type da...

Page 185: ...ariable Data type used for inter FCN FCJ communication Example To send 100 CDATA_REAL type data using inter FCN FCJ communication As described in Section 9 1 5 Inter FCN FCJ Communication Concept cons...

Page 186: ...can be used just like a GOTO statement Connector function In FBD or LD terminals are connected using connection lines When a connection cannot be made directly because the terminals are too far apart...

Page 187: ...llowed but connecting from LogicA to another program is not allowed If a return is created in LogicA1 of LogicA LogicA2 and LogicA3 which are after the Return in the execution order will not be execut...

Page 188: ...UMP01 to label JUMP01 so the ADD which lies in between is not executed Connector Example In the logic below connector CONNECT is connected to the output of the topmost AND and also connected to the AN...

Page 189: ...pmost AND In this example when the topmost AND is true processing of the program ends so both the ADD and the bottommost AND are not executed Language Restrictions The table below shows the language c...

Page 190: ...ets they are used How to Create Cross References To create cross references select Build Build Cross References from the menu bar or press the F12 key How to Use Cross References The figure below show...

Page 191: ...A global variable however even if not used in any code worksheet does not generate any warning during compilation Unused global variables however can be identified using the Filter function of cross r...

Page 192: ...ck on the Cross References window and select Filter On the display dialog tick the Unreferenced Variables and Global checkboxes Click OK Only global variables with no reference in other words unused v...

Page 193: ...the Variable Properties dialog while the right figure below shows the variable worksheet In either case ticking the RETAIN or Retain checkbox or OPC checkbox displayed within blue boxes specifies the...

Page 194: ...all the functions of PAS_GETTIME and more so its use is recommended Programming Precautions Some control applications require performing certain processing at a specific time of the day When programm...

Page 195: ...c on the left so this logic is executed in every scan cycle Variable EN01 is connected to the EN terminal of the AND logic on the right In this case the AND logic is executed and its result is stored...

Page 196: ...Incorrect Connection of EN Terminals The figure below shows an example of an incorrect connection whereby the ENO terminal of the ADD logic is not connected to the EN terminal of the MUL logic In this...

Page 197: ...c If EN01 is TRUE the result of the ADD logic is used by the MUL logic to perform calculation if EN01 becomes FALSE the result just before EN01 becomes FALSE is used by the MUL logic to perform calcul...

Page 198: ...mes require several seconds IMPORTANT After setting GS_RETAIN_SV_SW to TRUE to initiate saving of retain data if a user or an application then sets GS_RETAIN_SV_SW to FALSE before it is automatically...

Page 199: ...econd If saving of retain data takes longer than one second the saving will be aborted by the application leaving incomplete retain data on the flash memory PAS_GETTIME2 TRUE FALSE H M S STRING_TIME S...

Page 200: ...excluded from comparison Moreover a program running on a controller cannot be compared For details read Logic Designer s online help documentation Logic Designer R4 02 01 and later versions allow a p...

Page 201: ...ero integer variables or access exceeding the range of the array occurs It is recommended to insert a code to avoid a careless stop Avoidance of Division by Zero integer variables IF I_COUNT 0 THEN V_...

Page 202: ...ne help documentation What is Control Cycle NPAS POU has four processing functions namely input processing control calculation processing output processing and alarm processing Input processing In NPA...

Page 203: ...mputation is done once per second NPAS POUs with Control Cycle and NPAS POUs without Control Cycle Some NPAS POUs have a control cycle while others have no control cycle The former such as NPAS_PID an...

Page 204: ...r leave its default setting unchanged Table Control Cycle of POU Type POU type Control cycle NPAS_PID NPAS_PI HLD These POUs work by auto setting with access parameter I as default By setting non Zero...

Page 205: ...a control application Details on mode status and alarm can be found in Logic Designer s NPAS POU online help documentation Data Type of Mode Status and Alarm of NPAS POU In an NPAS_POU mode status and...

Page 206: ...tion If only a high limit alarm HI is detected only bit 15 is set to 1 to give bit pattern 00000000000000001000000000000000 When converted to DWORD data type this gives the alarm status value of DWORD...

Page 207: ...e into the input box under Data Conversion of the bit data conversion utility as shown below As the input box accepts DWORD data type the input value for WORD type status of AI001 must be prefixed wit...

Page 208: ...related to alarms A complete list of system global variables accessible in NPAS POUs is given in Appendix A List of Global Variables of IM34P02P25 01E NPAS_POU Overview For instance the high high lim...

Page 209: ...AND calculation before comparison can be applied similarly when checking for a specific condition for the mode or status of NPAS_POU or the status of a device label variable TIP Consider an example wh...

Page 210: ...s well as read back status information from downstream POUs to upstream POUs This section describes the basics of status propagation followed by application programming precautions The figure below sh...

Page 211: ...structure to NPAS_PID In the figure below AI001 information enclosed by a green box is passed from NPAS_AI_ANLG_1 to NPAS_PID_1 Similarly AI002 information enclosed by a red box is passed from NPAS_AI...

Page 212: ...quipment such as a valve In the figure below AO001_RB is connected to the RB_IN terminal of output processing POU NPAS_AO_ANLG_1 and written to variable RB_AO001 of the RB_OUT terminal By connecting v...

Page 213: ...s of operation is closely related to the propagation of upstream status information downstream and the read back of downstream status information upstream When transiting to state 2 NPAS_PID_2 stores...

Page 214: ...of NPAS POU connection TIP The following information is extracted from the NPAS_POU online help documentation CND CoNDitional Indicates the cascade connection is open This status occurs when a downst...

Page 215: ...missing connection between RB_OUT of NPAS_PID_2 and RB_IN and NPAS_PID_1 As the state of NPAS_PID_2 is not passed to NPAS_PID_1 even if the cascade connection is open NPAS_PID_1 continues with PID cal...

Page 216: ...e CData_REAL type data The other bit information such as MINT SINT and CND are not propagated and hence lost To avoid this problem use the correct logic shown in the figure below In this logic CData_R...

Page 217: ...distributed to NPAS_PID_1 and NPAS_PID_2 using link branching In this logic a read back connection is made between NPAS_PID_1 and NPAS_PID_2 but not between NPAS_PID_1 and NPAS_PID_3 To split this ki...

Page 218: ...er Use these counter function blocks for programming simple counting logic NPAS_TM and NPAS_CT POUs which are included in NPAS_POU provide the following additional functions over the timer counter fun...

Page 219: ...reference we describe some representative engineering parameters below As these parameters comprise only a subset remember to check all engineering parameters for each NPAS POU used _SUM_SW Totalizat...

Page 220: ...odify the respective switch to ON _ANS_IN_SW Answerback input action direction switch Default Forward _ANS_CHK_SW Answerback check monitoring action switch Default both sides _ANS_TRK_SW Answerback tr...

Page 221: ...Blank Page...

Page 222: ...ing mode and set IP address Otherwise connect through the known IP address Set the Network Type Single Duplex Separated Perform settings related to the CPU module duplex for E2 Bus SB Bus memory backu...

Page 223: ...1 NFLC121 not used STARDOM FCX_A Physical Hardware Configuration If FCN RTU change a type of PLC TYPE to SH04_40 Compile Project No Yes A Logic Development Environment Setup Add relevant User and Firm...

Page 224: ...names Link the Function Blocks Functions for creating interlocks if applicable Assign appropriate variables to formal parameters of relevant POU this include the Device Labels Data Variables Data str...

Page 225: ...Blank Page...

Page 226: ...8 3rd Edition R4 20 or later Revised Added E2 bus Denotes the release version of the software corresponding to the contents of the technical information in question The revised contents are valid unti...

Reviews: