Ch02_Memory_Allocation.pdf

(181 KB) Pobierz
Microsoft Word - 2-1-2-18_fp.doc
Chapter 2 FBs-PLC Memory Allocation
2.1 FB S -PLC Memory Allocation
SRAM
FB S -PACK
Remark:
1. When the Read Only Register (ROR)
has been configured by the user, the
contents of R5000 R8071 (depends
on the quantity of configuration) will
be loaded from the ROR's during
each time of power up or changing
from STOP to RUN mode.
The user can access the ROR through
the corresponding R5000 R8071.
Write operation of function
instructions are prohibited in this
ROR area of corresponding R5000
R8071. The others of R5000 R8071
that have not been configured for
ROR, they can work as general
purpose registers.
2. There is a dedicated area of program
memory to store the contents of
Read Only Register.
ROR can be configured up to 3072
words in maximum.
X0
X0
X(256)
X255
X255
Y0
Y0
Y(256)
Y255
Y255
T0
T0
T(256)
T255
T255
C0
C0
DISCRETE
STATUS
AREA
(4096)
C(256)
TR(40)
Save status
C255
C255
Load status
S0
S0
S(1000)
S999
M0
S999
M0
M(2002)
M2001
M2001
T(256)
T0
T255
C0
C255
R0
T0
T255
C0
C255
R0
C(256)
R(3840)
R3839
R3839
D0
D0
REGISTER
AREA
(20040W)
Save Register
D(4096)
Load Register
IR , OR
SR(328)
R or ROR
(3072)
D4095
R3840
D4095
R3840
R4167
R5000
R4167
R5000
F0
F0
F(8192)
F8191
F8191
LADDER
PROGRAM
(20KW)
LADDER
PROGRAM
(20KW)
Save Program
LADDER
PROGRAM
AREA
(32KW)
LABEL
(1KW)
Load Program
LABEL
(1KW)
ROR
(3KW)
ROR
(3KW)
DOC
(8KW)
DOC
(8KW)
Memory Buffer in PLC
PP/Winproladder
2-1
689134580.020.png 689134580.021.png
2.2 Digital and Register Allocations
* is default, user configurable
Typee Symbol
Item
Range
Remarks
X
Digital Input (DI)
X0 X255 (256)
Mapping to external digital I/O
Y
Digital Output (DO)
Y0 Y255 (256)
TR
Temporary Relay
TR0 TR39 (40)
For branched points
Internal
Relays
Non-Retentive
M0 M799 (800)*
M1400 M1911 (512)
M0 M1399 configurable as
Non-retentive or Retentive, M1400
M1911 are fixed to Non-retentive
M
Retentive
M800 M1399 (600)*
Special Relay
M1912 M2001 (90)
Step
Relays
Non-Retentive
S0 S499 (500)*
S20 S499 configurable as Retentive
S
Retentive
S500 S999 (500)*
S500 S999 configurable as Non-retentive
T
Timer contact status
T0 T255 (256)
C
Counter contact status
C0 C255 (256)
CV of
Timer
Register
0.01STime Base
T0 T49 (50)*
The quantity of
each time base can be configured
TMR
0.1S Time Base
T50 T199 (150)*
1S Time Base
T200 T255 (56)*
CV of
Counter
Register
Retentive
C0 C139 (140)*
Configurable as Non-retentive
Non-Retentivee C140 C199 (60)*
Configurable as Retentive
CTR
Retentive
C200 C239 (40)*
Configurable as Non-retentive
Non-Retentive
C240 C255 (16)
Configurable as Retentive
DR
or
HR
Data
Registers
Retentive
R0 R2999 (3000)*
D0 D3999 (4000)
R0 R3839 configurable as
Non-retentive or Retentive,
D0 D3999 are fixed to Retentive
Non-Retentive
R3000 R3839 (840)*
IR
Input Registers
R3840 R3903 (64)
Map to external AI Register input
OR
Output Registers
R3904 R3967 (64)
Map to external AO /Register output
System Special Registers
R3968 R4167 (200)
D4000 D4095 (96)
High-Spped Timer Register
R4152 R4154 (3)
HSC
Registers Software(4sets)
Hardware (4sets)
DR4096 DR4110
DR4112 DR4126
Minute Second
R4129
R4128
Calendar
Registers
Day
Hour
R4131
R4130
Year
Month
R4133
R4132
Week
R4134
DR
or
ROR Read Only Registers
Data Registers
R5000 R8071(3072)*
As general purpose registers if ROR not
been configured.
R5000 R8071(0)*
Configurable as ROR for recipe like
application
FR File Registers
F0 F8191(8192)
Need dedicated instruction to access
XR
Index Registers
V,Z (2) P0 P9 (10)
2-2
689134580.022.png 689134580.023.png 689134580.001.png 689134580.002.png 689134580.003.png 689134580.004.png 689134580.005.png 689134580.006.png 689134580.007.png 689134580.008.png 689134580.009.png 689134580.010.png
Remark: During power up or changing operation mode from STOP→RUN, all contents in non-retentive relays or
registers will be cleared to 0; the retentive relays or registers will remain the same state as before.
2.3 Special Relay Details
Relay No.
Function
Description
1. Stop, Prohibited Control
M1912
Emergency Stop control
y If ON, PLC will be stopped (but not enter STOP mode) and all
outputs OFF.
This bit will be cleared when power up or changing operation
mode from STOP RUN.
M1913
Disable external outputs control y All external outputs are turn off but the
status of Y0 Y255 inside the PLC will not be affected.
M2001
Disable/Enable status retentive control y If M2001 is 0 or enabled, the Disable/Enable status of all
contacts will be reset to enable during power up or changing
operation mode from STOP RUN.
y If M2001 is disabled and force ON, the Disable/Enable status &
ON/OFF state of all contacts will remain as before during power
up or changing operation mode from STOP RUN.
While testing, it may disable and force ON M2001 to keep the
ON/OFF state of disabled contacts, but don’t forget to enable
the M2001 after testing.
2. CLEAR Control
M1914
Clear Non-Retentive Relays y Cleared When at 1
M1915
Clear Retentive Relays
y Cleared When at 1
M1916
Clear Non-Retentive Registers y Cleared When at 1
M1917
Clear Retentive Registers
y Cleared When at 1
M1918
Master Control (MC) Selection y If 0, the pulse activated functions within the master control loop
will only be executed once at first 0 1 of master control loop.
If 1, the pulse activated functions within the master control loop
will be executed every time while changing 0 1 of master
control loop.
M1919
Function output control
y If 0, the functional outputs of some function instructions will
memory the output state, even these instructions not been
executed.
If 1, the functional output of some function instructions without
the memory ability.
M1918/M1919 can be set to 0 or 1 at will around the whole program to meet the control requirement s.
2-3
689134580.011.png
Relay No.
Function
Description
3. Pulse Signals
M1920
0.01S Clock pulse
"1"
T(M1920)=0.01S
M1921
0.1S Clock pulse
c
"0"
T(M1921)=0.1S
T
M1922
1S Clock pulse
T is the pulse period
T(M1922)=1S
M1923
60S Clock pulse
T(M1923)=60S
M1924
Initial pulse (first scan) d
"RUN"
"STOP"
M1925
Scan clock pulses e
t
d
t is the scan time
M1926
Reserved
M1924
e
t
t
t
t
M1925
M1927
CTS input status of communication
port 1
y 0 CTS True (ON)
y 1 CTS False (OFF)
y When communication port 1 is used to connect with the printer
or modem, it can use this signal and a timer to detect whether
the printer or the modem is ready.
4. Error Messages
M1928
Reserved
M1929
Reserved
M1930
No expansion unit or exceed the limit
on number of I/O points
y 1: Indicating no expansion unit or exceed the limit on number of
I/O points
M1931
Immediate I/O not in the main unit
range
y 1: Indicating that Immediate I/O not in the main unit range and
the main unit cannot RUN
M1932
Unused
M1933
System stack error
y 1: Indicating that system stack error
M1934
Reserved
M1935
5.Port3 Port4 Controls MC/MN
M1936
Port 3 busy indicator
y 0 Port 3 Busy
y 1 Port 3 Ready
M1937
Port 3 finished indicator
y 1 Port 3 finished all communication transactions
M1938
Port 4 busy indicator
y 0 Port 4 Busy
y 1 Port 4 Ready
M1939
Port 4 finished indicator
y 1 Port 4 finished all communication transactions
2-4
c
689134580.012.png 689134580.013.png 689134580.014.png 689134580.015.png 689134580.016.png
Relay No.
Function
Description
6. HSC0/HSC1 Controls (MC/MN)
M1940
HSC0 software Mask
y 1: Mask
M1941
HSC0 software Clear
y 1: Clear
M1942
HSC0 software Direction y 0: Count-up, 1: Count-down
M1943
Reserved
M1944
Reserved
M1945
Reserved
M1946
HSC1 software Mask
y 1: Mask
M1947
HSC1software Clear
y 1: Clear
M1948
HSC1 software Direction y 0: Count-up, 1: Count-down
M1949
Reserved
M1950
Reserved
M1951
Reserved
7. RTC Controls
M1952
RTC setting
M1953 ± 30 second Adjustment
M1954
RTC installation checking
M1955
Set value error
8. Communication/Timing/Counting Controls
M1956
Selection of Message Fame Interval
Detection Time
y 0 Use system default value as Message Fame Interval Detection
Time for Modbus RTU communication protocol
y 1 Use the high byte value of R4148 as Message Fame Interval
Detection Time for Modbus RTU protocol
M1957
The CV value control after the timer
"Time Up"
y 0: The CV value will continue timing until the upper limit is met
after “Time Up”
y 1: The CV value will stop at the PV value after “Time Up” (User
may control M1957 within the program to control the individual
timer )
M1958
Communication port 2 High Speed
Link mode selection
y 0: Set Port 2 to Normal Speed Link
y 1: Set Port 2 to High Speed CPU Link
M1958 is only effective at slave station
M1959
Modem dialing signal selection y 0: Dialing by TONE when Port 1 connecting with Modem.
y 1: Dialing by PULSE when Port 1 connecting wit
Modem.
M1960
Port 1 busy indicator
y 0 Port 1 Busy
y 1 Port 1 Ready
M1961
Port 1 finished indicator
y 1 Port 1 finished all communication transactions
M1962
Port 2 busy indicator
y 0 Port 2 Busy
y 1 Port 2 Ready
M1963
M1964
Port 2 finished indicator
Modem dialing control
y 1 Port 2 finished all communication transactions
y If Port 1 is connected with Modem,
when signal 0 1 will dial the phone number;
when signal 1 0 will hang-up the phone.
2-5
689134580.017.png 689134580.018.png 689134580.019.png
Zgłoś jeśli naruszono regulamin