independent of the CPU。

(5) Provide appropriate status information from the independent circuits to the FX2N so that

the program and any operator interfaces have necessary information。

(6)Identify any other safety-related requirements for safe operation of the process。

Specify the Operator Stations

Based on the requirements of the functional specifications, create drawings of the operator stations。 Include the following items:

(1) Overview showing the location of each operator station in relation to the process or machine

(2) Electrical drawings with the associated I/O of the FX2N CPU or expansion module

Create the Configuration Drawings

Based on the requirements of the functional specification, create configuration drawings of the control equipment。 Include the following items:

(1) Overview showing the location of each FX2N in relation to the process or machine

(2) Mechanical layout of the FX2N and expansion I/O modules (including cabinets and other equipment)

(3) Electrical drawings for each FX2N and expansion I/O module (including the device model numbers, communications addresses, and I/O addresses)

Create a List of Symbolic Names (optional)

If you choose to use symbolic names for addressing, create a list of symbolic names for the absolute addresses。 Include not only the physical I/O signals, but also the other elements to be used in your program。

Basic Elements of a Program

A program block is composed of executable code and comments。 The executable code consists of a main program and any subroutines or interrupts routines。 The code is compiled and downloaded to the FX2N; the program comments are not。 You can use the organizational elements (main program, subroutines, and interrupt routines) to structure your control program。

Main Program

The main body of the program contains the instructions that control your application。 The FX2N executes these instructions sequentially, once per scan cycle。

Subroutines

These optional elements of your program are executed only when called: by the main program, by an interrupt routine, or by another subroutine。 Subroutines are useful in cases where you want to execute a function repeatedly。 Rather than rewriting the logic for each place in the main program where you want the function to occur, you can write the logic once in a subroutine and call the subroutine as many times as needed during the main program。 Subroutines provide several benefits:

(1) Using subroutines reduces the overall size of your program。

(2) Using subroutines decreases your scan time because you have moved the code out of the main program。 The FX2N evaluates the code in the main program every scan cycle, whether the code is executed or not, but the FX2N evaluates the code in the subroutine only when you call the subroutine, and does not evaluate the code during the scans in which the subroutine is not called。

(3) Using subroutines creates code that is portable。 You can isolate the code for a function in a subroutine, and then copy that subroutine into other programs with little or no rework。

Interrupt Routines

These optional elements of your program react to specific interrupt events。 You design an interrupt routine to handle a pre-defined interrupt event。 Whenever the specified event occurs, the FX2N executes the interrupt routine。 The interrupt routines are not called by your main program。 You associate an interrupt routine with an interrupt event, and the FX2N executes the instructions in the interrupt routine only on each occurrence of the interrupt event。

Tip

Because it is not possible to predict when the FX2N might generate an interrupt, it is desirable

to limit the number of variables that are used both by the interrupt routine and elsewhere in the program。 Use the local variable table of the interrupt routine to ensure that your interrupt routine uses only the temporary memory and does not overwrite data used somewhere else in your program。 There are a number of programming techniques you can use to ensure that data is correctly shared between your main program and the interrupt routines。 

上一篇:海水淡化的优化设计英文文献和中文翻译
下一篇:高频低功耗直流-直流开关电源英文文献和中文翻译

PLC仿真的虚拟工厂英文文献和中文翻译

模糊PLC系统的伺服机构英文文献和中文翻译

PLC自动化制造系统英文文献和中文翻译

动力分析和控制器设计英文文献和中文翻译

PLC工业机器人英文文献和中文翻译

PLC相关问题英文文献和中文翻译

电气系统的可编程序控制...

ASP.net+sqlserver企业设备管理系统设计与开发

LiMn1-xFexPO4正极材料合成及充放电性能研究

我国风险投资的发展现状问题及对策分析

网络语言“XX体”研究

麦秸秆还田和沼液灌溉对...

互联网教育”变革路径研究进展【7972字】

安康汉江网讯

新課改下小學语文洧效阅...

老年2型糖尿病患者运动疗...

张洁小说《无字》中的女性意识