Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 15 of 35

Series One Programmable Controllers, Series One/One Plus User's Manual: Chapter 5 Programming, pages 131 to 140

Pages 131 to 140 of 300, from Series One Programmable Controllers, Series One/One Plus User's Manual

The original document is the PDF (40 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 IC610CPU105A, GE Fanuc IC610CPU105C, Fanuc IC610CPU105A, GE IC610CPU105A, Fanuc IC610CPU105C and GE IC610CPU105C

Page 131

Programming

S-39

GEL90842 There are several common features that can be used to describe the generalized features of a shift register. There is movement in all examples, normally in one direction. This movement can be defined as a group of fixed increments such as one link, one box position, one operation, or one person. The 2 order 1 of activities (pulling chain in, placing boxes on conveyor, loading parts to be worked on/tested, or adding people to the line) normally remains the same - first in, first out. In case of power failure in the plant or building, it is desirable that the shift register retain its content (part position, people order, boxes on conveyor, etc). However, in many cases it is also desirable that under logic control, the shift register be cleared such as start up on Monday morning. It is much easier for the user to clear a retentive shift register than it is to restore a cleared (volatile) content. t-83-0023

CLOCK

Figure S-24. Typical Shift Register A shift register is a group of storage locations that are synchronized by a timing or clock signal. Figure 5.24 illustrates the operation of a typical shift register with six stages. Each stage can store a single bit which can represent a good or bad part, part or no part, ON or OFF, a one or zero, etc. Data is loaded into the first stage, incremented through the shift register one position per clock pulse, and then out the other end. When the clock signal goes from OFF to ON, each stage shifts one position towards the right. The content of stage 6 is unloaded, stage 5 content moves into stage 6, stage 4 into 5, etc. until stage 1 moves into stage 2. Stage 1 is then cleared, awaiting a load signal from another logic. Within the Series One and Series One Plus, there are 128 retentive storage locations for use with shift registers. Since the Series One family logic functions are easy to use yet provide the user with unmatched flexibility, they allow many separate shift registers to be built of various lengths as long as the total quantity of stages does not exceed 128. Each shift register requires several pieces of information to perform its function. Since it is a serial operation, there must be a definite beginning and a similar ending. At the start of an operation parts are put into the machine or boxes are put on the conveyor. A signal is required to indicate when a part is to be placed into the shift register at stage one. Similarly, there is a signal that indicates when the shift register should increment or move one position. The third and last signal is one to indicate when the shift register (all stages) should be cleared to zero or OFF conditions.

Shift Register References The definition of size for any shift register requires the user to define how many stages are desired, and which references are assigned to this function. The size of the shift register is usually established by the maximum size of the physical device it is controlling. For example, how many links are in the chain, how many boxes can be placed on the conveyor, how many positions has the index machine, or how many people is there space for? The references to stages of the shift registers within the Series One and Series One Plus are to the references 400 through 577. Each stage or position of any shift register should be unique. Storage locations should not be shared between different shift registers. However, multiple logic functions can be programmed to operate upon one shift register to pruduce bidirectional

Page 132

5-40

Programming _ ~ GEK-90842 shift registers, ring counters, First In First Out or Last In First Out stacks. Each shift register reference can control any number of relay contacts, both normally open and normally closed.

Shift Register Operation To illustrate the operation of serial shift registers, Figure 5.25 defines a theoretical problem using a sequential assembly machine. The machine has space for a maximum of 12 parts at any one time. these parts may be cups or other storage locations physically on the machine. The operations are performed while the machine is stationary and then all storage locations (cups) are indexed rapidly one position towards the right. There are three separate operations such as part assembly, welding, clamping, nuts tightened, painting and label placement, etc. Since it would be a waste of material and machine time to operate on locations without a part in place, there is a sensor on the first location to detect when a part is present. To the right is a testing position to determine good parts and bad parts for later separation. Each position of the machine is assigned a number for later reference to the shift register. Notice that positions 3, 5, 7, 10, and 12 ale only holding locations to store parts in progress and are related to the mechanical layout of the machine.

WER 1

OPER 2

OPER 3

TEST

DIVERTER

I t

PART PRESENT f

REJECTS I

Figure 5-25. Example of Shift Register Figure 5.26 illustrates the logic, including shift register, used to solve this problem. The following I/O references are assigned for use in this logic and can be changed as necessary to fit your application. Part Present (Input) Test OK (Input) Reset/AU @put) Operation 1 (Output) Operation 2 (Output) Operation 3 (Output) Test (Output) Diverter (Output) Shift Permissive (Inted)

