The text of a manual ยท part 21 of 29
1772 Mini PLC-2/05 Processor (Cat. No. 1772-LS, LSP) Programming and Operations Manual, pages 201 to 210
Pages 201 to 210 of 289
The original document is the PDF (1.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 Allen-Bradley 1772-LSP
Page 201
Chapter 17 Report Generation
Table 17.C Industrial Terminal Control Codes Control Code Key Sequence
Function
[CTRL][P] [Column #][;] [Line #][A]
Positions the cursor at the specified column and line number [CTRL][P][A] positions the cursor at the top left corner of the screen.
[CTRL][P][F]
Moves the cursor one space to the right.
[CTRL][P][U]
Moves the cursor one line up in the same column.
[CTRL][P][5][C]
Turns cursor on.
[CTRL][P][4][C]
Turns cursor off.
[CTRL][P][5][G]
Turns on graphics capability.
[CTRL][P][4][G]
Turns off graphics capability.
[CTRL][P][5][P]
Turns Channel C outputs on.
[CTRL][P][4][P]
Turns Channel C outputs off.
[CTRL][I]
Horizontal tab that moves the cursor to the next preset 8th position.
[CTRL][K]
Clears the screen from cursor position to end of screen and moves the cursor to the top left corner of the screen.
Key Sequence
Attribute 1
[CTRL][P][0][T]
Attribute 0 = Normal Intensity
[CTRL][P][1][T]
Attribute 1 = Underline
[CTRL][P][2][T]
Attribute 2 = Intensify
[CTRL][P][3][T]
Attribute 3 = Blinking
[CTRL][P][4][T]
Attribute 4 = Reverse Video
1
Any three attributes can be used at one time using the following key sequence: [CTRL][P][Attribute #][;][Attribute #][;][Attribute #][T]
17-7
Page 202
Chapter 17 Report Generation
Table 17.D ASCII Control Codes Control Code 1
1 2 3
17-8
Display 2
ASCII Mnemonic
Name
CTRL 0
3
NU
NUL
NULL
CTRL A
3
SH
SOH
START OF HEADER
CTRL B
3
SX
STX
START OF TEXT
CTRL C
3
EX
ETX
END OF TEST
CTRL D
ET
EOT
END OF TRANSMISSION
CTRL E
EQ
ENQ
ENQUIRE
CTRL F
AK
ACK
ACKNOWLEDGE
CTRL G
BL
BEL
BELL
CTRL H
BS
BS
BACKSPACE
CTRL I
HT
HT
HORIZONTAL TAB
CTRL J
LF
LF
LINE FEED
CTRL K
VT
VT
VERTICAL TAB
CTRL L
FF
FF
FORM FEED
CTRL M
CR
CR
CARRIAGE RETURN
CTRL N
SO
SO
SHIFT OUT
CTRL O
SI
SI
SHIFT IN
CTRL P
DL
DLE
DATA LINK ESCAPE
CTRL Q
D1
DC1
DEVICE CONTROL 1
CTRL R
D2
DC2
DEVICE CONTROL 2
CRTL S
D3
DC3
DEVICE CONTROL 3
CTRL T
D4
DC4
DEVICE CONTROL 4
CTRL U
NK
NAK
NEGATIVE ACKNOWLEDGE
CTRL V
SY
SYN
SYNCHRONOUS IDLE
CTRL W
EB
ETB
END OF TRANSMISSION BLOCK
CTRL X
CN
CAN
CANCEL
CTRL Y
EM
EM
END OF MEDIUM
CTRL Z
SB
SUB
SUBSTITUTE
ESCAPE
EC
ESC
ESCAPE
CTRL,
FS
FS
FILE SEPARATOR
CTRL-
GS
GS
GROUP SEPARATOR
CTRL.
RS
RS
RECORD SEPARATOR
CTRL/
US
US
UNIT SEPARATOR
DELETE
DT
DEL
DELETE
Some ASCII control codes are generated using non standard keystrokes. Will be displayed when Control Code Display option is set ON in Alphanumeric mode, only. (Not in Report Generation mode). Invalid key in Report Generation mode.
Page 203
Chapter 17 Report Generation
The 1770-T3 industrial terminal screen size is 80 columns across by 24 lines down. An example message using graphic and alphanumeric characters is shown in Figure 17.5. Figure 17.5 Example Graphic/ Alphanumeric Message
Tank
Steam Inlet
Liquid
Inlet
Heater Coil Outlet Steam Return
Temperature Sensor PV SP
10261-I
The control code, [CTRL][P]<Column #>[;]<Line #<[A], should be used for cursor positioning to conserve memory when possible. For example, [CTRL][P][3][9][;][9][A] uses 3 words of memory, storing CRTL P in one byte and remaining characters in one byte each. If the cursor had been at column 0, and line 0, normal space, and line feed commands were used, it would have taken 24 words of memory to accomplish the same thing. Note that the column and line numbers begin at zero rather than one.
Report Generation Commands
The report generation function is entered by pressing [RECORD][DISPLAY] on the standard 1770-KCB alphanumeric keytop overlay. There are six report generation commands used to enter control words and to store, print, report and delete messages and to display an index of existing messages. Table 17.E summarizes these commands.
17-9
Page 204
Chapter 17 Report Generation
Table 17.E Report Generation Commands Command
Key Sequence
Description
Enter report generation function
[RECORD][DISPLAY] or Set baud rate, (Message Code Keys)
Puts industrial terminal into report generation function. Same (entered from a peripheral device).
Message store
[M][S][,](Message Number)[RETURN]
Stores message in processor memory. Use [ESC] to end message.
Message print
[M][P][,](Message Number) [RETURN]
Prints message exactly as entered.
Message report
[M][R][,](Message Number) [RETURN]
Prints message with current data table values or bit status.
Message delete
[M][D][,](Message Number) [RETURN]
Removes message from processor memory.
Message index
[M][I][RETURN]
Lists messages used and the number of words in each message.
Automatic report generation.
[SEARCH][4][0] or [M][R][RETURN]
Allows messages to be printed through program control.
Exit automatic report generation
[ESC] or [CANCEL COMMAND] 1
Terminates automatic report generation.
Exit report
[ESC] or [CANCEL COMMAND] 1
Returns to ladder diagram display. Terminates Report Generation Function.
1
[CANCEL COMMAND] can only be used if the function was entered by a command from a peripheral device.
Message Control Word File - MS, 0 Bits from eight consecutive user-selected words control the 64 additional messages (1770-FD series B and all its subsequent revisions). The eight message control words are determined by establishing a 2 -word message in data table, called message 0. Store Message 0 by using the following keystrokes: [M][S][,] 0 [RETURN]
17-10
Page 205
Chapter 17 Report Generation
A prompt, MESSAGE CONTROL WORDS (Y DIGITS REQUIRED): prints. (Y is the number of digits, 3, 4 or 5, of a word address for the selected data table size.) Enter the beginning word address of the message control word file. The industrial terminal calculates and displays the words in the message control word file. You can locate the message control word file in any unused data table area except processor work areas and input image table areas. If memory write protect is active, place the message control word file in the area of data table which can be changed (010-377). Once you choose the start address, the industrial terminal displays a table (Table 17.B) which shows the message numbers associates with each message control word. Message Store - MS Accessible only in the run/program mode, use this command to enter messages in memory. Access the message store command by pressing [M][S][,]<message number>[RETURN]. Valid message numbers are: 001-006 010-017 110-117 210-217 310-317 410-417 510-517 610-617 710-717 After pressing the key sequence, a READY FOR INPUT message appears. Any subsequent keys pressed then become part of the message. If you try to use a message number that already exists, the terminal displays MESSAGE ALREADY EXISTS. While entering a message, each key pressed, except [SHIFT][CTRL][ESC] or [RUB OUT], generates a code that is stored in one byte of memory. This includes ASCII and graphic characters as well as other keys such as [LINE FEED], [RETURN] or the [SPACE]. The [RUB OUT] key is not stored in memory. The [SHIFT] and [CTRL] keys and the next character in the sequence are stored together in one byte of memory. You can enter messages which when reported give the current value of a data table word or byte. The messages can report the on or off status of a data table bit by using the delimiters shown in Table 17.F.
17-11
Page 206
Chapter 17 Report Generation
Table 17.F Address Delimiters Delimiter Format
Explanation
Message Report Format
*XXX*
Enter 3-digit word address between delimiters.
Displays BCD value at assigned word address.
*XXX1* or *XXX0*
Enter 3-digit word address and a for upper byte or a for lower byte between delimiters.
Displays the octal value at assigned byte address.
*XXXXX*
Enter 5-digit bit address between delimiters.
Displays the ON or OFF status of the assigned bit address.
#XXX#
Enter 3,4 or 5-digit word address between delimiters.
Displays the BCD value at assigned word address.
!XXX!
Enter 3, 4, or 5-digit word address between delimiters.
Displays the 4-digit hex value at address.
&XXX1& &XXX0&
Enter 3, 4, or 5 digit word address and a upper byte or a for lower byte between delimiters.
Displays the octal value at the assigned byte address.
XXXXX
Enter 5, 6, or 7-digit bit address between delimiters.
Displays the ON or OFF status of the assigned bit address.
The desired delimiter is entered before and after the bit, byte, or word address. The delimiter is used to tell the industrial terminal to print the current status or value of the bit, byte, or word at the address. You can enter as many consecutive addresses as needed by sharing the same delimiter, such as *XXX*XXX*XXX*. The asterisk delimiters are used if the data table size is less than 512 words (not exceeding address 777). As an example, to report the on/off condition of a device SR6, during each cycle of machine operation. Delimiters are used to denote the output address 013/05, and the cycle counter accumulative value (stored at 030). The desired message, SR6 is (on or off) in cycle (xxx), is entered into memory with the following keystrokes: SR6 [space]IS[space]*01305*[space]IN[space]CYCLE[space]#030#[ESC] Terminate the message entry with the escape [ESC]key. Until [ESC] is pressed, all key strokes become part of the message. Pressing [ESC]again returns to the display to the ladder diagram. Pressing [CANCEL COMMAND] on the PLC-2 family keytop overlay also terminates message store, and the display returns to the ladder diagram if a peripheral device was used to enter report generation mode.
17-12
Page 207
Chapter 17 Report Generation
Message Print-MP Accessible in any mode, the message print command is used to print the contents of a message to verify it. This command is accessed by pressing [M][P][,]<message number>[RETURN]. Valid message numbers are listed under MESSAGE STORE. In the example, the message print command would give the following
MP, [RETURN]
The screen does not change. SR6 IS *01305* IN CYCLE #030#
The message print command is self-terminating. You can press [ESC] or [CANCEL COMMAND] to return to ladder diagram display. Message Report- MR Accessible in ay mode, the message report command prints a message with the current data table value or bit status that corresponds to an address between the delimiters. This command is accessed by pressing [M][R][,]<message number>[RETURN]. In the example, the message report command gives the following: (e.g. bit 013/05 is on and counter 030 accumulated value is 5)
MP,
The screen does not change.
[RETURN]
SR6 IS ON IN CYCLE 005
The message report command is self-terminating. When you press [ESC] or [CANCEL COMMAND], ladder diagram operation resumes.
17-13
Page 208
Chapter 17 Report Generation
Message Delete- MD Accessible only in rung/program mode, the message delete command is used to delete messages from memory. This command is accessed by pressing [M][D][,] <message number>[RETURN]. The message delete command cannot be terminated before completion. It self terminates after the message has been cleared from memory and a MESSAGE DELETED prompt is printed. you can enter [ESC] or [CANCEL COMMAND] to return to ladder diagram display. Message Index- MI Accessible in any mode, the message index command prints a list of the message numbers used and the amount of memory (in words) used for each message. In addition, the number of unused memory words available is listed. The message index command is accessed by pressing [M][I][RETURN]. This command cannot be terminated before completion. It self-terminates after the list is completed. To return to ladder diagram display,press [ESC] or [CANCEL COMMAND].
Example Programming
Using Latch and Unlatch instructions, you can easily program automatic report generation to handle multiple or simultaneous message requests. Simultaneous requests are handled by a priority system-the lower the message number, the higher the priority. Figure 17.6 shows a sample program that you can use to activate each message. When the event occurs which requests the message, the request bit is latched. After the event has occurred and the message is printed (the done bit comes on), the request bit is unlatched. This technique also ensures the requested message gets printed once per request. Figure 17.6 Example Program to Request a Message. Event
Done Event
Chapter Summary
17-14
Request L L Request
We showed you how to generate messages that contain ASCII, graphic characters, or variable data. The next chapter shows how to use several special programming technique.
Page 209
Chapter
18
Programming Techniques
Chapter Objectives
This chapter describes several programming techniques you can use for: one-shot programming automatic re-start cascading timers temperature conversions program control bottle filling application
One-Shot
The one-shot programming technique sets a bit for one program scan only. There are two types of one-shots: leading edge trailing edge Leading Edge One-Shot A leading edge one-shot sets a bit for one scan when its input condition has made a false-to-true transition. The false-to-true transition represents the leading edge of the input pulse (Figure 18.1). Figure 18.1 Leading Edge One Shot 112
011
253
04 253
14
04 253
00 011 L 14 011 U 14 010
00
00
00 112
18-1
Page 210
Chapter 18 Programming Techniques
When bit 112/04 makes a false-to-true transition, the one-shot bit (bit 253/00) is set on for one scan. The length of time bit 112/04 remains on does not affect the one-shot bit due to the next two rungs. Bit 011/14 is latched when bit 112/04 is set or bit 011/14 is unlatched when 112/04 is reset. During the next scan, either set of conditions prevents bit 253/00 from being set. The one-shot bit is set for another scan only when bit 112/04 makes a true-to-false and then a false-to-true transition. Trailing Edge One-Shot A trailing edge one-shot sets a bit for one scan when its input condition has made a true-to-false transition. The true-to-false transition represents the trailing edge of the input pulse. Figure 18.2 shows programming for a trailing edge one-shot. Figure 18.2 Trailing Edge One-Shot 112 04 112 04 253
011 14
011 L 00 253
00 253
00 011 U 14 010
00
00
When bit 112/04 is set, bit 011/14 is latched. As soon as bit 112/04 makes a true-to-false transition,the one-shot bit (bit 253/00 is set and bit 011/14 is unlatched. Bit 153/00 remains on for only one scan. The input bit 112/04 makes a false-to-true transition then a true-to-false transition to set the one-shot bit for another scan.
Automatic Restart
18-2
You can control start-up automatically when using the EEPROM memory module. Anytime that an EEPROM to CMOS RAM memory transfer occurs, bit 02701 in the data table is set by the processor. The program must reset this bit. This allows the data table to be updated automatically to the indicated machine position.