MicroLogix Packaged Controllers Programmable Controller Basics Memory & Data
We are going to discuss... 1.Memory 2.Data 3.Data Files
MicroLogix 1000 MEMORY PROGRAM FILES System Reserved Main Program Error File HSC File STI File Subroutine Files DATA FILES Output File Input File Status File Bit File Timer File Counter File Control File Integer Files ML 1000 Memory Organization MicroLogix 1000 only
MicroLogix 1000 MEMORY DATA FILES Output File Input File Status File Bit File Timer File Counter File Control File Integer Files ML 1000 Memory Organization MicroLogix 1000 only
Memory & Data MEMORY – Bit = 1or 0 –Nibble = 4 bits –Byte = 2 nibbles – Word(16 bits)2 bytes –Double Word=2 words 32 bits –Long Word=2 Double words 64 bits DATA –Octal0-7 –BCD0-9 –HEX0-F (15) – Integer (signed) to –Unsigned Integer 65,535 ( ) –Floating Point IEEE+/- 3.45x1038 to +/- 1.17x10-38 Underlined text for MicroLogix 1000 only
Integer Data : Signed INTEGER between -32,768 & 32, Word =16 bits : ASCII Data : BCD Data : HEX Data : Data Structure
ASCII TABLE
O0:0/0 File Type File Number Bit Number (0-5,11) 0 Outputs File contains 6 or 12 Outputs Word Word 0 I1:0/0 File Type File Number Input Number (0-9,19) 1 Inputs File contains 10 or 20 Inputs File #0 File #1 Inputs & Outputs Word
Status File File #2 –General purpose file that consists of 32 registers (words). These registers are mixed in “word” and “bit” formats depending on the function they represent. The Status file is primarily used for: Setting system operating features, Displaying system status and faults –Programming aids consisting of: Timebase bits Math overflow flags Index registers Subroutine control
B/16 (RSLogix,APS) OR (HHP) B3:1/ Word 0: Word 1: Word 2: Word 31: Bit File File #3 (32 registers or words)
| I:0.0 0 Timers Timer Operation –The timer times as long as its rung is TRUE. When the timer times up to a specified value, it alerts the rest of the program by setting a bit. When the rung becomes FALSE, the timer stops timing and resets itself to zero.
T4:0 File Type File Number Timer Number (0-39) 4 Timers File contains 40 timers Timers File #4 –40 Timers (MicroLogix 1000 only) –TON, TOF, and RTO Timer On Delay Timer Off Delay Retentive Timer On –.01 and 1 second time base
PresetT4:0.PREHow long the timer should time for. AccumulatedT4:0.ACCHow long the timer has timed for already. DoneT4:0/DNSet to “1” when accumulated value > preset value. Timer TimingT4:0/TTSet to “1” when accumulated value < preset value. EnableT4:0/ENSet to “1” when the rung containing the timer is true. T4:0 File Type File Number Timer Number (0-39) 4 Timers File contains 40 timers Preset Value Accumulated Value ENTTDN Word 0 Word 1 Word 2 Timers
TIMER ON DELAY Timer T4:0 Time Base 1.0 Preset 10 Accum 0 TON Stop Start Motor ]/[]/[ ] [ ( ) I:0/0 I:0/1 M1 O:0/3 ] [ M1 O:0/3 ]/[ T4:0/DN ( EN ) ( DN ) Timer Done Timers The Timer’s “done bit” turns the motor off after a 10 second time delay
| I:0.0 0 Counters Counter Operation –The counter counts (by one) every time its rung goes from FALSE to TRUE. When a specified number of counts has been reached, the counter alerts the rest of the program by setting a bit. The program must reset the counter to start counting from zero again.
C5:0 File Type File Number Counter Number (0-31) 5 Counters File contains 32 counters Counters File #5 –32 Counters (MicroLogix 1000 only) –Up, Down, Up/Down
PresetC5:0.PREHow many the counter should count up to AccumulatedC5:0.ACCHow many the counter has counted already. DoneC5:0/DNSet to “1” when accumulated value > preset value. Count UpC5:0/CUSet to “1” when state of CTU rung are true. Count DownC5:0/CDSet to “1” when state of CTD rung are true. Over/UnderflowC5:0/OV,UNSet to “1” when counter counts past 32,767 or -32,768. C5:0 File Type File Number Counter Number (0-31) 5 Counters File contains 32 counters Preset Value Accumulated Value CUCDDN OV UN 1211 Word 0 Word 1 Word 2 Counters
Count Up CounterC5:0 Preset10 Accum0 CTU Stop Motor ]/[]/[ ] [ ( ) Start ] [ I:0/0 I:0/1 M1 O:0/3 ] [ M1 O:0/3 ]/[ C5:0/DN ( CU ) ( DN ) Counter Done Reset ] [ I:0/4 ( RES ) C5:0 Counters The Counters “done bit” stops the motor from running, after 10 operations.
Control File #6 –Used for higher level application specific commands. FIFO/LIFO Stacks Sequencers Bit Shifts etc.. –Required to allow the PLC to “manage/control” the application instruction. –16 Registers (words) in MicroLogix 1000
LengthR6:0.LENLength of control file PositionR6:0.POSPosition in control file EnableR6:0/ENSet to “1” when state of Control rung are true. Unload EnableR6:0/EUSee FFU and LFU DoneR6:0/DNSee Instruction type Stack EmptyR6:0/EMSet to “1” when stack is empty. Error R6:0/ER Set to “1” when error encountered. Unload R6:0/UL Stores status of bit unloaded (Bit shift only) Inhibit R6:0/IN See Instruction Type Found R6:0/FD See Sequencer compare instruction (SQC) R6:0 File Type File Number Control Number (0-15) 6 Control File contains 16 controls Length Value Position Value Word 0 Word 1 Word 2 EN EU DN EM ER UL IN FD Error Code Control
Integer File #7 –General purpose data registers (words) –Primarily used for: Comparison instructions Math instructions Sequencers FIFO and LIFO stacks –105 Registers (words) in MicroLogix 1000