045 046 047 130 131 132 133 134 214

The timing of each operation allows the machine to index one position each 3 seconds. Thus timer 631 produces an output every 3 seconds as long as the internal permissive is satisfied. This coil (214) is developed elsewhere and indicates all operations have been completed and hardware is out of the way, allowing movement without damaging the machinery. The shift register itself has three parallel rungs each of which can be any combination of series and parallel contacts. The f!i.rst is the input signal. Whenever this is supplying power flow the first stage of the shift register will turn ON and remains ON

Page 133

Programming

5-41

GEK-90842 even if the input changes. The middle rung is the clock signal controlling the shifting of all stages. When this signal goes from OFF (no power flow) to ON (power flow), all stages will shift one position. This shifting is completed before other logic is solved. The bottom rung is the reset signal. Whenever this signal is supplying power flow, (all) stages of the shift register will be turned OFF (cleared). The references used by this shift register and thus the number of stages, must be defined. The reference for the shift register itself is the location of the first stage and immediately following that is the reference for the last stage of that shift register. In our example, input 045 indicates a part present and loads the f&t stage (431) of the shift register. Timer 631 (3 seconds) and coil 214 (permissive to shift) are both required before the shift occurs. Finally, input 047 is used to clear all shift register stages perhaps at the start of machine operation or otherwise under operator control. The shift register is built using references 431 through 444 (total 12 stages). The remaining relay logic merely connects the individual stages of the shift register to their output to exercise proper control. The only exception is the next to the last rung. This rung receives the test signal and resets stage 440 if the test is passed. Thus when the later stage (443) receives the data, it will not activate coil 134 to operate the diverter. Therefore, good parts are passed and the diverter operates only for bad parts, not for empty locations or good parts.

a42154 631 ll.mPARTwIEsw ‘O’rNOPARTOFInrYnPARr

214

631 I

3.0

6TFINQttMFl awl WR w-m

045 1431

STRTam

6R -a-

631 214 631 3.0 045 631 214 047 431 444 432 130 434 131 436 132 440 133 046 340 443 134

046

443

134 it

Figure 5%. Example of Shift Register Logic

Page 134

S-42

Programming GE&90842

Normally many parts will be processed through this machine, continuously moving from input at position 1 to output from position 12. However, for the purpose of illustration, a single part will be examined as it moves down the machine. The part is placed in position 1, energizing input 045 and setting shift register stage 43 1. After three seconds, timer 631 energizes clocking the shift register causing the ON state for this part to move into stage 432. Then timer 631 will reset itself and stage 431 is cleared. When stage 432 is energized so is output 130 causing operation one to be performed on this part. An additional three seconds pass and another clock cycle causes the ON to move to stage 433. Stage 432 will be loaded from 431 which is OFF as long as additional parts are not processed. The above discussion assumes no delays are experienced with the permissive. The above operation repeats itself as the part goes through 434 (operation 2), 435 (rest), 436 (operation 3), 437 (rest), and 440 (test) at three second intervals. While at the test position, output 133 is energized and the test OK input (046) is expected. If the part passes the test, input 046 will reset stage 440 making the remainder of the shift register act as if no part was present and allowing the part to pass straight on through. However, if the test is not passed, the ON stage moves to 441,442, and 443 at three second intervals. At stage 443, it energizes output 134 causing the diverter to push off the defective part into the reject bin. Other logic can be added to improve the capabilities of this program. For example, a timer could measure the delay from the manual cycle (631 energized) and receipt of the permissive (214). It would also alarm if this delay was excessive such as 5 or 8 seconds beyond the normal 3 seconds. Counters could also be installed to record both good and bad parts produced. This data can be readout and reset via the programmer whenever desired, such as each shift, day, week, etc. Forcing I/O References An invaluable tool in the verification of user logic and field wiring is the ability to force I/O references. The operation of the I/O forcing operation is dependent on the I/O reference being forced. Inputs connected to external devices can be forced on or off for one solution of user logic. All other I/O references can be forced on or off indefinitely, but are overridden by user logic. The most frequent user of the I/O forcing function is for verification of field wiring of outputs. Since user logic overrides the I/O forcing function it is recommended that this operation be performed with user program memory cleared. The key sequences for forcing I/O references are as follows: To force a specific I/O reference ON, enter the sequence: SET, SHF, Xxx (I/O) reference), l To force a specific I/O reference OFF, enter the sequence: RST, SHF, Xxx (I/O reference), l

I

WARNING

I

