The text of a manual · part 6 of 39
Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual, pages 48 to 57
Pages 48 to 57 of 337
The original document is the PDF (4.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the GE Fanuc IC692CPU211D / IC692MDR541C, Fanuc IC692CPU211D / IC692MDR541C, GE IC692CPU211D / IC692MDR541C and GE Fanuc IC693CPU311X
Page 48
2 For functions that operate on groups of memory addresses (references), a length can be selected for the function. In the following function block, the LEN operand specifies the number of input words to be moved (3 in this example).
(Enable)
MOVE_ WORD
(OK)
???????
I1
???????
Q
LEN 00003
Timer, counter, BITSEQ, and ID functions require an address for the location of three words (registers) that store the current value, preset value, and a control word or “Instance” of the function. The first word of the three consecutive words appears on-screen below the function block, shown in the following figure as “(Address).”
(Enable)
ONDTR 1.00s
(Reset)
R
???????
PV
Q
(Address)
Power Flow In and Out of a Function Power flows into a function block’s Enable input on the upper left through enabling logic. Most function blocks have a power flow output, called the “OK” output. If the function block executes properly, the OK output goes high and passes power flow out. If another device is connected to the OK output, such as the output coil shown below, that device is enabled. However, use of the OK output is optional for many function blocks, since their primary purpose is to obtain the result of the operation (multiplication in the example below) at the Q output.
GFK-0467M
Chapter 2 System Operation
2-29
Page 49
2
Power Flow out of Instruction
Enabling Logic
%Q0001 (Enable)
MUL INT
%R0123
I1
CONST 0002
I2
(OK)
Q
%R0124
Note If using Logicmaster programming software, function blocks cannot be tied directly to the left power rail. You can use %S7, the ALW_ON (always on) bit with a normally open contact tied to the power rail to call a function every sweep. Power flows out of the function block on the upper right. It may be passed to other program logic or to a coil (optional). Function blocks pass power when they execute successfully.
2-30
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 50
2
Section 3: Power-Up and Power-Down Sequences There are two possible power-up sequences in the Series 90-30 PLC; a cold power-up and a warm power-up. The CPU normally uses the cold power-up sequence. However, in a Model 331 or higher PLC system, if the time that elapses between a power-down and the next power-up is less than five seconds, the warm power-up sequence is used.
Power-Up A cold power-up consists of the following sequence of events. A warm power-up sequence skips Step 1. 1.
The CPU will run self-diagnostics. This includes checking a portion of battery-backed RAM to determine whether or not the RAM contains valid data.
2.
If an EPROM, EEPROM, or flash is present and the PROM power-up option in the PROM specifies that the PROM contents should be used, the contents of PROM are copied into RAM memory. If an EPROM, EEPROM, or flash is not present, RAM memory remains the same and is not overwritten with the contents of PROM.
3.
The CPU interrogates each slot in the system to determine which boards are present.
4.
The hardware configuration is compared with software configuration to ensure that they are the same. Any mismatches detected are considered faults and are alarmed. For example, if a module is specified in the software configuration but a different module is present in the actual hardware configuration, this condition is a fault and is alarmed.
5.
If there is no software configuration, the CPU will use its built-in default configuration.
6.
The CPU establishes the communications channel between itself and any intelligent modules.
7.
In the final step of the execution, the mode of the first sweep is determined based on CPU configuration. Figure 2-5 on the next page shows the decision sequence for the CPU when it decides whether to copy from PROM or to power-up in STOP or RUN mode.
Note Steps 2 through 7 above do not apply to the Series 90 Micro PLC. For information about the power-up and power-down sequences for the Micro, refer to the “Power-up and Power-down Sequences” section of Chapter 5, “System Operation,” in the Series 90 Micro PLC User’s Manual (GFK-1065).
GFK-0467M
Chapter 2 System Operation
2-31
Page 51
2
$%
--
-
+
--
#
--
--
$%
Figure 2-5. Power-Up Sequence Prior to the START statement on the Power Up Flowchart, the CPU goes through power up diagnostics which test various peripheral devices used by the CPU and tests RAM. After completing diagnostics, internal data structures and peripheral devices used by the CPU get initialized. The CPU then determines if User Ram has been corrupted. If User Ram is corrupted, the user program and configuration are cleared out and defaulted and all user registers are cleared.
2-32
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 52
2 FLOW CHART TERMS: PRG = User program (PRG SRC = Program Source) CFG = User configuration REGS = User registers (%I, %Q, %M, %G, %R, %AI, and %AQ references). USD = User storage device, either an EPROM, EEPROM, or Flash device. URAM = Non-volatile user ram which contains PRG, CFG, and REGS. HHP = Hand-Help Programmer PU = Power-up CLR = Clear BATT = Battery FLOW CHART EXPANDED TEXT: (1)
Are the <CLR> and <M_T> keys being pressed on the HHP (Hand-Held Programmer) during power-up to clear all URAM?
(2)
Is the USD (user storage device) present and is the information in the USD valid?
(3)
Is the PRG SRC parameter in the USD set to Prom meaning to load the PRG (program logic) and CFG (configuration) from the USD device?
(4)
Is the PRG SRC parameter in the URAM set to Prom meaning to load the PRG and CFG from the USD device?
(5)
Is the REG SRC parameter in the USD set to Prom meaning to load the REGS (registers) from the USD device?
(6 & 7) Are the <LD> and <NOT> keys being pressed on the HHP during power-up to keep the PRG, CFG, and REGS from being loaded from USD? (8)
Copy PRG, CFG, and REGS from the USD to URAM.
(9)
Copy PRG and CFG from the USD to URAM.
(10)
Is the PRG or CFG checksums just loaded from USD invalid?
(11)
Is the URAM corrupted? Could be due to being powered down without a battery attached or a low battery. Could also be due to updating firmware.
(12)
Is the PRG SRC parameter in the URAM set to Prom meaning to load the PRG and CFG from the USD device?
(13)
Is the USD present? This check only applies to CPUs 311-341. The USD is assumed to be present for CPUs 350-364 and 374.
(14)
Are the <NOT> and <RUN> keys being pressed on the HHP during power-up to unconditionally power-up in Stop Mode?
(15)
Is the PWR UP parameter in URAM set to RUN?
(16)
Is the battery low?
(17)
Is the PWR UP parameter in URAM set to STOP?
(18)
Set the power up mode to what ever the power down mode was.
(19)
Clear PRG, CFG, and REGS.
Note The first part of this chart on the previous page does not apply to the Series 90 Micro PLC. For information about the power-up and power-down sequences for the Micro, refer to the “Power-up and Power-down Sequences” section of Chapter 5, “System Operation,” in the Series 90 Micro PLC User’s Manual (GFK-1065).
GFK-0467M
Chapter 2 System Operation
2-33
Page 53
2
Power-Down System power-down occurs when the power supply detects that incoming AC power has dropped for more than one power cycle or the output of the 5-volt power supply has fallen to less than 4.9 volts DC.
2-34
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 54
2
Section 4: Clocks and Timers Clocks and timers provided by the Series 90-30 PLC include an elapsed time clock, a time-of-day clock (Models 331, 340/341, 350-374, and the 28-point Micro), a watchdog timer, and a constant sweep timer. Three types of timer function blocks include an on-delay timer, an off-delay timer, and a retentive on-delay timer (also called a watch clock timer). Four system time-tick contacts cycle on and off for 0.01 second, 0.1 second, 1.0 second, and 1 minute intervals.
Elapsed Time Clock The elapsed time clock uses 100 microsecond “ticks” to track the time elapsed since the CPU powered on. The clock is not retentive across a power failure; it restarts on each power-up. Once per second the hardware interrupts the CPU to enable a seconds count to be recorded. This seconds count rolls over approximately 100 years after the clock begins timing. Because the elapsed time clock provides the base for system software operations and timer function blocks, it can not be reset from the user program or the programmer. However, the application program can read the current value of the elapsed time clock by using Service Request 16.
Time-of-Day Clock The time of day in the 28-point Micro and Series 90-30 PLC Model 331 and higher is maintained by a hardware time-of-day clock. The time-of-day clock maintains seven time functions: •
Year (two digits)
•
Month
•
Day of month
•
Hour
•
Minute
•
Second
•
Day of week
The time-of-day (TOD) clock is battery-backed and maintains its present state across a power failure. However, unless you initialize the clock, the values it contains are meaningless. The application program can read and set the time-of-day clock using Service Request #7. The time-of-day clock can also be read and set from the CPU configuration software and with the Hand-Held Programmer (HHP). However, starting with CPU (350-364) firmware release 8.00, if the CPU Mem. Protect parameter is set to Enabled, the HHP cannot change the TOD clock if the CPU keylock switch is in the ON position. Note that keylock protection features only apply to CPUs 350 - 374 (other CPUs do not have a keylock switch). The time-of-day clock is designed to handle month-to-month and year-to-year transitions. It automatically compensates for leap years until the year 2079.
GFK-0467M
Chapter 2 System Operation
2-35
Page 55
2
Watchdog Timer A watchdog timer in the Series 90-30 PLC is designed to catch catastrophic failure conditions that result in an unusually long sweep. The timer value for the watchdog timer is 200 milliseconds for CPUs 311-341, and 500 milliseconds for CPUs 350 - 374; this is a fixed value that cannot be changed. The watchdog timer always starts from zero at the beginning of each sweep. For 331 and lower model 90-30 CPUs, if the watchdog timeout value is exceeded, the OK LED goes off; the CPU is placed in reset and completely shuts down; and outputs go to their default state. No communication of any form is possible, and all microprocessors on all boards are halted. To recover, power must be cycled on the rack containing the CPU. In the 90-20, Series 90 Micro and 340 and higher 90-30 CPUs, a watchdog timeout causes the CPU to reset, execute its powerup logic, generate a watchdog failure fault, and change its mode to STOP.
Elapsed Power Down Timer The elapsed power down timer is used to determining how long the PLC was powered off. When the PLC is powered off, it resets to 0 and starts to time. When the PLC is powered on, timing stops and the value is retained. Service Request #29, described in chapter 12, can be used to read the value of this timer.
Note This function is available only in the 331 or higher Series 90-30 CPUs.
Constant Sweep Timer The constant sweep timer controls the length of a program sweep when the Series 90-30 PLC operates in CONSTANT SWEEP TIME mode. In this mode of operation, each sweep consumes the same amount of time. The value of the constant sweep timer is set by the programmer and can be any value from 5 to the value of the watchdog timer. Constant Sweep Time default is 100 milliseconds. Typically, for most application programs, the input scan, application program logic scan, and output scan do not require exactly the same amount of execution time in each sweep. If the constant sweep timer expires before the completion of the sweep and the previous sweep was not an oversweep, the PLC places an oversweep alarm in the PLC fault table. At the beginning of the next sweep, the PLC sets the OV_SWP fault contact. The OV_SWP contact is reset when the PLC is not in CONSTANT SWEEP TIME mode or the time of the last sweep did not exceed the constant sweep timer.
2-36
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M
Page 56
2
Time-Tick Contacts The Series 90 PLC provides four time-tick contacts with time durations of 0.01 second, 0.1 second, 1.0 second, and 1 minute. The state of these contacts only changes during the housekeeping portion of the PLC sweep. These contacts provide a pulse having an equal on and off time duration. The contacts are referenced as T_10MS (0.01 second), T_100MS (0.1 second), T_SEC (1.0 second), and T_MIN (1 minute). The following timing diagram represents the on/off time duration of these contacts.
Figure 2-6. Time-Tick Contact Timing Diagram
GFK-0467M
Chapter 2 System Operation
2-37
Page 57
2
Section 5: System Security Security in Series 90-30, Series 90-20, and in the Micro PLCs is designed to prevent unauthorized changes to the contents of a PLC. There are four security levels available in the PLC. The first level, which is always available, provides only the ability to read PLC data; no changes are permitted to the application. The other three levels have access to each level protected by a password. Each higher privilege level permits greater change capabilities than the lower level(s). Privilege levels accumulate in that the privileges granted at one level are a combination of that level, plus all lower levels. The levels and their privileges are: Privilege Level Level 1
Description Any data, except passwords may be read. This includes all data memories (%I, %Q, %AQ, %R, etc.), fault tables, and all program block types (data, value, and constant). No values may be changed in the PLC.
Level 2
This level allows write access to the data memories (%I, %R, etc.).
Level 3
This level allows write access to the application program in STOP mode only.
Level 4
This is the default level for systems that have no passwords set. The default level for a system with passwords is to the highest unprotected level. This level, the highest, allows read and write access to all memories as well as passwords in both RUN and STOP mode. (Configuration data cannot be changed in RUN mode.)
Passwords There is one password for each privilege level in the PLC. (No password can be set for level 1 access.) Each password may be unique; however, the same password can be used for more than one level. Passwords are one to four ASCII characters in length; they can only be entered or changed with the programming software or the Hand-Held Programmer. A privilege level change is in effect only as long as communications between the PLC and the programmer are intact. There does not need to be any activity, but the communications link must not be broken. If there is no communication for 15 minutes, the privilege level returns to the highest unprotected level. Upon connection to the PLC, the programming software requests the protection status of each privilege level from the PLC. The programming software then requests the PLC to move to the highest unprotected level, thereby giving the programming software access to the highest unprotected level without having to request any particular level. When the Hand-Held Programmer is connected to the PLC, the PLC reverts to the highest unprotected level.
2-38
Series 90™-30/20/Micro PLC CPU Instruction Set Reference Manual – May 2002
GFK-0467M