The text of a manual · part 3 of 6
PCM-11 Application Module Operator's Manual, pages 21 to 30
Pages 21 to 30 of 56
The original document is the PDF (3.6 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 Emerson PCM-11
Page 21
PCM-11 Features User Registers
For example: The system you are programming may need to monitor the number of times a particular index has been executed. When the number of index executions exceeds that value (we will use 20 for this example), then a larger value needs to be assigned to the index distance. (Assume the axis is picking up objects from a stack and the stack height is getting progressively lower). User Register URØØ is given the label “FLAG1”, along with a default value of Ø, and User Register URØ2 is given the label “LENGTH1”, along with a default value of 10.000 in. Figure 12 User Registers Setup Screen
The program is then set up to increment User Register “FLAG1” by a value of 1 each time the index is run. After each index, the program compares the value of “FLAG1” against the constant value of 20. When “FLAG1” exceeds 20, User Register “LENGTH1” is made equal to the sum of “LENGTH1” + 2.000 in. (using the WI Write Index Parameter program step discussed later). Then “FLAG1” is reset to Ø, and the program continues. As the program continues to run, each time “FLAG1” exceeds 20, User Register “LENGTH1” will increased by 2.000 in.
User Registers Setup To assign default values and descriptive names to user registers, select Drive Setup, Define Motion, Programming, User Registers. You can assign user names of up to sixteen (16) characters to each of the 64 individual registers, as well as default numeric data values with up to five (5) decimal places. The column on the left side of the screen displays the user register number (URØØ through UR63). The center column displays the user defined register name (maximum 16 characters), and the column on the right displays the user defined register default value (up to 5 decimal places). Once you set the number of decimal places by entering a value, the user register will retain this number of decimal places until changed by an entry from this menu.
15
Page 22
PCM-11 Application Module Operator's Manual
Register names must start with an alpha character rather than a numeric character. For example: A1 would be accepted; 1A would not.
Any value later stored by action in a program in any particular register will automatically be stored with that register’s default number of decimal places. Remember, the decimal place accuracy of the register storing the data may not be the same as the default accuracy of the number BEING stored. If incoming data has more decimal places than the register was set up for, the excess numbers are truncated, not rounded off. This may affect the accuracy of some of your calculations.
Equations Equations and math operations are used to modify the content of user registers. The values stored in the registers may later be used to change motion parameters during a program, such as index distance, velocity, dwell time, or the number of times an index repeats itself. Equations are assembled using any valid register identifier followed by an equals (=) sign, followed by the operation desired. User registers and constants can be used with any of nine math operators simply by typing them in the Equations Setup screen. You can define up to 16 math equations (numbered Ø through 15) in this manner, each equation having a maximum of 64 characters (including spaces). Once you enter the equation, PCX downloads the equation to the PCM-11 when you exit from the Equations Menu. SQRT takes a single argument which must be enclosed in parentheses, e.g., SQRT(LENGTH). However, this argument may be an expression containing other operations, e.g., SQRT (LENGTH-OFFSET).
The following characters or character strings are the valid math operators: + * / = ^ SQRT ( )
addition subtraction multiplication division equals exponent of a value or register, e.g., Length^3 square root* of a value left paren* right paren*
Math equations are accessed within a program by entering the Program Step Code “M” at the appropriate program step to select Math Function. You then select an equation to execute from the popup list on the screen. After you select the equation, PCX displays part or all of the equation in the description field in the program screen. (See the “Math Equation - M” program function on page 40. The math used in these calculations is 32 bit, fixed decimal point. When numbers with greater resolution than the number of decimal places are used, excess characters are truncated, NOT rounded off. Because of a limit in the memory dedicated to math functions, overflow can occur with heavy use of exponent (^) and SQR- ROOT functions. An overflow condition during program execution is considered a math error.
16
Page 23
PCM-11 Features Equations
If a math error occurs while processing a math equation during program execution, the Program Error Output is turned on but program execution is not interrupted. You can view the following information on the diagnostics screen by pressing the <F10> key: Lengthy and complex The Program Error Output is cleared by the Clear Program Error Input. equations (especially those with exponents and square Equation Setup roots) require significant To enter a math equation for later recall and execution during a program, processing time, as much as 3 select Drive Setup, Define Motion, Programming, Equations. msecs. per equation. Be aware that non-motion steps still go Equations are entered by: through the microprocessor and occupy processing time.
• selecting a User Register for storing the equation results,
• • adding an equals (=) sign, completing the rest of the equation using other register names and math operators.
Figure 13 Equations Screen
If you need to recall the names of the registers you have set up, just press the F1 key and a list will appear on the screen. Although the cursor will highlight one of the names, you will need to press the <Esc> key and manually enter the name of the register you want to work with. If you enter the name of a register that does not exist, a caution screen will appear telling you that PCX couldn’t find that register. You have the opportunity at that point of fixing the error before the equation is compiled and execution is attempted. PCX constantly updates and displays the remaining number of available program steps on the programming screen. PCX 6.5 has the capacity of 1,024 program steps for all programs combined. There are a maximum of 100 programs (numbered Ø through 99), and a limit of 255 steps in a single program.
17
Page 24
PCM-11 Application Module Operator's Manual
Equations use some of this space and the amount taken is shown on the top of the Equations Screen. The amount per equation is shown next to each equation.
User Messages Sixteen unique 32 character (including spaces) user messages may be defined and used in PCX programs to assist in monitoring FX Drive performance and program progress. Each of these messages may be sent to the FX Drive Serial Port “A” along with corresponding numeric data such as following error, current velocity, current position, etc. This allows you to watch program progress in PCX terminal mode to see what program portion triggers specific messages.
Messages Setup Select Drive Setup, Define Motion, Programming, User Messages. A list of all the User Messages now appears with User Message URØØ highlighted. Up to 32 characters may be entered for each message. When finished with your entries, exit the screen by hitting the <Esc>key. Figure 14 Messages Screen
After you have defined your messages you can use them in steps in your program with the “X” command (see “X” - Write to an FX Drive Serial Port function in this section). User Messages can be combined with the contents of User Registers in a serial string and sent to the FX drive serial port “A”.
18
Page 25
Building Your Program User Messages
Building Your Program Indexes are described in the FX Drive Operator’s Installation and Programming Manual, section “PCX Software Setup and Operation” (P/N 400282-00).
Motion Programs are a series of indexes that have been previously set up that you combine with other programming steps to create a motion profile. Each motion program provides a series of movements in conjunction with other machine functions. The movements are used to perform a particular machine operation. Multiple programs can be created using PCX software and stored in the PCM-11, each designed for a different machine function. The PCM-11 is capable of storing up to 256 indexes, 100 motion programs (Ø to 99), and a maximum of 1024 program steps in the non-volatile memory. The number of available programs and average number of steps per program are directly related to each other. The memory is set up such that if you require 100 programs (maximum), each program can have an average of 10 program steps each. If the number of programs is reduced to a minimum, you could have as many as 255 steps in a single program. A motion program is created by entering program functions in the order in which they are to be executed. A motion program is made up of function codes, some of which are listed across the bottom of the PCX program screen. To see the complete list of available codes when you are in the program screen lower half, press the <F1> key. A pop-up screen will display all of the function codes. As you enter steps in a program, the function codes and function data (index numbers, program numbers, dwell times, etc.) are displayed on the program screen so you can easily follow the program sequence. You may use any index or program which you have previously created to build your program. The example motion program shown in Figure 14 could be accomplished with one program; however, two programs have been used to show the use of the Call Program (P) function. In this example, program numbers 1 and 2 are used and index numbers 1, 2, 3, 4, and 5 are used.
19
Page 26
PCM-11 Application Module Operator's Manual
Figure 15 Motion Program Example
Figure 16 and 17 show the program setup screens used to generate the motion program in Figure 15 . The program count determines how many times the program will be executed. In this example the program count for Program 1 is 10. This means everything within Program 1 will repeat 10 times including Program 2. If the program count is set equal to zero, the program will not execute. If the program count is set equal to 65535 or larger, the program will execute indefinitely. The program function codes determine the actual moves to be executed. Each function will be performed in the sequence that is shown in the program screen. Once you enter the sequence, you can download the program to the FX drive by pressing the <Esc> key, or by moving the cursor up to the Program Number position using the arrow keys. The upper left corner of the screen will display a “BUSY” message during the download. Figure 16 Program Example
20
Page 27
Building Your Program C Compound Next Index
In the example shown in Figure 16, Program 1 is the main program and Program 2 is called as a subroutine of Program 1. This call can be seen in step 2 of Program 1. Figure 17 Program Example The program sequence is stored in non-volatile memory under Program 1 and 2 (shown in the upper left portion of the menu screen). After Program 1 has repeated ten times (Program Count =10), the Drive will stop and wait for the next command.
Programming Functions Each program function has a designated single or double letter function code that is used when creating a program. This section describes the functions.
C Compound Next Index The Compound Index feature allows you to link two indexes together without stopping motion between the indexes. You cannot compound into index #0 under any circumstances or into index #63 if you have a PCM-14 on your FX drive.
A Compound Index is an index whose final velocity is not zero, but the velocity of the next index. Because a Compound Index ends by accelerating or decelerating to a velocity, not a dead stop, that compounded index cannot be used again as a regular index. However, identical Compound Index sequences can be repeated in a program. Three Compound Index examples are shown below: Example 1: You can use the Compound Index feature to run special Indexes which have different velocities and distances. In this example, the drive will accelerate at the Index #1 acceleration rate until it reaches the velocity of Index #1. Then, after this distance in Index #1, the drive decelerates at the deceleration rate of Index #1 to the velocity of Index #2, without coming to a stop.
21
Page 28
PCM-11 Application Module Operator's Manual
Figure 18 Compound Index Example #1
The drive will continue at that velocity until it approaches the programmed distance of Index 2, then decelerate at the Index #2 deceleration rate to the Index #3 programmed velocity. It will continue at that velocity until it approaches the programmed distance of Index #3, at which time it will decelerate at the Index #3 deceleration rate and stop. When using multiple compound indexes within the same program, all compound index directions must be the same. The direction of movement is set by the first of the compound indexes and is not scanned again until the next index is initiated that is outside the compound ones.
Example 2: This example is much the same as #1, except in this compound index the drive will accelerate instead of decelerate at the end of each individual index. Figure 19 Example #2, Compound Index Motion Profile
22
Page 29
Building Your Program E End Program
After completing Index #1, the drive will accelerate at the acceleration rate of Index #2 until it reaches the programmed velocity of Index #2. After completing Index #2 the drive will accelerate to the programmed velocity of Index #3 and move at that velocity until it approaches the programmed distance, at which time it will decelerate at the Index #3 deceleration rate and stop. Example 3: Use the compound index feature to turn an output on, then off without stopping motion. Each index is incremental, has a count of 1, and has the same velocity. Figure 20 Compound Index Example #3
Index number 0 may not be used as a compound index sequence.
D Dwell Time The Dwell Time function allows the program to pause for a number of seconds between program functions. Time may be directly entered or recalled from one of the 64 user registers. Minimum time is 1 ms; maximum time is 65.535 seconds.
E End Program This function is used to designate the end of a program. It may be used more than once when using the Jump commands. The END function is also used to terminate programs prior to the last program step.
23
Page 30
PCM-11 Application Module Operator's Manual
F Set Maximum Following Error This function overrides the “Maximum Following Error” which is set up in the “Limits” screen. When the program has completed, Following Error is reset to the value programmed in the Limits screen. This function is often used with the “Q, Set Maximum Torque” function. A large value entered here prevents the drive from faulting out during a “Torque” move.
H Call Home The Call Home function is used to initiate a previously programmed Home Cycle. There are two Home Cycles that can be called within a program.
I Call Index The Call Index function is used to initiate the execution of an index. When this function is used, the index number must also be given. After you enter an index number in the data field, PCX will display that index’s distance and speed.
O Set Outputs Entering “O” in a program step will display a sub-menu in the middle of the program screen. Figure 21 Programmable Output Options
1.
Set PGO pattern. Before this function can be used, you must first assign Output Function #12 “Programmable Outputs” to one or more internal and/or external output lines. This function allows you to change the status of any or all of the programmable outputs you assigned in the output function screen. Once selected, the cursor will move to the data field where zeros that represent the programmable outputs are displayed. The leftmost zero represents the first programmable output line and the others follow in numerical sequence. If you enter a one, that output will be forced on.
24