When forcing input points with the set or RST sequence, be aware that the physical state of the input may be overridden. If the forced set or RST occurs in the user logic program before the input is checked in the same I/O scan, the set or RST state will take precedence and would cause an output to be turned on or off at the wrong time.

ENT. ENT.

Page 135

Programming GEK-90842

SECTION 3

Data Operation Instructions for the Series One Plus Programmable Controller Data Operations The Series One Plus PC has, in addition to the basic ladder diagram functions, a group of instructions that include data moves, math functions, logical operations, conversion, and external fault diagnosis. These instructions provide the PC with the capability of performing various data operations. This group of instructions operate on multiple bits rather than one bit at a time. These instructions are not available with a Series One PC. For programs requiring many data operations, it is recommended that the Series One Plus 3.7K PC be used. All of these instructions require that the data to be operated on be loaded (stored) into a 160bit register called the accumulator. The data (numerical value) is processed in the CPU as BCD (Binary Coded Decimal). Each BCD value is represented by 4 corresponding bits in the accumulator. A BCD value can be any of the digits 0 through 9. When the specified operation is performed with the contents of the accumulator, the result of the operation is stored in the accumulator. This data can then be transferred to external outputs or stored internally to be used as needed. Additionally, data can be stored in registers (sixty-four 160bit registers) and those registers referenced when programming the data operations. Each register can contain a 4digit BCD number. Figure 5.27 is a block diagram showing how the data operations are performed. Registers and the accumulator may also contain binary data, however performed until the binary values are converted to BCD.

arithmetic functions cannot be a40848

I

DATA IN, OONSTANTOR oF)ouplwEFmcE

I

\ e

/ ACCUWIATOR

.

I

DATA OUT, TO-

Fiire

I

5-27. Data Operation Block Diagram

The contents of the accumulator do not change until new data is loaded into it with a D STR instruction or a computation takes place and the result is stored in the accumulator.

Page 136

s-44

Programming GEK-90842

Using References for Data Operations When entering an instruction for a data operation, the instruction is first specified, then the data data can be a constant value or a groupreference that contains the data to be used.

The

Entering a Constant Value a40849

Where m is a 4-digit BCD number

When a constant (4digit BCD number) is entered as the data value, the bits of the BCD numbers will be stored in the corresponding position in the accumulator, i.e., the least significant digit in the lower 4 bits of the accumulator, and the most sign&ant digit in the upper 4 bits of the accumulator. a40850 4-DIGIT BCD NUMBER

I

