2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩4頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、PLC Configuration and Programming Experience Using ST Language G. Karmakar#1, Ashutosh Kabra, Jose Joseph#2, B. B. Biswas, R. K. Patil Reactor Control Division Bhabha Atomic Research Centre Mumbai – 400085 ( 1gkarma

2、, 2jjoseph}@barc.gov.in Abstract — This paper attempts a journey right from configuring a PLC, writing application program to code generation along with run-time configurations and RTOS abstraction for embedding it i

3、nto PLC hardware using a typical control Logic application. The IEC 61131-3 ST language has been used as vehicle for this tour. Keywords— PLC, ST, POU, Configuration, Resource, Program, FB, Function I. INTRODUCTION P

4、rogrammable Controllers (PLC) are the backbone of most automation projects. PLCs are used for controlling purposes in various industries like power generation, steel production, chemical, petrochemical, Nuclear Power

5、plants etc. A Programmable Controller (PLC) is an industrial computer control system that continuously monitors the state of input devices and makes decisions based upon a program to control the state of output devic

6、es. PLC is an example of a real time system since output results must be produced in response to input conditions within a bounded time. In the past many vendors for PLC systems used their own programming languages w

7、hich were incompatible with others. To enhance reusing of components, compatibility and interoperability among different product, the IEC 61131 standard was introduced to unify the main different approaches. Third par

8、t of IEC 61131 standard specifies the syntax and semantics of a unified suite of programming languages for programmable controllers (PCs). In this paper, we describe a typical control Logic application for demonstrat

9、ion of configuring a PLC, writing application program and code generation along with run- time configurations and RTOS abstraction for embedding it into PLC hardware. The programming language ST (Structured Text) has

10、been used throughout the paper. II. THE STUDY EXAMPLE A. Problem Definition A simple example of controlling a pump P1 and its discharge valve V1 and sending information to any device (say a SCADA station) on demand. U

11、se Cases: Use Case1: Read Inputs Read the following field Inputs a) P1 START Push Button (PB) status (discrete input) b) P1 STOP Push Button (PB) status (discrete input) c) V1 OPEN Push Button (PB) status (discrete i

12、nput) d) V1 CLOSE Push Button (PB) status (discrete input) e) P1 ON/OFF status (discrete input) f) Read P1 discharge pressure (analog input) It is a time driven task: Read every 10 ms Use Case2: Control Interlocks

13、 a) The pump P1 1) Will start if START PB is actuated. Once started P1 will continue running till STOP PB is actuated. 2) Will stop either if the STOP PB is actuated or if the P1 discharge pressure is high. b) The

14、Valve V1 1) Will open either if the V1 OPEN is actuated OR (if the Pump is started AND 3 second has been elapsed). 2) Will close if the V1 CLOSE is actuated provided the pump P1 is not running. Use Case3: Communica

15、tion Slave/Server On Query from any external device it will send Response data. The protocol details are not part of this high level programming. III. THE DOMAIN MODEL OF PLC The domain model of a PLC is depicted in

16、figure 1 below. Figure 1: PLC domain model IV. SOFTWARE MODEL AND BUILDING BLOCKS OF IEC 61131-3 Configuration Application Program Code Generator Framework and RTOS Abstraction Build and Download utilityB. Structure

17、 of the building blocks (POUs) Function, Function Block and Program are the three Program Organization Units (POUs) defined by the IEC 61131-3. A POU contains a declaration part and body. 1) Declaration of variables:

18、IEC 61131-3 standard uses variables to store and process information. Variables can be assigned to a certain I/O address (using the keyword “AT”) and can be battery backed against power failure. Each declaration of

19、a program organization unit contain at its beginning at least one declaration part which specifies the types and the physical or logical location (if needed) of the variables used in the organization unit. 2) Body of

20、 POU: The algorithmic behavior of POU is defined in one of the five languages defined by the standard: FBD (Function Block Diagram), LD (Ladder Diagram), ST (Structured Text), IL (Instruction List) and SFC (Sequential

21、 Function Chart). The ST language has a comprehensive range of constructs for assigning values to variables, calling functions and function blocks, creating expressions, for conditional evaluation of selected stateme

22、nts and for iteration. C. Programs A program is a network of Functions and Function Blocks that are able to exchange data through software connections. A program can be written in any of the defined programming langua

23、ges. A program can also read and write to input/output variables and communicate with other programs. The execution of different parts of a program, for example selected function blocks, may be controlled using tasks.

24、 For our study example, we have following programs 1) PumpP1Control 2) ValveV1Control: The ST program of valve control is given here as it uses on delay timer TON in addition to other ST programming features. PROGR

25、AM ValveV1Control VAR_INPUT V1openC : BOOL; V1closeC :BOOL; P1startC : BOOL; P1status : BOOL; END_VAR VAR Vtimer : TON; END_VAR VAR_TEMP T : BOOL; END_VAR VAR_OUTPUT V1open : BOOL; (*V1 MOV to Open*) V1close

26、 : BOOL; (*V1 MOV to Close*) END_VAR Vtimer(IN:= P1startC, PT := T#3s); T1:= Vtimer.Q; IF (V1openC OR T1) THEN V1open := TRUE; V1close := FALSE; END_IF IF ((V1closeC=TRUE) AND (P1status=FALSE)) THEN V1open := FALSE; V

27、1close :=TRUE; END_IF END_PROGRAM 3) ScanInput D. Function and Function blocks These are the basic building blocks, containing a data-structure and an algorithm. For our study example, 1) The required function bloc

28、ks are ? ReadAnalogIn In any PLC, reading inputs from physical I/O cards is unavoidable. FUNCTION_BLOCK ReadAnalogIn VAR_EXTERNAL CONSTANT NUM_ALOGIN_CARD: UINT; END_VAR VAR_OUTPUT ALOGIN1 : ARRAY [1.. NUM_ALOGIN_CAR

29、D] OF ANALOG_16_DATA; END_VAR; ALOGIN1 := ReadAlogIn (NUM_ALOGIN_CARD ); END_FUNCTION_BLOCK ? ReadDigitalIn ? TON 2) The required functions are ? ReadAlog FUNCTION ReadAlog: ARRAY [1.. NUM_ALOGIN_CARD]

30、 OF ANALOG_16_DATA VAR_INPUT NoAlogCards: UINT; END_VAR (* function body *) END_FUNCTION ? ReadDig E. Global and direct variables A global variable can be declared at program level, resource level or configuration le

31、vel. Global variables provide a means for transferring data and information between programs or between function blocks residing within different programs. Directly represented variables (e.g. %IX1.1, %IW1.1, %QX1.1)

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論