I/O Scanner Message Handling Module User’s Manual
Table of Contents Using This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 1.0 Important Information for the Reader . . . . . . . . . . . . . . . . . . . 1.1 Manual's Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Conventions . . . . . . . . . . . . . . . . . . . . . .
ii Table of Contents 4.2.7 Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.8 Form Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.9 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.10 XON/XOFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.11 Communication Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.12 Parity . . . . . . . . . . . . . . . . . .
Table of Contents iii 7.3.4 Backup Line Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.5 Display Line Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.6 Type Out Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.7 Searching for Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.8 Change Text Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.9 Delete Lines . . . . . . . . . . . . . . . . . . . . .
iv Table of Contents 9.5 Using the Conversion Table . . . . . . . . . . . . . . . . . . . . . . . . . . 9.6 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 13 9 15 Using Commands in Report Generation . . . . . . . . . . . . . . . 10 1 10.0 Chapter Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Direct Commands . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents v Execution Time Considerations . . . . . . . . . . . . . . . . . . . . . 12 1 12.0 Chapter Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.2 Active I/O Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.3 Address Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12.4 Symbol Order . . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 1 Using This Manual 1.0 Important Information for the Reader Read this chapter before you use the I/O Scanner-Message Handling Module (cat. no. 1775-S4B). It tells you how to use the Reader this manual properly and efficiently for the tasks you will have to perform. 1.1 Manual's Purpose This manual shows you how to install and operate your I/O scanner-message handling module.
Chapter 1 Using this Manual 1.3 Terminology We refer to certain types of equipment throughout this manual. To make the manual easier for you to read and understand, we avoid repeating full product names where possible. We refer to: I/O Scanner-Message Handling Module (cat. no. 1775-S4B) as the 1775-S4B scanner I/O Scanner-Programmer Interface Module (cat. no. 1775-S4A) as the 1775-S4A scanner Industrial Terminal System (cat. no.
Chapter 1 Using this Manual 1.5 Manual Design This manual is designed with as many as three divisions per page. These divisions include: Headings in the left margin describe the contents of the text Text provides explanations, information, and examples Figures show displays, hardware, and diagrams 1.6 Important Information In this manual, there are three different types of important information: WARNING: Informs you where you could injure yourself if you do not follow the written procedure.
Chapter 2 Introducing the I/O Scanner Message Handling Module 2.0 Chapter Objectives This chapter discusses the functions and features of the 1775-S4B scanner. When you finish reading this chapter, you should: Be able to identify the hardware components of the 1775-S4B scanner Know the basic features and functions of the 1775-S4B scanner 2.1 Looking at the 1775 S4B Scanner's Front Edge Your 1775-S4B scanner fits into the PLC-3 processor chassis.
Chapter 2 I/O Scanner Message Handling Module Figure 2.1 I/O Scanner Message Handling Module 2.1.1 Pass and Fail Indicators 2.1.2 Thumbwheel Switch At the top of the 1775-S4B scanner’s front edge, LED indicators labeled PASS and FAIL keep you informed on the general condition of the 1775-S4B scanner.
Chapter 2 I/O Scanner Message Handling Module 2.1.3 I/O Channel Status Indicators Below the thumbwheel switch are four green LEDs labeled: CH1 CH2 CH3 CH4 Each LED corresponds to one of the four I/O communication channels. Each I/O channel can connect to a bulletin 1771 I/O chassis or a group of chassis providing direct communication with the 1775-S4B scanner.
Chapter 2 I/O Scanner Message Handling Module 2.2 1775 S4B Scanner Features and Functions 2.3 Specifications Now that you are aware of the 1775-S4B scanner’s hardware components, this section summarizes the basic features and functions of the I/O scanner-message handling module: Features Functions Four I/O communication channels To communicate with I/O Adapter Modules (cat. no. 1771 AS) in I/O chassis. You can connect up to 16 I/O chassis to one 1775 S4B scanner I/O channel.
Chapter 2 I/O Scanner Message Handling Module I/O Channel Cable Length 10,000 cable feet (max) Nominal I/O Scan Times 5.5 to 6.5ms for one I/O channel 6ms for two I/O channels 6ms for three I/O channels 6 to 6.5ms for four I/O channels Backplane Current 2.7A from 5V DC circuit 2mA from +15V DC circuit 2mA from -15V DC circuit Environmental Conditions Operational Temperature: 0 to 60° C (32 to 140° F) Storage Temperature: -40 to 85° C (-40 to 185° F) Relative Humidity: 5 to 95% (without condensation) 2.
Chapter 3 Installing Your 1775 S4B Scanner 3.0 Chapter Objectives The 1775-S4B scanner provides the PLC-3 processor with an RS-232-C compatible channel for report generation and a terminal swing arm for I/O scanning. After reading this chapter, you should be able to: Insert a 1775-S4B scanner into a PLC-3 system Connect an RS-232-C device to the channel 5 connector on the 1775-S4B scanner Connect I/O chassis to the terminal swing arm on the 1775-S4B scanner 3.
Chapter 3 Installing Your 1775 S4B Scanner Figure 3.
Chapter 3 Installing Your 1775 S4B Scanner Figure 3.3 Connecting an RS 232 C Device to the 1775 S4B Scanner Using Remote I/O Interconnect Cable User Supplied 25 Pin Male Connector; Cannon Type DB 25 05, Male or equivalent I/O Scanner Message Handling Module (Cat. No. 1775-S4B) User Supplied Connector, as Appropriate Cat. No. 1778-CR Cable or equivalent (50 ft. or 15.2 m maximum) a) Connection Diagram User Supplied Connector I/O ScannerMessage Handling Module (Cat. No.
Chapter 3 Installing Your 1775 S4B Scanner The RS-232-C device should pull pin 20 high to provide its own signal. This jumpering is shown by dashed lines in the wiring diagram of figure 3.3. 3.2.2 Connecting an Industrial Terminal You can use the PLC-3 Industrial Terminal Cable (cat. no. 1775-CAT) for connecting an industrial terminal to the 1775-S4B scanner. Refer to the steps below for proper connection: Step 1—Connect the end labeled INDUSTRIAL TERMINAL END to channel B of the industrial terminal.
Chapter 3 Installing Your 1775 S4B Scanner Figure 3.5 Connecting an Industrial Terminal to the 1775 S4B Scanner Using Remote I/O Interconnect Cable Industrial Terminal System (Cat. No. 1770 T1, T2, T3, or T4) Right Angle Hood I/O Scanner message Handling Module (Cat. No. 1775-S4B) User-Supplied 25 Pin Male Connector, Cannon Type DB 25 05, Male, or equivalent Cat. No. 1778 CR Cable or equivalent (5000 ft.
Chapter 3 Installing Your 1775 S4B Scanner Figure 3.6 I/O Scanner Module I/O Channel Connections Channel No. 3 Blue Channel No. 1 Clear Line 1 Line 1 Shield Shield Line 2 Line 2 Line 1 Line 1 Shield Shield Line 2 Line 2 Channel No. 4 Channel No. 2 Terminator (Cat. No. 177) Twinaxial Cable Cat. No. 1770-CD Figure 3.7 shows the terminal identification label which indicates the proper connections for each I/O adapter module to an I/O channel. This label is on the side of the module.
Chapter 3 Installing Your 1775 S4B Scanner Figure 3.7 I/O Adapter Module (cat. no. 1771 AS) Terminal Identification Label Terminal Identification Cat. No.
Chapter 3 Installing Your 1775 S4B Scanner Figure 3.8 I/O Channel Connections I/O Scanner Module Swing Arm (Car. No. 1775-WA) Terminator (Cat. No.1770-XT) ÍÍ ÍÍ I/O Adapter Module Field Wiring Arm (Cat. No. 1771-WB) I/O Adapter Module Field Wiring Arm (Cat. No. 1771-WB) Twinaxial Cable (Cat. No. 1770-CD) Terminator (Cat. No.
Chapter 4 Operating the LIST Function 4.0 Chapter Objectives The LIST function allows you to select parameters to operate the PLC-3 controller. After reading this chapter, you should be able to: Select operating parameters for the RS-232-C communication channel on the 1775-S4B scanner Select operating parameters for the I/O communication channels on the 1775-S4B scanner 4.
Chapter 4 Operating the LIST Function Reconfig We explain these selections in the following sections.
Chapter 4 Operating the LIST Function Figure 4.
Chapter 4 Operating the LIST Function 4.2.1 TTY (Printer) Defaults The TTY defaults selection configures the RS-232-C communication channel for report generation communication with a printer terminal. Table 4.A lists the parameter selections for TTY defaults. You can use the printer terminal for report generation functions that we discuss in chapters 5 through 11. Table 4.A Channel 5 Default Selections 4.2.
Chapter 4 Operating the LIST Function Some privileges, however, do not deal with PLC-3 memory areas. For example, privilege 65 allows you to edit or delete report generation messages. Table 4.B lists the available privileges. We describe all the privileges below: Privilege 0—System status area. Allows device on channel 5 to write to the system status area of PLC-3 memory. Privilege 1—System pointers area. Allows device on channel 5 to write to the system pointer area of PLC-3 memory.
Chapter 4 Operating the LIST Function Table 4.
Chapter 4 Operating the LIST Function 4.2.4 Echo The echo selection determines whether channel 5 immediately transmits back to the data terminal a copy of each character received from the data terminal. To enable the echo selection, your RS-232-C device must be set for full-duplex. Note the following: If you: Then: Select echo Each keystroke from the data terminal prints out or displays after being echoed by the channel.
Chapter 4 Operating the LIST Function 4.2.7 Tabs The tabs selection determines what the channel transmits for a tab function: If you select: Then: Not expanded The channel sends an HT (tab) character in the message transmission for each HT character in the stored message text. Sending tab characters is only appropriate when transmitting to a data terminal which supports a hardware tab function. Expanded The channel considers a tab position to exist every 8 columns.
Chapter 4 Operating the LIST Function With either selection, a DEL character deletes the previous character entered. The default selection is CRT. 4.2.10 XON/XOFF The XON/XOFF selection determines whether the 1775-S4B scanner responds to XON and XOFF characters received from the data terminal. Some data terminals can receive data transmissions at a faster rate than they can print.
Chapter 4 Operating the LIST Function 4.2.11 Communication Rate The rate at which the 1775-S4B scanner communicates with RS-232-C devices connected on its channel 5 connector is the communication or baud rate. You can select one of the following communication rates: 110 Baud 150 Baud 300 Baud 600 Baud 1200 Baud 1800 Baud 2400 Baud 4800 Baud 9600 Baud 19200 Baud Select the communication rate by typing the number corresponding to the desired rate.
Chapter 4 Operating the LIST Function 4.2.14 Data Bits Per Character The bits/char selections are 7 or 8. The channel transmits the selected number of data bits per character. The channel only accepts characters received with the selected number of data bits per character. The default selection is 8 data bits per character. 4.2.15 ASCII Code Size The ASCII code size selections are 7 or 8. You use this selection when 8 data bits per character is selected.
Chapter 4 Operating the LIST Function 4.3.1 I/O Channel Configuration If you select an I/O channel, you can make the following selections for the corresponding I/O communication channel: Communication rate (baud) I/O scan We explain these selections in the following sections. 4.3.1.1 Communication Rate 4.3.1.2 I/O Chassis Scanning Sequence You can select one of the following communication rates for the corresponding I/O communication channel: If you select: Then: 57.
Chapter 4 Operating the LIST Function of the same 1775-S4B scanner. Refer to the PLC-3 Programmable Controller Installation and Operations Manual (publication 1775-6.7.1, formerly 1775-800) for detailed information on complimentary and duplicate I/O. Rack number 778, is used for internal PLC-3 communication. Do not assign this number to an I/O rack (although you can use the associated addresses for internal storage).
Chapter 4 Operating the LIST Function The 1775-S4B scanner removes the third entry in the rack list and redisplays the rack list. An asterisk (*) appearing before an entry in the rack list indicates that the corresponding I/O chassis or I/O adapter module is faulted. 4.3.2 I/O Rack Group Selection The I/O rack group selection in LIST selects the range of I/O rack numbers that the I/O scanner module can address.
Chapter 4 Operating the LIST Function If this situation occurs you should: Clear the bad fault address in a fault routine Clear the block transfer bit Restart the block transfer in the ladder diagram program Auto config first creates a new I/O chassis list in which each I/O chassis has equal priority with no attributes assigned. Then a reconfiguration executes.
Chapter 4 Operating the LIST Function 4.4 Chapter Summary In this chapter, you read about PLC-3 LIST selections for the 1775-S4B scanner. You can access LIST from the PLC-3 front panel or the RS-232-C channel (channel 5) on the 1775-S4A scanner. Upon selecting the 1775-S4B scanner: Select COMM CHAN to configure channel 5 Select I/O CHAN to configure an I/O channel The remainder of this publication describes the 1775-S4B scanner’s report generation capability.
Chapter 5 Getting Started in Report Generation 5.0 Chapter Objectives The 1775-S4B scanner uses a programming language for report generation to print or display formatted text and data. After reading this chapter, you should be able to: Understand the command line structure Write and execute a simple procedure Execute a procedure using the message instruction in a ladder diagram program 5.
Chapter 5 Getting Started in Report Generation The optional comment tells someone reading the procedure what the command line does. The 1775-S4B scanner accepts the semicolon (;) delimiter as an instruction to ignore the rest of the line. So, you can use the semicolon to document command lines in a procedure.
Chapter 5 Getting Started in Report Generation 5.4 Executing a Simple Procedure If you have the S4B> prompt on your CRT, you can create and execute report generation procedures. The first step is to create the procedure by entering the edit mode. Simply type: Ed @TEST1 [ENTER] ED is the abbreviation for the edit command. The edit command is a report generation command that enables you to create and store a new procedure or edit an existing procedure.
Chapter 5 Getting Started in Report Generation The 1775-S4B scanner’s line pointer or cursor moves to the next line. Now exit the insert mode by pressing [ENTER]. The 1775-S4B scanner returns the * signifying the edit mode. Then press E followed by [ENTER] to exit the edit mode. The 1775-S4B scanner returns the S4B> prompt. You can now execute your procedure. Just type: S4B> @TEST1 If you followed the instructions, the CRT displays the lines: PRINTING ON THE SCREEN S4B> Figure 5.
Chapter 5 Getting Started in Report Generation Now type: S4B> DI [ENTER] DI is the abbreviation for the directory command. The directory command returns: All stored procedure names Extended address of all procedures Number of words used by each procedure If you made a mistake while entering the procedure, you can edit your procedure. Editing instructions are discussed in chapter 7 of this manual. 5.
Chapter 5 Getting Started in Report Generation The channel address is the extended address of the 1775-S4B scanner that executes the procedure. This address has the following format (figure 5.2): E2.7.t where: E2 = the module status area of PLC-3 memory 7 = the 1775-S4B scanner section of the module status area t = the thumbwheel number on the 1775-S4B scanner Figure 5.
Chapter 5 Getting Started in Report Generation 5.6 Control Modes As we have described in this chapter, you can: Create and execute report generation procedures from the S4B> prompt Call for procedures to execute from MSG instructions in your ladder diagram program The communication that occurs between the RS-232-C device on channel 5 of the 1775-S4B scanner can be in one of two control modes: Command mode—The data terminal keyboard has direct control over the operation of the 1775-S4B scanner.
Chapter 5 Getting Started in Report Generation Figure 5.4 Report Generation Control Modes Initialization Execute Procedure • • • • • • Print Directory Create Delete Copy Rename E [RETURN] ED @ [RETURN] Completed Direct Command [RETURN] Procedure completed Command Mode in Control S4B> is output to the data terminal to prompt the operator upon return to this mode after completing a command and after each [RETURN].
Chapter 5 Getting Started in Report Generation REPORT GENERATION ABORTED At this point, ladder diagram mode is in control. If the ladder diagram program calls for the 1775-S4B scanner to execute report generation commands or procedures while the command mode controls the 1775-S4B scanner, the 1775-S4B scanner does not respond to the ladder diagram program immediately.
Chapter 6 Logical Addressing for Report Generation 6.0 Chapter Objectives In addition to creating text in procedures, you can use report generation to manipulate data within a specific area of PLC–3 memory. After reading this chapter, you should be able to: Use data table addressing to specify a memory area Use extended addressing to specify a memory area 6.
Chapter 6 Logical Addressing for Report Generation Some examples appear below: Data Table Address Description $B1:5 This address specifies binary file, 1, word 5. $D0:1 or $D:1 These addresses specify the same address, decimal file 0 word 1. If you are specifying file 0, you need not enter a zero after the section specifier. $TPRE:57 This address specifies the preset of timer 57. $B1:5/12 This address specifies binary file 1, word 5, bit 12 decimal.
Chapter 6 Logical Addressing for Report Generation 6.3 Extended Addressing Extended addressing can access any area of PLC–3 memory. In extended addressing, you enter E followed by the memory area. Then you enter parameters, or levels that the memory area requires, seperated by periods to specify a memory address to the bit level if necessary. For example, if you are specifying a data table address, you follow the $ sign with E3 to specify the data table.
Chapter 6 Logical Addressing for Report Generation USER PROGRAM Context Section Rung Instruction Word E4 1 15 0 - program status 1 - main 2 - subroutine 3 - faults 0 32767 0 32767 0 32767 MESSAGES Context Section Message Word E5 1 15 1 - report generation 2 - comments 3 - terminal (MACROS) 4 - data highway 5 - assistance (HELP) 0 65535 0 32767 SYSTEM SYMBOLS Symbol Context Symbol Type Number Word E6 1 15 1 0 32767 0 32767 FORCE TABLE Context Force Type Rack Number Word
Chapter 6 Logical Addressing for Report Generation 6.4 Chapter Summary In this chapter, you read about addressing PLC–3 memory areas: You can use the extended addressing format to specify any location in PLC–3 memory. You can use the data table addressing format to specify any section of the data table. The next chapter describes editing procedures.
Chapter 7 Editing a Procedure 7.0 Chapter Objectives In chapter 5, you learned how to enter the edit mode to insert a procedure and execute the procedure at the S4B> prompt. After you read this chapter, you should be able to use all editing commands available with the 1775-S4B scanner. 7.1 Editing a Simple Procedure In chapter 5, we created a procedure called @TEST1 and executed it. Now suppose you want to change the procedure. This section discusses editing a simple procedure.
Chapter 7 Editing a Procedure The 1775-S4B scanner displays the next line of the procedure @TEST1: P ‘SCREEN’ * Now press [ENTER]. The 1775-S4B scanner displays the lines: * Type: I[ENTER] The cursor moves to the line above the asterisk. Now type: P ‘CONTAINS THREE LINES’[ENTER] The 1775-S4B scanner’s line pointer moves to the next line. Exit the insert mode by pressing the [ENTER] twice.
Chapter 7 Editing a Procedure At the S4B> prompt, enter: @TEST1 [ENTER] The 1775-S4B scanner prints the lines: PRINT OUT ON THE SCREEN CONTAINS THREE LINES 7.2 Entering the Edit Mode Now that you have a basic understanding of editing in report generation, this section discusses the editing commands in more detail. To enter the editing mode, you use the edit command: Definition: To create a new procedure or change an existing procedure.
Chapter 7 Editing a Procedure The section modifiers include: Modifier Format with Abbreviation Description Report /R Selects the report generation section Comment /C Selects the rung comment message section Terminal /T Selects the industrial terminal macros message section Highway /H Selects the data highway message section Assist /A Selects the assistance (HELP) message section The edit command causes the 1775-S4B scanner to search the symbol table for the procedure name.
Chapter 7 Editing a Procedure While in the editing mode, if you enter a command other than those listed in table 7.A, the 1775-S4B scanner displays the message: If any line in a procedure exceeds 134 characters or more than one character follows the last carriage return of the procedure, the 1775-S4B scanner displays the message: 7.3.1 Insert Lines Definition: To insert lines into a procedure.
Chapter 7 Editing a Procedure The second line of the procedure prints out: P ‘LINE 2’ * When using the insert command, you insert text above the procedure line displayed on the CRT. So now, we can insert the new line by typing: * I [ENTER] P ‘LINE 1A’[ENTER] [ENTER] The 1775-S4B scanner displays an asterisk on the next line. Now P ’LINE 1A’ becomes the second line in the procedure, and the 1775-S4B scanner automatically adjusts the rest of the procedure. 7.3.
Chapter 7 Editing a Procedure 7.3.3 Advance Line Pointer Definition: To advance the line pointer or cursor in the procedure. Abbreviation: A Format: A [ENTER] Description: The advance line pointer command advances the line pointer the specified number of line(s) in the procedure. If you use a value greater than the number of lines remaining in the procedure, or enter a 0 for the number, the line pointer moves to the end of the procedure.
Chapter 7 Editing a Procedure In the @EXAMPLE procedure which contains the following lines: P ’LINE l’ P ‘LINE 1A’ P ‘LINE 2’ P ‘LINE 3’ We can move from the third procedure line to the first procedure line by entering 2B at the asterisk: P ‘LINE 2’ *2B[ENTER] The 1775-S4B scanner displays: P ‘LINE l’ * 7.3.5 Display Line Number Definition: To display the current line number. Abbreviation: L Format: L [ENTER] Description: The display line number command displays the number of the current line.
Chapter 7 Editing a Procedure Description: The type out lines command prints out line(s) of the procedure, starting with the current line. If you enter 0 or a number greater than the number of lines in the procedure, the 1775-S4B scanner types the rest of the procedure starting with the current line.
Chapter 7 Editing a Procedure can be any non-blank characters that do not appear in the text. If you do not specify a number of occurrences, the 1775-S4B scanner locates the first occurrence. If the specified value of n is 0 or is greater than the number of occurrences of the text, the 1775-S4B scanner locates the last occurrence.
Chapter 7 Editing a Procedure text on the line. If the 1775-S4B scanner cannot find the text that you specify, the following message displays: If you do not enter the change command correctly (such as not using the same character for both delimiters), the 1775-S4B scanner displays the following message: Example using the change text characters command: Suppose you want to change the word LINE to INDEX in the first line of the procedure @EXAMPLE.
Chapter 7 Editing a Procedure *C/WAS IS/IS WAS/ [ENTER] The 1775-S4B scanner now returns: P ‘THIS WAS A TEST’ As a third example, if you are changing multiple occurrences in a line, you must specify this in the change command. Otherwise, the 1775-S4B scanner only changes one occurrence per line.
Chapter 7 Editing a Procedure The 1775-S4B scanner deletes the first two lines of @EXAMPLE, revises the procedure line numbers, and returns: P ‘LINE 2’ * 7.3.10 Exit Edit Mode Definition: To exit the edit mode and return to the command mode. Abbreviation: E Format: E [ENTER] Description: The exit command takes the 1775-S4B scanner out of the edit mode, and returns the S4B> prompt.
Chapter 7 Editing a Procedure MC for comment MH for highway The message number is part of the extended address of the message procedure. Consider the following extended address: E5.1.1.24.0 where: 5 designates the message area 1 designates context 1 1 designates the report generation section in the area 24 designates the message number within the section 0 designates the starting word within the message The starting word must always be 0.
Chapter 7 Editing a Procedure You can also remove a procedure in this edit mode. However, before the 1775-S4B removes it the from the symbol table, you must enter the following: RS,[ENTER] The 1775-S4B scanner removes the procedure name from the symbol table. You can generate a listing of all symbols and their memory addresses by entering: LS [ENTER] The 1775-S4B scanner displays a list of all symbols.
Chapter 7 Editing a Procedure 7.5 Chapter Summary In this chapter you read about editing report generation procedures. You can edit procedures: In the command mode by using the report generation editing commands In the ladder diagram mode by using the 1775-S4A editing commands through channel 5 on the 1775-S4A scanner The next chapter describes the use of symbols and expressions in report generation.
Chapter 8 Using Symbols and Expressions in Report Generation 8.0 Chapter Objectives After reading this chapter, you should be able to: Use symbols within procedures Use symbols within PLC-3 memory Use expressions within procedures 8.1 Creating and Executing a Simple Procedure with a Symbol Before we define symbols, let’s work through another procedure which uses symbols.
Chapter 8 Using Symbols and Expressions in Report Generation This is the first line of the procedure. Now enter the following line: P A [ENTER] This is the second line of the procedure. Now press the [ENTER] key to exit the edit mode. The 1775-S4B scanner displays: * Now to exit the edit mode, enter: * E [ENTER] The 1775-S4B scanner exits the edit mode and returns the S4B> prompt. To execute the procedure, enter: S4B> @EASY [ENTER] The 1775-S4B scanner executes the procedure @EASY.
Chapter 8 Using Symbols and Expressions in Report Generation 8.2 Symbols In the procedure @EASY, from chapter 8, the variable A serves as a user symbol within the procedure, however, symbols have many purposes which we discuss in this chapter. The PLC-3 controller supports two types of symbols (figure 8.1): User symbols System symbols The following sections explain these types of symbols. Figure 8.
Chapter 8 Using Symbols and Expressions in Report Generation 8.3 User Symbols A user symbol is a name which represents data within a procedure. Such data can be individual or groups of characters or numbers. The user symbol must begin with a letter and can contain up to eight unique upper or lower case letters, numbers, or the underscore character. For example: USER_SYN Report generation supports three types of user symbols: Numeric—Variables that represent a number.
Chapter 8 Using Symbols and Expressions in Report Generation The procedure @SLAVE can use and alter B and any other interprocedural user symbol declared in @MASTER, but @SLAVE does not recognize procedural user symbols declared in @MASTER. Refer to the next section for a discussion on the assignment statements.
Chapter 8 Using Symbols and Expressions in Report Generation An assignment statement can look very much like an algebraic equation, but there is one important difference. In algebraic equations, there is no difference between the statements: A=B and B=A But in an assignment statement, the two statements are very different. Suppose, for example, that before the 1775-S4B scanner executes the statement, A contains the value 5 and B contains the value 10.
Chapter 8 Using Symbols and Expressions in Report Generation 8.3.3 User Symbol for Detecting Errors When the 1775-S4B scanner detects an error in executing a procedure or a direct command, it assigns a numeric value to the interprocedural user symbol: ERROR This user symbol must be reserved exclusively for this purpose. 8.4 System Symbols A system symbol represents an entire procedure or a PLC-3 memory address. You must precede the system symbol with the @ delimiter.
Chapter 8 Using Symbols and Expressions in Report Generation The 1775-S4B scanner only recognizes @TEST in the current context. If you create a global symbol by using the global modifier (/G), the 1775-S4B scanner recognizes the symbol in any context. For example: If you enter: CR/G@HR$E0.0.0.17 The global modifier (/G) makes the system symbol @HR a global system symbol. The 1775-S4B scanner recognizes this symbolic address in any context.
Chapter 8 Using Symbols and Expressions in Report Generation 8.4.2 Memory Storage for System Symbols The 1775-S4B scanner uses areas 5 and 6 of PLC-3 memory to store information about system symbols. Area 5 of PLC-3 memory is the message area which stores the contents of all messages. As we discussed in chapter 7, the PLC-3 processor can store data under different sections of this area.
Chapter 8 Using Symbols and Expressions in Report Generation You can access the system symbols area by using the following extended addressing format: E6..1.. The character E6 denotes the system symbol area. You can enter values from 0 thru 15 for the context with 0 being the context for global system symbols. The next level is always 1. The symbol number and the word number can be values from 0 thru 32,767. 8.
Chapter 8 Using Symbols and Expressions in Report Generation Table 8.A Expression Operators Operator Order of Execution1 Description ~ or .BNOT. .NOT. / * % + >> << & or .BAND. ^ or .BXOR. | or .BOR. .EQ. .GE. .GT. .LE. .LT. .NE. .SNE. .SEQ. .AND. .OR.
Chapter 8 Using Symbols and Expressions in Report Generation 8.5.1 Octal/Decimal Values You can enter numbers into an expression as decimal values or octal values by using the following formats: If you enter: Then: A value with a leading zero The 1775 S4B scanner recognizes the value as octal. A value without a leading zero The 1775 S4B scanner recognizes the value as decimal. For example: If you enter: P (5+10 + 017) The 1775-S4B scanner would return 30 as the answer.
Chapter 8 Using Symbols and Expressions in Report Generation If you enter: $CACC:1 = 50 $CACC:2 = 37 A = ($CACC:l.GT. $CACC:2) The value of user symbol A would be 1 since 50 is greater than 37. If the statement is false, the value of the user symbol would be 0 for false. If you enter: STRD =? ’ABCD’ STRE =? ‘ABCE’ A = (STRD.SEQ.STRE) PA The value of user symbol A would be 0 since the two strings do not match. 8.5.3 Complement Operation Report generation supports the following complement operators: .NOT.
Chapter 8 Using Symbols and Expressions in Report Generation If user symbol B’s bit pattern contains: 1001001100000000 The 1775-S4B scanner would return the following for the expression: 0110110011111111 8.5.4 Bitwise Operations Report generation supports the following bitwise operators: & or .BAND.—bitwise 32-bit AND ^ or .BXOR.—bitwise 32-bit EXCLUSIVE OR | or .BOR.—bitwise 32-bit OR Bitwise operators enable you to manipulate 32-bit values. For example: If you enter: G=(Q.BAND.
Chapter 8 Using Symbols and Expressions in Report Generation 8.5.6 Shift Operations Report generation supports the following shift operators: <<—Bit shift left >>—Bit shift right The shift operators shift binary values a specified number of bit positions to the left or right. When executing a bit shift left, a 0 shifts into the right most bit. When executing a bit shift right, the left most bit does not change state. If the left most bit is a 0, a 0 shifts in.
Chapter 8 Using Symbols and Expressions in Report Generation The bit patterns for the two values are given below: User Symbol Value Stored Bit Pattern (32 bits) A 5 00...00000101 B 10 00...00001010 The following command lines show a bit shift execution on a negative value: A=-1 B=(A>>1) PA PB The 1775-S4B scanner prints out the value -1 for user symbol A and -1 for user symbol B which is a bit shift operation on user symbol A. The bit patterns for the two values are given below: 8.5.
Chapter 8 Using Symbols and Expressions in Report Generation If you do not enclose the entire expression in parentheses, the 1775-S4B scanner displays an error code. If you enter: P (A/31) The 1775-S4B scanner prints the status of decimal bit 31 of user symbol A. If you enter: P (@HR/015) The 1775-S4B scanner prints the status of octal bit 15 of symbolic address @HR. 8.5.
Chapter 8 Using Symbols and Expressions in Report Generation The 1775-S4B scanner returns the value 5. NOTE: If you attempt to divide a value by zero, the 1775-S4B scanner returns error code 20. 8.5.9 Expressions and Logical Addressing You can also use expressions inside a logical address. This use of expressions enables you to create indirect logical addresses which can function similar to data table pointers.
Chapter 8 Using Symbols and Expressions in Report Generation Figure 8.
Chapter 8 Using Symbols and Expressions in Report Generation 8.6 Chapter Summary In this chapter, you read about the use of symbols and expressions in generating reports on your 1775-S4B scanner. Symbols are characters that represent data. Report generation supports two types of symbols: User symbols are variables used to represent data such as values, PLC-3 memory addresses, strings, or labels. You can declare by using assignment statements to be procedural or interprocedural in scope.
Chapter 9 Formatting Data in Report Generation 9.0 Chapter Objectives In the last three chapters, we discussed writing, editing, and using symbols and expressions in procedures. After reading this chapter, you should be able to: Format input and output data Use standard control characters Use carriage and cursor control characters Use special industrial terminal control characters Use conversion table These are the topics that we will discuss in this chapter. 9.
Chapter 9 Formatting Data in Report Generation F = fill character instructions W = field width instructions B = base system instructions Figure 9.1 summarizes these format specifiers. The following four sections discuss the J, F, W, and B specifiers. Figure 9.1 Specifying a Data Format Width of field. If not specified or 0, printing starts on the left and continues through a field width necessary to hold the value; therefore, justification and fill character specifications do not apply.
Chapter 9 Formatting Data in Report Generation character, the output displays a flush right margin with spaces filling any unused areas. Examples of formatting margins and pads are given below: If you enter: A=456 B=678 P B!+010D P B!+.10D P B!–*10D The 1775–S4B scanner displays: 0000000456 .......678 678******* Looking at the printout, variables A and B contain each input value. Variable A prints out flush right preceded by zeros, and variable B prints out flush right preceded by periods.
Chapter 9 Formatting Data in Report Generation The 1775–S4B scanner displays: *******2 2 *******2 2 If you specify a field width that is too small for the data, the 1775–S4B scanner makes room to display the entire expression. No data truncation occurs. Specifying a field width is particularly useful for formatting columns of data.
Chapter 9 Formatting Data in Report Generation 9.1.4 Specifying a Base Format You can specify a base format specifier to format data in a specific numbering system. The base format specifiers are given below: Format Specifiers Format H Hexidecimal O Octal D Decimal B Binary S String If you do not specify a format, the following base conversions occur: Integers default to decimal. Strings default to strings.
Chapter 9 Formatting Data in Report Generation The 1775–S4B scanner returns the following: 9.1.4.2 String Values 1775 S4B Printout Description of Value 0000010011010010 Binary value for 1234 4D2 Hexadecimal value for 1234 1234 Decimal value for 1234 2322 Octal value for 1234 The S base specifier serves when you are displaying strings of data.
Chapter 9 Formatting Data in Report Generation 9.2 Using Standard Control Characters Report generation specifies that the following three characters serve special functions: ^ (uparrow) \ (backslash) ’ (single quote) The uparrow and the backslash serve as modifiers. When a string is followed by one of the characters outlined in table 9.A, report generation executes a specific task.
Chapter 9 Formatting Data in Report Generation Table 9.
Chapter 9 Formatting Data in Report Generation The single quote accompanies the print or inquire command. Enclosing a character or string of characters with single quotes tells the 1775–S4B scanner to print the specified characters as a string value having no numerical significance. For example: If you enter: P ‘TEST THE PROCEDURE’ The 1775–S4B scanner prints out: TEST THE PROCEDURE If you would like to display one of these special characters, simply precede it with a backslash.
Chapter 9 Formatting Data in Report Generation If you enter: P ‘START’ P ‘LINE1\L LINE2\N’ P ‘LINE3\X’ P ‘LINE4\N’ P ‘LINE5\R LINE6’ P ‘END’ The 1775–S4B scanner prints out: START LINE1 LINE2 LINE3LINE4 LINE6 END We describe the execution of this procedure in the following paragraphs. First, START prints on the first line. START The cursor moves to the next line automatically and prints LINE 1.
Chapter 9 Formatting Data in Report Generation The \X instruction attached to LINE3 keeps the cursor on the same line and LINE4 from the next print command prints next to LINE3. START LINE1 LINE2 LINE3LINE4 The \N instruction attached to LINE4 moves the cursor down two lines. The \R instruction attached to LINE5 moves the cursor to the beginning of that line. In effect, this erases LINE5, and thus, it does not print. LINE6, the next print instruction, prints on the line.
Chapter 9 Formatting Data in Report Generation 9.4 Using Industrial Terminal Control Characters There are several control codes unique to the industrial terminal that use [CTRL] or [^] P as part of the key sequence. These control codes control cursor positioning and other operating characteristics. Table 9.B lists these codes and their functions. For example: If you enter: [CTRL] P 5 G OR [^] P 5 G The industrial terminal is placed in the graphics capability mode.
Chapter 9 Formatting Data in Report Generation 9.5 Using the Conversion Table Table 9.C is the decimal – octal – hexidecimal – ASCII conversion table. This table converts an ASCII character to its decimal, hexidecimal, and octal equivalents. The table is divided into four columns: Column 1 contains all the control characters. Column 2 contains numbers and symbols. Column 3 contains the capital letters.
Chapter 9 Formatting Data in Report Generation Table 9.
Chapter 9 Formatting Data in Report Generation Table 9.D Binary Patterns For Hexadecimal Digits 9.6 Chapter Summary Hexadecimal Digits Binary Equivalent Decimal 0 1 2 3 4 5 6 7 8 9 A B C D E F 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 In this chapter, you read about formatting data on your 1775–S4B scanner.
Chapter 10 Using Commands in Report Generation 10.0 Chapter Objectives This chapter describes the commands which make up the report generation programming language. After reading this chapter, you should be able to: Use report generation commands directly in the command mode Use report generation commands within procedures to manipulate data 10.1 Commands As we described in chapter 5, the report generation programming language uses commands to tell the 1775-S4B scanner what to do.
Chapter 10 Using Commands in Report Generation Rename Execute We describe these commands in the following sections. 10.2.1 Print Definition: To display the contents of a procedure. Abbreviation: P Format: P @ Description: If you enter a print command followed by a procedure name at the S4B> prompt, the 1775-S4B scanner displays the procedure exactly as stored in PLC-3 memory. You can also use the Print command within procedures to print out data. Refer to section 10.3.
Chapter 10 Using Commands in Report Generation For a procedure, the 1775-S4B scanner lists the extended address for the message area location. This address starts with E5. The size is the number of words that make up the procedure. For a symbolic address, the 1775-S4B scanner lists the corresponding logical address. This address could be displayed in extended address or data table address format. The 1775-S4B scanner does not display the size for symbolic addresses.
Chapter 10 Using Commands in Report Generation If you assign a logical address to a symbolic address that already exists, the 1775-S4B scanner replaces the original logical address with the new logical address. On the other hand, if you assign a logical address to a procedure name that already exists, the 1775-S4B scanner displays error code 30. Examples using the create command: If you enter: S4B> CR @COUNT $N1:23 The 1775-S4B scanner creates a local symbolic address for an integer word.
Chapter 10 Using Commands in Report Generation Table 10.A Command Section Modifiers Section Modifier Abbreviation Type of Message File to Generate Report /R Report Generation Message Procedure Comment /C Rung Comment Terminal /T Macro Commands Highway /H Data Highway Message Procedure Assist /A Help Message The default modifiers are local for the scope modifier and report for the section modifier. You can also use the delete command within a procedure to delete a user symbol.
Chapter 10 Using Commands in Report Generation When you execute the copy command, the 1775-S4B scanner generates an error code: If the copy name already exists in the symbol table If sufficient memory is not available for the copy. A scope modifier specifies whether the original procedure is local (CO/L) or global (CO/G). If the original procedure is local, the copy procedure becomes local. If the original procedure is global, the copy procedure becomes global. Table 10.
Chapter 10 Using Commands in Report Generation global scope modifier (/G). The local modifier is the default scope modifier. Examples using the rename command: If you enter: S4B>RE @MP_6 @MP_7 The 1775-S4B scanner changes the name of the local system symbol @MP_6 to @MP_7. If you enter: S4B> RE/G @SA_12 @PARTS The 1775-S4B scanner changes the name of the global procedure @SA_12 to @PARTS. 10.2.7 Execute Definition: To execute the command lines that make up a procedure.
Chapter 10 Using Commands in Report Generation 10.3 Indirect Commands You enter indirect commands into a procedure through the edit mode. The commands in the procedure are then executed by the 1775-S4B scanner whenever you tell it to execute that procedure. Indirect commands include: Print Execute Case Exit Stop If Goto On_error Assignment Inquire Delete We describe these commands in the following sections. 10.3.1 Print Definition: To display information.
Chapter 10 Using Commands in Report Generation The 1775-S4B scanner displays the lines which make up the procedure @TEST. If you enter: P ‘THIS IS A STRING’ The 1775-S4B scanner displays: THIS IS A STRING If you enter: P ‘THE TEMP. IN BUILDING ’A ‘ IS ‘B’ DEGREES F’ If the user symbol A contains the value 2, and B contains the value 78, then 1775-S4B scanner displays the line: THE TEMP. IN BUILDING 2 IS 78 DEGREES F If you enter: P $D2:0 The 1775-S4B scanner returns the contents of D2:0.
Chapter 10 Using Commands in Report Generation If you enter: P (5+3) The 1775-S4B scanner returns the value: 8 If you enter: P $N:($CACC:19) In this example, an expression is used as part of a logical address. The accumulated value of counter 19 in the expression selects a word in the integer section of the data table. The 1775-S4B scanner prints out the current value of the selected word. 10.3.2 Execute Definition: To execute a procedure or nest procedure execution.
Chapter 10 Using Commands in Report Generation 10.3.3 Case Definition: To call for a procedure to execute based on the value of an expression. Abbreviation: CA Format: CA () @... @ Description: The case command allows you to call one of several procedures depending on the value of an expression. The expression must generate values from zero to one less than the number of procedure names on the case command line.
Chapter 10 Using Commands in Report Generation 10.3.4 Exit Definition: To halt procedure execution. Abbreviation: EX Format: EX Description: You can use the exit command in a procedure to halt procedure execution. If you enter this command into a procedure which is called by a higher nested level procedure, the 1775-S4B scanner continues executing the next highest procedure. The exit command is similar to the RETURN instruction which ends a subroutine in a ladder diagram program.
Chapter 10 Using Commands in Report Generation 10.3.5 Stop Definition: To stop procedure execution and perform a specific instruction. Abbreviation: S Format: S Description: When the 1775-S4B scanner comes across a stop command in a procedure, it stops executing that procedure and all calling procedures.
Chapter 10 Using Commands in Report Generation Examples using the if command: If you enter: IF (ABC.EQ.12)P ’YOU SELECTED ENTRY #12’ The 1775-S4B scanner tests user symbol ABC. If ABC equals 12, the statement YOU SELECTED ENTRY #12 displays. If ABC does not equal 12, the next command line executes. 10.3.7 Goto Definition: To jump to a specific place in the procedure.
Chapter 10 Using Commands in Report Generation In the procedure above, the if command tests bit I:12/010 for an on or off state: If bit I:12/010 is: Then the 1775 S4B scanner: On Executes the G SW10_ON command following the if command and displays: LINE 1 LINE 3 Off Does not execute the G SW10_ON command following the if command and displays: LINE 1 LINE 2 LINE 3 If you enter: SKIP_OVR: IF($CACC:1.GE.
Chapter 10 Using Commands in Report Generation The 1775-S4B scanner does not execute an on_error command line in sequence with the other command lines in the procedure. If the 1775-S4B scanner detects a runtime error on a command line in the procedure, its response to that error is determined by the last on_error command line. By entering an action command statement following the on_error, you can instruct the 1775-S4B scanner to display specific information if it detects a runtime error.
Chapter 10 Using Commands in Report Generation The procedure above contains three on_error command lines which execute if the 1775-S4B scanner detects a runtime error in the following command lines: When a runtime error occurs in command lines 1 thru 4, the 1775-S4B scanner displays the error code at the data terminal, and procedure execution stops. When a runtime error occurs in command lines 6 (A = (B % C)) thru command line 9, the 1775-S4B scanner executes the on_error goto DIV_ERR command line.
Chapter 10 Using Commands in Report Generation Statement Function = Assigns the numeric value on the right to the variable or address on the left. If a user symbol is on the left, it is defined to be a procedural symbol. Example: A = 10 == Assigns the numeric value on the right to the variable or address on the left. If a user symbol is on the left, it is defined as an interprocedural symbol. Example: B == 100 =? Assigns the string value on the right to the variable or address on the left.
Chapter 10 Using Commands in Report Generation When assigning a numeric value to an address, do not attempt to assign a value which is too large for that address. This causes the 1775-S4B scanner to generate error code 89. The ranges include: -32,768 to +32,767 for signed integer values. 0 to 65,535 for unsigned integer values. When assigning a user symbol to an address, make sure that the user symbol contains a numeric value, not a string.
Chapter 10 Using Commands in Report Generation If you enter: US_4==(US_4+$N4:25) The 1775-S4B scanner adds the current value at logical address N4:25 to the current value in user symbol US_4 and places the result in interprocedural user symbol 10.3.10 Inquire Definition: To make the 1775-S4B scanner wait for data and a carriage return to be entered before executing the rest of the procedure.
Chapter 10 Using Commands in Report Generation You could also use the following input access functions which you can use to time out the terminal keyboard: Getchar()—which searches the input buffer for a character Testchar()—which tests the input buffer for a character Testline()—which tests the input buffer for an available complete line Refer to chapter 11 for detailed information on these functions.
Chapter 10 Using Commands in Report Generation Example using the delete command: If you enter: DEL A The 1775-S4B scanner deletes user symbol A from the procedure. 10.4 Chapter Summary In this chapter, you read about the commands that you can use to tell the 1775-S4B what to do: You can execute these commands directly from the S4B> prompt. You can execute these commands indirectly by placing them in procedures.
Chapter 11 Using Report Generation Functions 11.0 Chapter Objectives Like report generation commands, you can use functions within a procedure to tell the 1775-S4B scanner what to do. This chapter describes the report generation functions. After reading this chapter, you should be able to: Distinguish a report generation function from a report generation command Use functions within report generation procedures 11.
Chapter 11 Using Report Generation Functions 11.2 Input Access Functions Input access functions give you the capability of entering characters into a procedure during procedure execution. Figure 11.1 shows you the relationship of the three input access functions to the data terminal keyboard. Figure 11.1 Input Access Functions TESTCHAR () Specifies a value of 0 if no character is in the input buffer; specifies a value of 1 if a character is in the input buffer.
Chapter 11 Using Report Generation Functions 11.2.1 Getchar Definition: To search the data terminal input buffer for a character. Abbreviation: G Format: G() Description: The getchar function returns the binary bit pattern of the first character in the input buffer. The 1775-S4B scanner reads the decimal value of the character and clears the character from the input buffer. Commands and operators can use this value specified by the getchar function. Refer to table 9.
Chapter 11 Using Report Generation Functions Example using the testchar function: If you enter: IF (TESTC()) G LABEL_2 In the command line above, if a character is in the input buffer, the 1775-S4B scanner executes the goto command. 11.2.3 Testline Definition: To test the data terminal input buffer for a complete line. Abbreviation: TESTL Format: TESTL() Description: The testline function tests the input buffer for a line.
Chapter 11 Using Report Generation Functions 11.3 Format Conversion Functions Format conversion functions give you the capability to express values in binary or binary coded decimal format. Figure 11.2 shows you the relationship between the two format conversion functions. The format conversion functions include: To_bcd From_bcd We describe these functions in the following sections. Figure 11.2 Format Conversion Functions Binary coded decimal values in the data table. 11.3.
Chapter 11 Using Report Generation Functions If you use the to_bcd function: $D:0 = TO(10) The value 10 converts to: 0000 0000 0001 0000 11.3.2 From_bcd Definition: To convert an expression from BCD to its binary. Abbreviation: F Format: F () Description: The from_bcd function performs the opposite operation to the to_bcd function. It converts expression to a 32 bit BCD number and returns the binary representation.
Chapter 12 Execution Time Considerations 12.0 Chapter Objectives After reading this chapter, you will be aware of the factors that affect 1775-S4B scanner execution time. 12.1 Introduction The 1775-S4B scanner can execute procedures of many commands, operators, and functions. However, each command, operator, and function takes a certain amount of time to execute. In some cases, a procedure executes faster than the data transmits for printing.
Chapter 12 Execution Time Considerations You also might consider purchasing a Peripheral Communication Module (cat. no. 1775-GA). This module features a faster executing enhanced version of report generation. Contact your Allen-Bradley representative for more information on this product. 12.3 Address Complexity Procedure execution times are slower if you use complex formats for addresses. For example, the 1775-S4B scanner takes longer to find the word at extended address E3.1.8.5.0.
Chapter 12 Execution Time Considerations 12.7 Chapter Summary In this chapter, you read about factors that affect 1775-S4B scanner execution time. If execution is critical in your application, you should carefully analyze your procedures to make sure that you take into account these factors.
Appendix A Using a Peripheral Communication Module A.0 Appendix Objectives This appendix briefly describes the peripheral communication module for enhanced report generation capability and describes how you can enter report generation procedures so that they can execute from a 1775-S4B scanner or a peripheral communication module. A.1 Introduction If you want to expand your PLC-3 report generation capability, you can use a peripheral communication module.
Appendix A Using a Peripheral Communication Module A.2.1 Abbreviating Commands A.2.
Appendix A Using a Peripheral Communication Module A.2.3 Abbreviating Functions A.2.4 Specifying Octal Addresses A.2.5 Using the .EQ.
Appendix A Using a Peripheral Communication Module The following formatted statement would not be accepted: P A!7 The formatted statement above would cause the peripheral communication module to generate an error. A.2.7 Suppressing the Line Feed Report generation for the 1775-S4B scanner and GA Basic programming for the peripheral communication module support the \X control character for line suppression.
Appendix A Using a Peripheral Communication Module A =?‘ABC’ B =?‘TEST VARIABILES’ P A‘\X’ PB The 1775-GA module displays: ABC TEST VARIABLES A.3 Bit Shift Operation Report generation for the 1775-S4B scanner and GA Basic programming for the peripheral communication module support the bit shift left and bit shift right expression operators. These shift operators shift binary values a specified number of bit positions to the left or right.
Appendix A Using a Peripheral Communication Module Bit shift right shifts a 0 into the left most bit. Thus, the sign on the value could change due to a shift operation. An example is given below: The following command lines show a bit shift execution that changes the sign on a value: A = -1 B = (A>>1) PA PB The peripheral communication module prints out the value -1 for user symbol A and 2147483647 for user symbol B which is a bit shift operation on user symbol A.
Appendix A Using a Peripheral Communication Module A.4 Form Feed Selection in LIST In configuring your PLC-3 system, both the 1775-S4B scanner and the peripheral communication module use the CRT defaults selection for RS-232-C communication. This selection configures: Channel 5 on the 1775-S4B scanner for report generation protocol. RS-232-C channels on the peripheral communication module for GA Basic protocol. One parameter that the CRT defaults selection sets is the form feed.
Appendix B Floating Point Values on the 1775 S4B Scanner B.0 Appendix Objectives This appendix gives you a ladder diagram program which you can use to access floating point numbers on the 1775-S4B scanner. B.1 Introduction Since the 1775-S4B scanner does not directly allow access to floating point numbers, a technique is desirable to allow access to these numbers for use in report generation. The following program which is described in detail in section B.
Appendix B Floating Point Values on the 1775 S4B Scanner B.2 Program Explanation The program shown in figure B.1 performs the floating point conversion routine. The following words contain constants and must be entered as shown: N0:l = 1 N0:2 = 0 F0:6 = 1 E-38 F0:7 = 9.99999 E-1 F0:8 = 1 E I F0:9 = 9.99999 E0 F0:10 = 1 E 0 F0:11 = 1 E 6 CAUTION: Failure to enter these constants as shown above prior to going to run mode may cause a watchdog timeout which will shut down the PLC-3 processor.
Appendix B Floating Point Values on the 1775 S4B Scanner Figure B.
Appendix B Floating Point Values on the 1775 S4B Scanner Figure B.1 Floating Point Conversion User Program (continued) Rung Number RS2 00004 LBL MOV A<=B<=C A : WF000:0006 1.00000E 38 B : WF000:0002 0 C : WF000:0007 9.99999E 1 MUL B0000 (L) 02 CTU COUNTER UP C0002 CP = 40 CA = 40 C0002 (CU) 17 C0002 (DN) 15 A+B=R A : WF000:0002 0 B : WF000:0008 1.
Appendix B Floating Point Values on the 1775 S4B Scanner Figure B.
Appendix B Floating Point Values on the 1775 S4B Scanner Figure B.1 Floating Point Conversion User Program (continued) Rung Number RS12 MOV MOVE FROM A TO R A : WH000:0000 1 R : WH000:0004 1.00000E0 SUB MUL A B=R A : WF000:0002 0 B : WF000:0004 1.00000E0 R : WF000:0005 2.29999E 1 A*B=R A : WF000:0005 2.29999E 1 B : WF000:0011 1.
Appendix B Floating Point Values on the 1775 S4B Scanner Figure B.
Appendix B Floating Point Values on the 1775 S4B Scanner Rung Number Description RM0: Whenever there is not a conversion fault and whenever F0:0 does not equal 0 (i.e., F0:0 changes value) reset the one shot bit and jump to subroutine. RM1: End of program for main program section. RS0: If F0:0 is less than 0 (negative), negate F0:0 and latch on the negate result flag bit. This rung allows us to work on only positive floating point numbers.
Appendix B Floating Point Values on the 1775 S4B Scanner Rung Number Description RS14: The greater than range counter kept track of how many times we divided by 10. When the conversion is complete, this corresponds exactly to the positive exponent. If it has accumulated, move its count into the result word H0:2 as a positive exponent. RS15: The less than range counter kept track of how many times we multiplied by 10. When the conversion is complete, this corresponds exactly to the negative exponent.
Appendix C Report Generation Quick Reference Guide C.0 Quick Reference This appendix contains tables and figures which will remind you how to do report generation on the 1775-S4B scanner: Figure or Table Page Specifying a Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conversion Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix C Report Generation Quick Reference Guide Table C.
Appendix C Report Generation Quick Reference Guide Table C.B Expression Operators Operator Order of Execution1 Description ~ or .BNOT. .NOT. / * % + >> << & or .BAND. ^ or .BXOR. | or .BOR. .EQ. .GE. .GT. .LE. .LT. .NE. .SNE. .SEQ. .AND. .OR.
Appendix C Report Generation Quick Reference Guide Table C.D Section Modifiers Section Modifier Abbreviation Type of Message File to Generate Report /R Report Generation Message Procedure Comment /C Rung Comment Terminal /T Macro Commands Highway /H Data Highway Message Procedure Assist /A Help Message Table C.
Appendix C Report Generation Quick Reference Guide Table C.
Appendix C Report Generation Quick Reference Guide Table C.
Appendix C Report Generation Quick Reference Guide Table C.I Error Codes Codes Description 10 Illegal operands for string compare. 11 Illegal operands for arithmetic operation. 12 Illegal arithmetic operation. 13 Missing parenthesis in expression. 14 Illegal expression syntax. 15 Illegal unary operator. 16 Illegal right side of arithmetic assignment. 17 Bad data following address. 18 Illegal string assignment. 19 Invalid data being assigned to address. 20 Division by zero.
Appendix C Report Generation Quick Reference Guide Table C.I Error Codes (continued) C 8 Codes Description 57 Symbol undefined. 59 Bad level specified in logical address. 60 Unrecognized section specifier. 61 Bad format for timer/counter address. 62 Bad word specifier in timer/counter address. 63 Missing colon between file and word. 64 Illegal word specifier. 65 Illegal context specifier. 66 Attempt to execute a symbol that is not defined as a procedure.
Appendix D Glossary Address: An expression preceded by a dollar sign that represents where data is stored. ASCII: American Standards Code for Information Interchange. It is an 8-bit (7 bits plus a parity bit) code for representing alphanumerics, punctuation marks, and control code characters. Baud: A rate of communication equal to the number of code elements (bits) per second. BCD: Abbreviation for Binary Coded Decimal.
Appendix D Glossary Command line: The command and any other input needed to execute the command properly. Command mode: Direct operation of the 1775-S4B scanner through data terminal keyboard input. The prompt S4B> cues the user for input. CRT terminal: A terminal containing a cathode ray tube used to display programs, reports, or user input. Cursor: A means for indicating on a CRT screen where data entry or editing occurs. Data: A general term for any type of information.
Appendix D Glossary Half duplex: A mode of data transmission capable of communicating in two directions, but only in one direction at a time. Hardware: The mechanical, electrical, and electronic devices which compose a programmable controller and its application. Hexadecimal numbering system: A numbering system that uses the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and the letters A, B, C, D, E, F to represent numbers and codes. Base 16. Information: Data that has been processed into a meaningful form.
Appendix D Glossary Modem: Modulator/Demodulator. A data transceiver. Modem handshaking: A signaling protocol used for transferring information between devices in a synchronized manner at a rate acceptable to both devices. Modifier: A parameter preceded by a slash (/) that follows a command. It tells the 1775-S4B scanner how to execute the command. MSG instruction: A PLC-3 ladder diagram instruction that sends a message or procedure to a specified RS-232-C port in the PLC-3 system.
Appendix D Glossary Ability to configure the mode (RUN, TEST, PROGRAM LOAD) Rack: A quantity of I/O modules that accesses 128 discrete I/O points. Report: The output generated when a procedure is executed by the 1775-S4B scanner. Report generation: A programming language that the 1775-S4B scanner uses to print or display formatted text and data. RS-232-C: An electrical connection standard. RS-232-C device: An electronic device that provides data at various rates, eight data bits per second.
Index A Active I/O channels, 12 1 Addition operator (+), 8 17 Address complexity, 12 2 Addressing data table, 6 1 extended, 6 3 logical, 6 1 octal, 6 1, 8 12 Advance line pointer, 7 7 Arithmetic operations, 8 17 ASCII code size selection, 4 11 Assignment command, 10 17 statements, 8 5 values, 12 2 Auto configuration selection, 4 14 Character pad format specifier, 9 2 Command line comments, 5 2, 12 2 format, 5 1 Communication rate (baud) selection, 4 10, 4 12 Comparison operations, 8 12 Complement operatio
I–2 Index Execute a procedure, 10 10 Inquire command, 10 20 Execution time considerations, 12 1 Insert lines command, 7 5 Exit command, 10 12 Installation procedures, 3 1 Exit edit mode command, 7 13 Interprocedural user symbols, 8 4 Expressions, 8 10 Extended addressing, 6 3 F L Label, 8 4, 10 14 Less than or equal to operator (.LE.
Index Print command, 10 2, 10 8 Privileges selection, 4 4 Procedural user symbols, 8 4 Procedure name, 8 7 R Reconfigure selection, 4 11, 4 14 Rename command, 10 6 S system, 8 7 table, 8 8 user, 8 4 Symbolic addresses, 8 7 System symbol area (area 6), 8 9 System symbols, 8 7 T Tabs selection, 4 8 Terminal swing arm, 2 3, 3 5 Testchar function, 11 3 Search for text command, 7 9 Testline function, 11 4 Set line pointer command, 7 6 Thumbwheel switch, 2 2 Shift operations, 8 15 To_bcd function, 11 5
With offices in major cities worldwide WORLD HEADQUARTERS Allen-Bradley 1201 South Second Street Milwaukee, WI 53204 USA Tel: (414) 382-2000 Telex: 43 11 016 FAX: (414) 382-4444 EUROPE/MIDDLE EAST/AFRICA HEADQUARTERS Allen-Bradley Europa B.V. Amsterdamseweg 15 1422 AC Uithoorn The Netherlands Tel: (31) 2975/60611 Telex: (844) 18042 FAX: (31) 2975/60222 Publication 1775–6.5.3 – December, 1985 Supersedes 1775–6.5.