ChapterStatements11 11 Use the PH0. The value at the top of the argument stack is a. You may print the value of expre. This statement. Adding comment lines to a program makes the program easier.
Use on. The expression following the ST. After a program is stopped you can displa. Initially, memory is not allocated for strings. If you attempt to. Expressions Then, execute the CALL Calls 69 — are described in Chapter Chapter 7 gives you an overview of h. ChapterCall Routines 0— 12 -2This routine initiates a full reset.
This is similar to a re-boot or pressingthe reset button. The ladder. If you initiate this call with. See also CALL See Chapter 8. See Chapter. Because of the variety of uses for the products described in thispublication, those responsible for the application and use of this controlequipment m.
CLEAR ChapterCall Routines 0— 12 Use this routine to enable or disable the DF1 packet interrupt capability. This call has the same functionality as th. See Chapte. Execute CA. This routine takes a value between 0 a. ChapterCall Routines 0— 12 Undefined. Use CALL 32 to allow the. Use CALL 33 to transfer. ChapterCall Routines 0— 12 The ladder logic program of the PLC processor retrieves the datafrom the input image table and performs a block t. A zero disa.
Input Argument SixThe sixth input argument is the str. Use CALL 34 to transfer. CALL The ladder logic program of the PLC processor must latch the outputimage table, bit 11 or bit 13 to inform the BA. The BASIC module resets the input image table bit 11 or bit 13 onthe same end of scan cycle in which the output i. Input Argument ThreeThe third input argument is always 1.
ChapterCall Routines 0— 12 Use this routine to retrieve the current character in the character, PRT2port receive buffer and convert it to i. ChapterCall Routines 0— 12 Use this routine to retrieve the number of characters in the buffer youchoose.
Input and Output ArgumentsThis routine. ChapterCall Routines 0— 12 Use this routine to convert 3. See Chapt. ChapterCall Routines 0— 12 Use this routine to set the wall clock time functions. ChapterCall Routines 0— 12 Use this routine to set the wall clock date functions. Input and Output ArgumentsThis routine has three input argumen. Input and Output ArgumentsThis routine has one input a. Input and Output ArgumentsThis routine has one input.
Input and Output ArgumentsThis routine ha. Use CALL 49 to read up to 63 words. The DH status word is placed in. ChapterCall Routines 0— 12 This call is active until you re-execute it with different input parameters. Input and Output ArgumentsThis call has. ChapterCall Routines 0— 12 Input Argument FourThe fourth input argument is the file type to be read from the remotedevice.
This number is igno. Features A Use CALL 50 to write up. ChapterCall Routines 0— 12 Once this call is active, it remains active and sends data to the remote nodewhenever the PLC processor handshaking. ChapterCall Routines 0— 12 Input Argument FourThe fourth input argument is the file type you want to write to the remotedevice.
This number is. ChapterCall Routines 0— 12 Use this routine to repeat a character and place it in a string. You can usethe string repeat when designing output. ChapterCall Routines 0— 12 Use this routine to append one string to the end of another string.
If the resulting string is longer than the maxi. ChapterCall Routines 0— 12 Use this routine to convert a number or numeric variable into a string. ChapterCall Routines 0— 12 Use this routine to convert the first decimal number found in the string youspecify to a number, and place this numb. ChapterCall Routines 0— 12 Use this routine to find a string within a string. It locates the firstoccurrence position of this string. ChapterCall Routines 0— 12 Use this routine to replace a string within a string.
Input and Output ArgumentsThis routine has three input argument. ChapterCall Routines 0— 12 Use this routine to insert a string within another string. Input and Output ArgumentsThis routine has three input arg.
ChapterCall Routines 0— 12 Use this routine to delete a string from within another string. Important: This routine deletes only the first occurr. ChapterCall Routines 0— 12 Use this routine to determine the length of a string. To properly determinethe length of a string you must terminat. Calls 69 — are described here. Calls 0 — 68 are described in Chapter If any ofthe items are missing or incorrect,.
ChapterCall Routines 69— 13 -2Undefined. Execution begins on the line after the l. Values are saved if you enabled CALL 7. Refer to Chapter 3 for information on how to change the battery. This routine: determines the number of memory module. Use this routine. See Chapter 8 for more i. ChapterCall Routines 69— 13 Use CALL 90 to read up to 40 words from the designated node address,file number, file type, and element offset of. ChapterCall Routines 69— 13 Input Argument FourThe fourth input argument is the starting element offset within the file onthe remote device 0.
ChapterCall Routines 69— 13 Output Argument OneThe output argument specifies the status of the message instruction. Upon return from the call. Unless you are using assemblylang. Input and Output ArgumentsThis ro. Input and. The file must be in Int. ChapterCall Routines 69— 13 Undefined. ChapterCall Routines 69— 13 Input Argument ThreeThe third input argument specifies the number of message retries when inhalf-duplex mode or th. When you change to Command mode your user-def.
Input and Output ArgumentsThis routine has no input arguments and on. ChapterCall Routines 69— 13 Use this call to execute a user generated assembly language routine. This call performs some preliminary checks. Use CALL to allow. ChapterCall Routines 69— 13 ChapterCall Routines 69— 13 Input and Output ArgumentsThis routine has five input arguments and one output argument.
Argument Description Pagei. If the second inputargument does not select in. Input and Output ArgumentsThis routine has one in. Use CALL to read u. The data and status are received from t. The PLC receives the data and status from the block transfer andunlatches output image table bit 12 to inform t.
ChapterCall Routines 69— 13 Input Argument SixThe sixth input argument is the number of elements to be transferred. If the number is not withi.
ChapterCall Routines 69— 13 IndicatesCodeCArequest is too large; transaction size plus word address is toolargeCB access denied, privilege vio. Use CALL to write. This value 1through correspon. To conserve the battery, your module isshipped. ChapterCall Routines 69— 13 IndicatesCodeD5data conversion errorD6 the scanner is not able to communicate with a chassisadapterD7 the ada.
This appendix describes: On page:features A —1programming interfaces. Use these LEDindicators for diagnostics and opera. It canalso communicate with a remote device through a modem. In this configuration,. Refer to Chapter 8 for information on dat. PRT2 Port Suppor. If you have a Series. E Appendix E —1Quick ReferenceThis appendix gives you an alphabetical quick reference table to thedifferent, operators Chapter 9 , commands Chapter.
Allen-BradleyPublication Problem ReportIf you find a problem with our documentation, please complete and return this form. You turn hardware and software handshaking o. Place a screwdriver in the battery cover slot.
Release the pressure and remove the battery cover. Replace the battery cover. Bit 2 high indicates the battery low condition. This chapter describes how to use the program serial port and the peripheral serial port to connect terminals, Data Cartridge Recorders, Digital Cassette Recorders, printers and other compatible devices.
The BASIC Module has a program serial port and a peripheral serial port capable of connecting to various user devices figure 4. You can configure each port independently. Both ports are electrically isolated from each other and from the backplane up to V with no external power needed. Both ports operate from baud to Refer to the specifications section in Chapter 2 for cable length recommendations.
Use the following pins for connections made to the program or peripheral ports. Refer to figure 4. Not all signals are available on both ports. RTS is an RS compatible hardware handshaking output line. This line changes to a mark 1 state when the. BASIC Module has data in the output queue and is requesting permission to transmit to the data communications.
This line must be in a mark 1 state for the. If no corresponding signal exists on the data communications. Differential serial output lines. This line changes to a space 0 state when the. The DTR line changes to a mark 1 state. Figure 4. The baud rate is initially set at baud.
You can use CALL 78 to change the baud rate from to Program Port continued Important: The program port always resets the most significant bit of all its data inputs. The range of each byte of data is 0 to 7F H.
The range of each byte of data is 0 to OFF H. Refer to section 4. The program port accepts uppercase or lowercase input, however, the input receiver changes all commands, keywords or variables to upper case before storing in memory, thus:.
You can construct cable for distances up to 50 feet. You can use a T3 or T4 Industrial Terminal with the following keyboard revisions:. Connecting a T50 Industrial Terminal Cat.
You must enter a line delay of 1. Most drivers allow storage of the complete set of parameters in a file for later recall. The industrial terminal stores the BASIC Module program in a text file on the hard or floppy disc depending on where you store the terminal driver package. We recommend you store the driver package on the hard drive to increase execution speed. Most driver packages have upload and download capability. Refer to the driver documentation for these commands.
Use a CALL routine to change peripheral port configuration. Configure the baud rate to Refer to figure 3. The peripheral port can connect to printers figure 4. Transmission resumes when XON is received. The module sends XON when the buffer contains less than characters. If hardware handshaking is not used with your device then RTS pin 4 may be connected to CTS to satisfy this requirement.
Jumper pin 4 to pin 5. We use block-transfer-read and write instructions for bi-directional data transfer between the programmable controller data table and the BASIC Module. Refer to the following figure 4. Use the connections shown in figure 4. Refer to the user manuals for the SB publication number It is not necessary to set the peripheral port parameters except baud rate before CALLing the recorder interface routines.
This is done automatically by the software. The parameters are returned to their original state when the routine is complete. You can find more information on saving and loading programs in Chapter 6 of this manual. You can connect a HC Printer to the peripheral port for program listing, report generation etc. Refer to your printer product manual for more information.
Refer to your printer manual. You can find more information on printing reports and listing programs in Chapter 5 of this manual. RS signals for both sending and receiving data are located on the module's peripheral port. The RS port floats i.
This allows you to connect two transmitting devices on the same line. Also, you can connect more than one device in a multi-drop configuration figure 4.
Important: When you use the peripheral port as a port, you must connect pin 4 to pin 5 on the port. When using an RS interface you must install termination resistors at each end of the line. The module has a jumper selectable termination resistor Refer to figure 3.
Use a cable with 2 twisted pairs and a nominal impedance of ohms. Important: Use terminating resistors only at the ends of the link if using multiple RS devices, and at both ends if using point-to-point connections.
You must supply cables for connecting devices to the program and peripheral ports. This chapter is a reference section to help you with module programming. The following sections define the following terms: commands, statements, format statements, data format, integers, constants, operators, variables, expressions, relational expressions, system control values, argument stack and control stack. You may put more than one statement on a line, if separated by a colon :.
You can use only one statement number per line. Any keywords, commands, variable and array names entered in lower case change to upper case when stored in memory. When an operator, such as. Operators require either one or two operands. Any variables entered in lower case are changed to upper case. We refer to variables as:. This means that if you execute a statement e. We refer to relational expressions as: [rel expr]. See the following Section 5. The first variation causes the program to print from the designated line number integer to the end of the program.
The second variation causes the program to print from the first line number integer to the second line number integer. Important: You must separate the two line numbers with a dash. All comments. In general, NEW cr is used to erase a program and all variables. After initialization NULL 0. In some cases you can continue execution using a CONTinue. See the explanation for CONTinue for more information.
Action taken: This command disables the Control C break function. You can do this by setting bit 48 30H to 1. Bit 48 is located in internal memory location 38 26H. You can move back and forth between the two modes when in command mode. Important: If you exceed the available PROM space, you cannot continue programming until it is erased.
In some cases you can alter the. This CALL:. A bad PROM message with an address of 00xx indicates an incomplete program. Welcome to ManualMachine. We have sent a verification link to to complete your registration. Log In Sign Up. Forgot password? Enter your email address and check your inbox. Please check your email for further instructions.
Enter a new password. Rockwell Automation. Table of Contents vii Data Types. Exits 2. It gives you information about: hardware specifications. Industrial Terminal System Cat. Data Recorder Cat. Chapter 1 Using This Manual 1. When you finish reading this chapter, you should: understand and be able to identify the hardware components of the BASIC Module.
Figure 2. All power derived from the backplane 1. You can start program execution: by entering commands at the interactive terminal. After reading this chapter you should be able to: configure the module using the configuration plugs. Between 8 and 10 Between 32 and You can use these configuration plugs to select: PROM size.
Figure 3. This LED does not indicate whether or not valid data was received. See below. Remove the old chip. Chapter 3 Installing the BASIC Module Electrostatic discharge can damage integrated circuits or semiconductors in this module if you touch backplane connector pins.
Avoid electrostatic damage by observing the following precautions: Touch a grounded object to rid yourself of charge before handling the module. Do not touch the backplane connector or connector pins. When not in use, keep the module in its static-shield bag. To replace the battery figure 3. Press inwards slightly. Chapter 4 Using the Serial Ports 4. This line changes to a mark 1 state when the BASIC Module has data in the output queue and is requesting permission to transmit to the data communications equipment.
Use this line for data recorder interface. When disabled, the module ignores the state of this line. The DTR line changes to a mark 1 state when the input queue contains less than characters. Commands for the 1. Program Port 2. Use XON to resume program execution.
Terminal Cat. You must use a terminal driver package to configure Terminal Cat. To upload and download you must: 1. In addition, the peripheral port has the following format requirements: configurable parity: odd, even or none fixed start bits: 1 configurable stop bits: 1, 1. Chapter 4 Using the Serial Ports Figure 4. Chapter 4 Using the Serial Ports You must supply cables for connecting devices to the program and peripheral ports. You can only enter commands when the processor is in the command or direct mode.
This document uses the terms run mode and command mode to refer to the two different operation modes. Every statement begins with a line number, followed by a statement body, and terminated with a carriage return cr , or a colon : in the case of multiple statements per line.
Every line in a program must have a statement line number ranging between 0 and inclusive. BASIC uses this to order the program statements in sequence. You can use a statement number only once in a program. BASIC automatically orders statements in ascending order. A statement may not contain more than 79 characters. Chapter 5 Operating Functions 5. You can use format statements within the print statement.
Numbers are internally rounded to fit this precision. You can enter and display numbers in four formats: integer, decimal, hexadecimal and exponential. Example: , You can enter all integers in either decimal or hexadecimal format. A constant can be an integer. We call operators that require only one operand, unary operators. A variable can be: a letter e. A, X,I a letter followed by a one dimensioned expression, e. We refer to variables that include a one dimensioned expression [expr] as dimensioned or arrayed variables.
We refer to variables that contain a letter or a letter and a number as scalar variables. We refer to variables as: [var]. This means that the first time a variable is used, BASIC allocates a portion of memory 8 bytes specifically for that variable.
This memory cannot be de-allocated on a variable to variable basis. If you want to run a program as fast as possible, use dimensioned variables only when necessary. Use scalars for intermediate variables and assign the final result to a dimensioned variable. Also, put the most frequently used variables first. Variables defined first require the least amount of time to locate.
An expression is a logical mathematical expression that involves operators both unary and dyadic , constants and variables. Expressions are simple or complex, e. We refer to expressions as: [expr]. You use them in control statements to test a condition i. Relational expressions always require two operands. The system control values include the following: LEN returns the length of your program.
Operations such as add, subtract, multiply and divide always operate on the first two numbers on the argument stack and return the result to the stack. The argument stack is bytes long. Each floating point number placed on the stack requires 6 bytes of storage.
The argument stack can hold up to 33 floating point numbers before overflowing. The control stack C-stack stores all information associated with loop control i.
0コメント