DIGIT 3 I 8~4~2~1~8[4~2~1

4 L /314/211 I I NUMBER

8

I

DIGIT ‘Dlcnl 2

I

I

I I

I 3

1 8141211

9

I

2

ACCUMULATOR

Entering a Group Reference

The I/O points, internal coils, and shift registers are treated as 8-bit registers when programming data operations. The references are then referred to as group references. By selecting the R key before a value, that value is operated on as an 8-bit or 16.bit register. For example, R 1 5 actually references 8 consecutive I/O points, 150 to 157. This is a convenient way ofreading in data to the accumulator from input modules, or writing data from the accumulator to output modules for use as required by the user program. Certain instructions operate on 16 bits, in those cases the data will be read from or written to 16 consecutive references (one 16 circuit module or 2 adjacent 8 circuit modules). The group reference number for the references mentioned above can be either 1 or 2 digits.

Page 137

Programming

5-45

GEK-90842

Data Register References Data registers are referenced as 3digit octal values with a valid range from 400 to 577. Although each individual register actually refers to one 8-bit byte, most registers a operated on as 160bit words (2 consecutive registers). For example, if the key sequence R 4 0 2 is entered, the data operation uses data registers 402 and 403. If a 4digit BCD value (for example 1234) were entered into the register, register 402 would contain the 2 least significant digits (34) and 403 the 2 most significant digits (12). A useful feature of the registers is that they can contain a value to be used as the preset for timers or counters. Unused T/C references 600-673 can be used as data registers. Each T/C reference operates on a 160bit register.

Timer/Counter References The timer/counter references are also 3digit octal values. Each of the timer/counter references represent a 16.bit register. Valid range for the timer/counter references is 600 to 677. These registers contain the accumulated value of a timer or counter. It is important to note that the timer/counter accumulated value is not the same as the accumulator read to or written from when programming any of the data operations.

Example of Specifying a Group Reference An example of specifying a group reference Example: Reference specified is 41.

and how it relates to the accumulator is shown below.

a4085 42 7

1

41 0

017

16 BIT ACCUMULATOR

Contents of 41 and 42 (16 bits) are Mod into the accumulrtor

NOTE Discrete bit 410 will be stored in the first position of the accumulator; discrete bit 427 will be stored in the last position (16) of the accumulator.

Programming the Data Operation Instructions When a program is entered to perform any of the data operations, the first instruction must have at least one conditional contact entered immediately before it. To enter any of the data instructions, the F key must first be selected, then the Function number (F50, F63, F82, etc.) of the instruction. These numbers are assigned intemally, by the CPU’s operating system, to each of the data operation instructions and are listed in Table 5.8. After the F X X number has been entered, the program address will advance 1 step and the second word (data entry) should now be entered. The data entry is selected by entering SHF X X X X, for a constant value, or R X X X for a group lleference.

Page 138

Programming

5-46

Table 54. Data Operation Function Numbers Key Sequence

IllSWUCtion

D.STR D.STRl DeSTR2 DW”R3 DdTR5 DdXJT D.OUTl DdWT2 DdWI-3 DaUT5 CMPR ADDITION SUBTRACTION

F50 F51 F52 F53 F55 F60 F61 F62 F63 F65 F70 F71 F72

Kv seqpe-

InstraCtion hmLTTPLY DIVIDE DeAND DaR SHIFT RIGHT SHlFl?W DECODE ENCODE

F13

BIN(BCDTOBIN) BCD (BIB TO BCD) EXTERNAL FAULT DIAGNOSIS

F85 F86

F74

F75 F76 F80 F81 F82 F83

RO

The remainder of this chapter lists each of the data operation instructions and the information for pIDgr amming them. The format used to describe each of the instructions is as follows:

required

Mnemonic name for each instruction. Function number that must be entered with the programmer (F50, F60, etc.) Illustration of how each instruction operates in relation to the accumulator. List of valid references (where required).

*

Keystrokes required to enter the instruction. Program example to enhance the description of certain instructions. Special Function Coils for Data Operations A group of 6 special purpose internal coils in the Series One Plus ~RZused as indicators of certain conditions that may occur when some of the data operations are performed. When these conditions occur, the applicable coil is tumed on as a “Flag” or indicator that the condition has occurred. These coils can be included in your program as conditional contacts to tum on an output or perform some function to indicate that a Flag is on. These special purpose coils and their meanings are: COIL REFERENCE

FLAG INDICATION

772 773 774 775 776 777

>,GreaterThan =,ECplto <,LessThan Cany or Borrow Ovedow

Page 139

S-47

Programming GEK-90842

D&Ilt

(F50)

DGXR (Data Store) is a 2 word instruction which, when executed, loads the accumulator BCD constant or the contents of a specified 2 byte reference.

with a 4 digit

NOTE When loading I/O References or other data, be sure that it is in BCD Format+ If not it should be converted before using the data for arithmetic fimctions. a40852 REF+l

REF

17

017

115

8

01 0 1

7

I

VIM ooo- 014 070 - 075 016 - 036 W-056 400 - 576 600-677 oow

ACCUMULATOR

Group Refefences

I

I/OPoints l/O Points Intefnd Coils Shift Register Cds Data Registers (80bit) T/C Accumulated Value Registers (1 G-bit)

- 9999

Constant WdiQit BCD)

CONDITIONAL CONTACT r

GROUP REFERENCE 1

+-+

I--{

DSTR

XXX]-+

+---4 t_c

PSTR XXxx]-+

4 DIGIT CONSTANT

BCD VALUE

I l!EKlclclcl

1

.

Page 140

S-48

Programming GE&90842

D6IItl

(F51)

This is a 2 word instruction which, when executed loads the lower 8 bits of the accumulator with the contents of a specifkd 1 byte referenoe. The upper 8 bits (8-15) will be zeros. a40853

15

817

01

ACCUMULATOR

Valid Group References 000-015 070 - 076 016-037 w-057 400 - 577 r;l [-i-j r;l

I/O Points I/O Points Interrud Coils Shift Register Coils Data Registers (80bit)

+--4 I--{

DSTRl

XXX]-+

GROUP r REFERENCE 1 q rrcl

D.STR2 (F52) This is a 2 word insmction which, when executed loads the lower 2 bits of the accumulator with the upper 4 bits of a specified 1 byte reference. a40854 REF

ACCUMULATOR

I OOO-01s 070 - 076 016-037 040-057 400-677 r

GROUP

-I

REFERWCE v&id Group Rehrenoes I/0Points IK)Points momal coi!s shm Ragistel Co& Data Registers(8-m)

I