存儲器主要用于存放系統(tǒng)程序、用戶程序及工作數(shù)據(jù)。存放系統(tǒng)軟件的存儲器稱為系統(tǒng)程序存儲器;存放應(yīng)用軟件的存儲器稱為用戶程序存儲器;存放工作數(shù)據(jù)的存儲器稱為數(shù)據(jù)存儲器。常用的存儲器有RAM、EPROM和EEPROM。RAM是一種可進行讀寫操作的隨機存儲器存放用戶程序,生成用戶數(shù)據(jù)區(qū),存放在RAM中的用戶程序可方便地修改。RAM存儲器是一種高密度、低功耗、價格便宜的半導體存儲器,可用鋰電池做備用電源。掉電時,可有效地保持存儲的信息。EPROM、EEPROM都是只讀存儲器。用這些類型存儲器固化系統(tǒng)管理程序和應(yīng)用程序。根據(jù)PLC梯形圖程序掃描原則,按先左后右先上后下的步序,逐句掃描,執(zhí)行程序。遇到程序跳轉(zhuǎn)指令,根據(jù)跳轉(zhuǎn)條件是否滿足來決定程序的跳轉(zhuǎn)地址。從用戶程序涉及到輸入輸出狀態(tài)時,PLC從輸入映象寄存器中讀出上一階段采入的對應(yīng)輸入端子狀態(tài),從輸出映象寄存器讀出對應(yīng)映象寄存器,根據(jù)用戶程序進行邏輯運算,存入有關(guān)器件寄存器中。對每個器件來說,器件映象寄存器中所寄存的內(nèi)容,會隨著程序執(zhí)行過程而變化。
The memory is mainly used to store system programs, user programs and working data. The memory storing system software is called system program memory; The memory storing application software is called user program memory; The memory storing working data is called data memory. Ram, EPROM and EEPROM are commonly used. Ram is a kind of random access memory that can be read and written to store user programs and generate user data areas. The user programs stored in RAM can be easily modified. RAM memory is a kind of semiconductor memory with high density, low power consumption and low price. Lithium battery can be used as backup power supply. In case of power failure, the stored information can be effectively maintained. EPROM and EEPROM are read-only memories. Use these types of memory to solidify system management programs and applications.
According to the scanning principle of PLC ladder diagram program, scan sentence by sentence and execute the program according to the step sequence from left to right, from top to bottom. When a program jump instruction is encountered, the jump address of the program is determined according to whether the jump conditions are met. When the user program involves the input and output status, PLC reads out the corresponding input terminal status acquired in the previous stage from the input image register, reads out the corresponding image register from the output image register, performs logical operation according to the user program, and stores it in the relevant device registers. For each device, the contents registered in the device image register will change with the execution of the program.