Fisher Manual: Design VC1000 Programming Manual | Fisher Manuals & Guides

Instruction Manual Form 5656 October 2000
VC1000 Programming Manual
Design VC1000 Programming Manual
Contents
Introduction 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Scope of Manual 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Drive Overview 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User Interface 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Loading and Saving Programs 3. . . . . . . . . . . . . . . . .
System Variables, User Variables,
and Constants 4. . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Variables 4. . . . . . . . . . . . . . . . . . . . . . . . . . .
User Variables 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Constants 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Integer Math 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
More About States 5. . . . . . . . . . . . . . . . . . . . . . . . . . .
Labels 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Actions 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Transitions 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
More Specifics About Working With The Drive System
Selecting, Editing, and Adding a State 6. . . . . . . . . .
Selecting, Editing, and Adding an Action 6. . . . . . . .
Selecting, Editing, and Adding a Transition 7. . . . . .
Programming Standards 8. . . . . . . . . . . . . . . . . . . . . .
Saving and Retrieving Program Files to Disk
Retrieve and Upload a Program Into a Drive 9. . . . .
Download and Save a Program From a Drive 9. . . .
Example—Entering an Application Program
Appendix A—The Start Screen 12. . . . . . . . .
Appendix B—Table of Possible Actions
Appendix C—Table of Transitions 15. . . . .
W7988/IL
6. . . . . . . . . . . . . . . . . . .
Figure 1. Design VC1000 Servo Drive
Appendix D—Table of System Variables
Appendix E—Useful Formulas for the Design VC1000
8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Derivative Gain 19. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Proportional Gain 19. . . . . . . . . . . . . . . . . . . . . . . . . . .
Integral Gain 19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Low Pass Filter 19. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Current 20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Velocity 20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Position Counts 20. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix F—Example Program 21. . . . . . . .
13. . . . . . . . . . . . . . . . . . . . . . . . .
Introduction
The Design VC1000 servo drive is preprogrammed at the factory. Normally,you will not need to reprogram
17. . . . . . . . . . . . . . . . . . . . . . . .
19. . . . . . . . . . . . . . . . . . . . . . .
D102760X012
VC1000 Programming Manual
the servo drive. If you wish to reprogram the servo drive, however, this manual provides the necessary information.
Scope of Manual
This programming manual provides information for setting up and programming the Design VC1000 servo drive (figure 1). You should be familiar with basic programming principles, and understand the desired end result. The Design VC1000 servo drive is a “state machine”, with some unique programming requirements. You do not need to be familiar with “state machine” programming to use this manual. Refer to separate instruction manuals for information about wiring and installation information.
Only personnel qualified through training or experience should install, operate, and maintain a Design VC1000 servo drive. If you have any questions about these instructions, contact your Fisher Controls sales office before proceeding.
Drive Overview
The Design VC1000 servo drive is a digital drive designed to run Type 330SA servo actuators. The actuator contains a brushless DC servo motor, which means there are no motor brushes to wear out. The motor commutation is done electronically by the servo drive, using the resolver inside the actuator housing to provide position feedback to the drive.
The servo drive is microprocessor-based, and therefore programmable. There are two programs running in the drive. The first is the operating system which provides for all the input and output functions, calculates the pulse width modulation to the actuator, and performs all the internal operations of the servo drive. This program is stored in ROM chips inside the drive, and is generally known as firmware. When the drive powers up, the firmware is transferred into RAM and executed from there to improve execution speed.
This programming manual focuses on the second program, which is the application, or user programming. This programming enables the drive to perform the unique functions that you require. The program is stored in nonvolatile “flash” memory, which does not require any battery to maintain the program.
On power up, this program is transferred into RAM and executed from there to improve speed.
User Interface
This programming manual applies to the drive and user interface in Design VC1000 servo drives delivered since the beginning of December 1999.
To access the drive interface, connect a PC to the drive’s serial interface. A cable with a null modem, or a null modem cable is required to make the connection. The PC must be running a terminal program, such as MicroSoft’s HyperTerminal, which is bundled and distributed with Windows95. The communications protocol is 9600 baud, 8 bits, 1 start bit, no parity.
When power is applied, one of three things will happen, depending on the servo drive’s state when it was shut down.
1. The PC will display the “start screen” shown in figure 2. This must be displayed to access and modify the drive programming, so this is the desired screen display. A copy of this screen is also found in Appendix A.
2. If the drive was set to run in the “auto” mode, the drive application program is running and must be stopped. Press the <Tab> key to stop the drive program and the “start screen” in step 1 should be displayed.
3. If the drive was left in the “Expert” prompt mode there may be nothing displayed except a flashing cursor. Press the <Tab> key to stop the drive program (just in case it was running) and type sy pr no
<enter> to put the drive into the “Novice” prompt
mode. This turns full prompting on, and the “start screen” in step 1 should be displayed.
The “start screen,” should now be displayed. This is called the start screen because everything is accessed through this screen. For example, typing program
display states <enter> will cause the drive to
display the machine states programmed into the drive. Actually, only the first two letters of the command are required. In the previous example, pr di st <enter> will also cause the drive to display the machine states programmed into the drive. The command sy pr ex
<enter> puts the drive into the “expert prompt” mode,
which turns off the above menu and limits the prompts displayed. The command sy pr no <enter> puts the drive into the “novice prompt” mode, turning the
2
VC1000 Programming Manual
help (topic) program select|add|edit| (state|action|transition) #index program delete|display (state|action|transition) #index program upload|download|save|load|new|run variable name|#index|? system comm|prompt|axis|screen|echo (value) system io|mu|line|carriage|target|auto (value) system save|load|clear drive #n (flimit|rlimit) (value) drive #n (current|velocity|position) drive #n (external|internal|reference|stop reference) drive #n (master|slaved|user|emulate stepper) drive #n (enable|disable|upload|download|save|load|clear) quit
Figure 2. The Start Screen
above menu and full prompting on. From this point forward, this manual will refer only to two letter commands in the text and examples.
It is important to know that any time you make an error in typing, use the <escape> key to back out and then retype the line. Using the <backspace> key appears to work, but actually the line is being built with backspace characters embedded in it, which will create errors.
Also, several of the menu items refer to a drive #n. The Design VC1000 is a single axis controller, so the drive will always be drive #1. The multi-axis capability was kept in the firmware, anticipating future development possibilities.
Loading and Saving Programs
The memory management feature requires some instruction to use properly. As mentioned previously, the application program is stored in flash memory, but executed in RAM. A program is loaded into RAM by typing pr lo <enter>. Typing pr sa <enter> will save it back into the flash memory. If you edit the program, it is changed only in RAM. If you cycle power to the drive off and on again, the program changes will be lost. If you want the changes saved, you must
type pr sa <enter> to write the program into the flash memory before turning the power off.
Similarly, if you make changes in the drive or the system set up, the dr #1 sa <enter>, and the sy
sa <enter> commands must be executed to save
the changes. If the drive is in the auto mode, it will automatically
load the program out of the flash memory and begin
executing it. The auto mode is set by typing sy au on
<enter>, and it is turned off by typing sy au of <enter>. Typing sy au ? <enter> will cause the
drive to display whether the auto mode is turned on or off. If the auto mode is on and the application program is running, pressing the TAB key will stop the running program.
Loading and saving application files to disk will be addressed later in this manual.
Basic Programming Principles
The servo drive is a state machine. The program flows from one state to another, as directed by the states as they are executed. Each state has a series of actions, which define the function of the state. Each state has at least one transition statement, which directs the program flow. The states are like a series of subroutines which start with a LABEL: and end with a
GOTO statement.
The action statements are executed only once, so loops internal to the state are not permitted. The transition can do conditional branching, so the program flow can be directed into one of several paths. Execution loops external to a state can be formed by having a state’s transition section direct flow to a second state, which then directs flow back to the prior state. Useless infinite loops can be formed this way, so care must be used to provide a proper exit from the loop.
Also, it is possible for the transition section of a state to loop upon itself. This allows the program to execute the actions of a state, but not proceed until the transition is met. For example, the valve program
3
VC1000 Programming Manual
initializes the drive and then disables it. The program then loops on the transition of the state disable until the enable drive command is true. Again, endless loops can be formed this way, so caution must be exercised.
System Variables, User Variables and Constants
The servo drive programming uses two types of variables; system variables and user variables. All variables are global in scope, that is, any variable can be used anywhere, and if it is changed in one state, it is changed for all states.
System Variables
The system variables are used to send data to the hardware and to monitor what is happening in the drive. For example, the variable requested
pos.(#1) holds the position the drive is following.
Changing this variable causes the drive to move the valve plug to a different position. Similarly, the variable
actual pos.(#1) holds the value representing the
actual, or current, valve position. The value can be monitored by the application programming to determine if the valve plug is out of position, and by how much.
The function and definition of the system variables are predetermined by the drive hardware and firmware. Although they are accessible to the application program, their meaning cannot be changed. Following is a brief list of several of the system variables. (A complete list of the system variables is found in Appendix D.)
requested pos.(#1) The target position for the
valve when the drive is in position mode. The value is the number of encoder counts from the reference (zero) position.
actual vel.(#1) The actual valve plug velocity,
which will be different than the requested velocity if the plug is accelerating or decelerating.
Drive Current Command The actual current
command to the actuator. This is useful during the valve plug homing and calibration procedure. The valve is closed in velocity mode. If the drive current command suddenly increases, it can be assumed the valve plug is on the valve seat.
prop. gain(#1) This is the proportional gain, a
tuning parameter. See Appendix E for details on its use.
deriv. gain(#1) This is the derivative gain, a
tuning parameter. See Appendix E for details on its use.
int. gain(#1) This is the integral gain, a tuning
parameter. See Appendix E for details on its use.
feed fwd. gain(#1) This is the feed forward gain,
a tuning parameter. See Appendix E for details on its use.
gain scale(#1) This is gain scale, a tuning
parameter. See Appendix E for details on its use.
integral limit(#1) This is the low pass filter, a
tuning parameter. See Appendix E for details on its use.
Analog Position Input This is the input for the 4
to 20 mA command signal from the control room.
Auxiliary Analog Input This is a secondary
analog input. Its use is not specifically defined, but it can be used as a position feedback to eliminate the homing after a loss of power incident.
A complete list of the system variables is found in Appendix D.
requested vel.(#1) The target velocity for the
valve plug when the drive is in velocity mode. The value is in encoder counts per time period. Currently the time period is one millisecond.
requested cur(#1) The target current when the drive is
in the current mode. The current determines the torque, which determines the force. The value is a number with 0 representing no current and 32678 representing the maximum continous current the drive can produce.
actual pos.(#1) The actual plug position, which
will be different than he requested position if the drive is moving the plug to a new position.
4
User Variables
User variables are defined by the programmer when writing application, or user programs. When entering the actions for a state, the drive system prompts for the variable to use. The variable can be selected by either entering its index number or by typing its name. Whenever a new variable name is entered, the drive’s user interface prompts:
The variable does not exist Press <ESC> if you do NOT want to add it to the list Press <ENTER> to add it to the list
Pressing <ENTER> adds the variable to the list of variables and assigns an index number. Typing va ?
VC1000 Programming Manual
from the start menu displays the variables in the list one screen full at a time. The new variable will have been added to the end of the list.
Constants
Constants used in the program are entered and handled by the user interface as if they were user variables. Whenever a constant is entered, the drive’s user interface prompts:
The variable does not exist Press <ESC> if you do NOT want to add it to the list Press <ENTER> to add it to the list
Pressing <ENTER> adds the constant to the list of variables and assigns an index number. Typing va ? from the start menu displays the variables in the list one screen full at a time. The new constant will have been added to the end of the list.
Integer Math
All variables are 32-bit integers. The range of numbers that can be expressed are ±2,147,483,648. All math is fixed decimal; there are no floating point math routines. When a division operation is performed the result is truncated, so all the values to the right of the decimal point are lost. For example, 10/6 = 1, not
1.66667 and not 2. For this reason, some numbers are prescaled by multiplying by 32 or 64. When the integer math is done, a number that is 32 or 64 times too big is obtained. That number is compensated for in the hardware and firmware, with an effective gain in some decimal points worth of precision.
Also, for this same reason, when math operations are performed, all the multiplication operations possible should be done before the division operations. This reduces the truncation error. For example, refer to the current formula below.
NJ
Current +
If the desired torque is 60%, and the division is performed before the multiplication, the result is zero (60 / 100 =0; 0 * 32,768 =0) instead of 19,660 (60 * 32,768 =1,966,080; 1,966,080 / 100 = 19,660.8; which truncates to 19,660). This may be an extreme example, but it is a worthy example of what may happen if the order of math operations is not done carefully.
PercentĂTorque 32768
100
Nj
More About States
A state consists of three parts: label, actions, and transitions.
Labels
Every state must have a label. The label may be mixed upper and lower case and it may contain spaces. Examples of some typical state labels are: Init0, Set Position Mode, or Not in Foldback. Generally, the label should express in some way what the state does; it makes troubleshooting easier.
Actions
A state does not require any action in the action section. A state may be used solely to perform logical branching. If it does have actions, only one action can be performed per line of the program. For example, two variables can be multiplied together, or one subtracted from another, but subtracting and multiplying operations are not permitted in the same line.
The maximum number of actions in one state is 25 actions.
As mentioned previously, the action statements are executed only once, and then the program execution moves on to the transition portion of the state.
Transitions
At least one transition statement is required for a state. The transition statements allow conditional, or logical, tests and directs the program flow from one state to another, dependant upon the result of the test. For example, the transition of a state to another may depend on the magnitude of a variable, or whether or not an input line is high or low.
Unlike actions, the transition portion of a state may loop upon itself. For example, if a drive fault condition is detected, the program flow may be directed to a state that disables the drive and then loops upon itself until the fault is cleared.
Also, a transition may direct program flow back to the beginning of the state it is in. For example, a state labeled Disable Drive could have a transition statement GOTO STATE Disable Drive NEXT. Of course there must also be at least one other transition statement to provide an exit from this loop.
Also, the order of the transition statements is important. The program evaluates the transition statements in the order given. The first statement that evaluates as True will determine the next state
5
VC1000 Programming Manual
executed. For example, if the state Disable Drive has the transitions, GOTO STATE Disable Drive NEXT; and then the statement GOTO STATE Enable Drive NEXT, IF Faults Flag = 0; the program will never leave the state Disable Drive, even if the variable Faults Flag = 0.
The maximum number of transitions in one state is 25 transitions.
Another unique feature of the hardware and firmware is the sense of the digital inputs is inverted. The inputs are optically isolated and when current is flowing through the isolators LED, the input is considered a logical low. For example, the transition statement
GOTO STATE Enable NEXT, IF INPUT Number2 ON GROUP 0 IS LOW will not test true until there is
current flowing in the opto-isolators LED for digital input DI2.
More Specifics About Working With The Drive System
This portion of the VC1000 programming manual focuses on some of the specifics required to successfully enter, examine or edit an application program.
The section entitled Selecting, Editing, and Adding a State, lists the requirements to access the drive. It is assumed the monitor is displaying the start screen”.
Disable the Auto Run until the program has been fully tested and known to be stable and error free. The Auto Run can be turned ON again by typing sy au 1.
Selecting, Editing, and Adding a State
If the statement pr di st <enter> is typed into the terminal keyboard, the drive will display a table showing the states that have been programmed into the drive. Every state is identified by an index number which is displayed to the left of the states. When the program is executed, the program begins with state #1 and the flow from there depends on the transition statements.
One of the indices has an asterisk (*) beside it, which marks the selected state. If any keyboard instructions are executed to display or edit state content, the selected state will be displayed or edited. For example, if the asterisk is beside state #5, typing pr di ac
<enter> will cause the actions of state number 5 to
be displayed on the terminal monitor. Typing pr di
tr <enter> will cause the transitions of state
number 5 to be displayed. The state is selected by typing pr se st #n
<enter>, where n represents the index of the desired
state. Note that the # must be typed. For example, typing pr se st #5 <enter> will select state number 5.
Once selected, the state remains the selected state until another state is specifically selected. Running an application program resets the selected state to index #1.
CAUTION
Before entering or editing an application
program, turn the Auto Run feature off to
avoid creating a possible infinite loop.
A word of caution needs to be added here. Before entering or editing an application program, turn the Auto Run feature off. Typing sy au <enter> will cause the drive to display if the Auto Run feature is ON or OFF. The auto run is turned OFF by typing sy au 0.
The reason for doing this is that it is possible to put the drive into an infinite loop where the only way to exit the loop is to turn off the power, wait a few seconds and then turn the power back on. If the Auto Run feature is ON, and if the program had been saved, the defective program will reload and begin execution again. If the program goes into an infinite loop again, you will not be able to edit the program to fix the program problem.
6
A state can be deleted by typing pr de st #n
<enter>, where n is the index for the state to be
deleted. For example, pr de st #5 <enter> will delete state number 5.
A state can be added by typing pr ad st #n, where
n is the index of the state to be added. You will be
prompted to type in the name of the state being added. If n is less than the total number of states already defined, the new state will be inserted at the point indicated by the new state number. For example, pr
ad st #4 <enter> will add a state number 4. If
there were already 5 states defined, the old state number 4 will become state number 5 and the old state number 5 will become state number 6.
Selecting, Editing, and Adding an Action
If the statement pr di ac <enter> is typed into the terminal keyboard, the drive will display a table showing the actions that have been programmed into the drive for the selected
state. Every action is
VC1000 Programming Manual
identified by an index number which is displayed to the left of the actions. When the state is executed, the program begins with action #1 and executes the remaining actions in the order displayed.
An action can be deleted by typing pr de ac #n
<enter>, where n is the index for the action to be
deleted. For example, pr de ac #5 <enter> will delete action number 5 of the selected state.
An action can be added by typing pr ad ac #n
<enter>, where n is the index of the action to be
added. If n is less than the total number of actions already defined, the new action will be inserted at the point indicated by the new action index number. For example, pr ad ac #4 <enter> will add an action number 4. If there were already 5 actions defined, the old action number 4 will become action number 5 and the old action number 5 will become action number 6.
After typing pr ad ac #n <enter>, a list of all possible actions will be listed, one screen at a time, with each possible action identified by a numerical index. You will be prompted to type in the index of the action on that list, which is being added to the selected state. For example, typing pr ad ac #n <enter> and when prompted typing #3 <enter>, you would then be prompted for the variable name you want the result in and then for the two variables you want to add together. Thus an action statement is built up by the drive operating system.
As you work with the program you will notice that the variables are also identified by a index number. Once the variable has been defined, the index number can be typed in its place to use the variable. The actual variable name will show in the program listing.
When prompted for the second variable or constant,
type #49 <enter>
At this point the system returns to the start screen. If the command pr di ac <enter> is typed in, you will see that action number 4 is displayed as:
MULTIPLY: requested pos.(#1) = temp *
32768.
Editing an action works the same way. Type pr ed
ac #n <enter>, where n is the index of the action
you wish to edit. You will be prompted to enter the definition of the action just as when adding an action.
Remember, when altering the program actions, only the program in active RAM is being altered. If you wish to save the changes, type pr sa <enter>, to transfer the program into the flash memory, before shutting down the drive.
Selecting, Editing, and Adding a Transition
Working with transitions is similar to working with actions. If the statement pr di tr <enter> is typed into the terminal keyboard, the drive will display a table showing the transitions that have been programmed into the drive for the selected identified by an index number which is displayed to the left of the transitions. When the state is executed, the program begins with transition #1 and executes the remaining transitions in the order displayed. If the conditions of the test in a line tests true, the transition action is taken. If no transition condition tests true, the last transition in the list will be taken.
state. Every transition is
For an example of how a typical statement is entered, multiply the variable temp by 32768 and store the results in variable requested pos.(#1). Furthermore, the action is being added as action # 8 in state #4. The index of the multiply action is #5. Also assume variable temp is variable index #66, constant 32768 is variable index #49 and requested pos.(#1) is variable index #1. The sequence of commands typed into the terminal keyboard is:
pr se st #4 <enter>
pr ad ac #8 <enter>
When prompted for the action, type #5 <enter> When prompted for the result variable, type #1
<enter>
When prompted for the first variable or constant, type
#66 <enter>
A transition can be deleted by typing pr de tr #n
<enter>, where n is the index for the transition to be
deleted. For example, pr de tr #5 <enter> will delete transition number 5 of the selected state.
An transition can be added by typing pr ad tr #n
<enter>, where n is the index of the transition to be
added. If n is less than the total number of transitions already defined, the new transition will be inserted at the point indicated by the new transition index number. For example, pr ad tr #4 <enter> will add a transition number 4. If there were already 5 transitions defined, the old transition number 4 will become transition number 5 and the old transition number 5 will become transition number 6.
After typing pr ad tr #n <enter>, a list of all possible transitions will be listed, one screen at a time, with each possible transition identified by a numerical index. You will be prompted to type in the index of the transition on that list which is being added to the
7
VC1000 Programming Manual
selected state. For example, typing pr ad tr #n
<enter> and when prompted typing #3 <enter>,
you would then be prompted for the state name you want the program to go to. Thus a transition statement is built up by the drive operating system.
For an example of how a typical statement is entered, go to state Seat Found if the commanded current exceeds the seat current limit value. The index number for the transition IS GREATER is #31. The index number for Seat Found is #10. The commanded seat current is the variable Drive Current Command and its variable index is #46. The seat current limit is variable DAC Seat Current and its variable index is #81. Furthermore, the transition is being added as transition # 8 in state #9. The sequence of commands typed into the terminal keyboard is:
pr se st #9 <enter>
pr ad tr #8 <enter>
When prompted for the transition, type #31 <enter> When prompted for the variable to test, type #46
<enter>
define are the application specific information such as tuning parameters, stroke length, resolver counts per revolution, actuator lead-screw pitch, maximum actuator speed, and so forth. If the number of action statements required exceeds 25 statements, the last statement should be a comment indicating there are more user parameters in the next state. The concept here is to put all the variables and parameters that might be altered or adjusted in the field in one place.
All the user variables (variables with an index number greater than 45) must be defined or initialized at the beginning of the program. Use states labeled Init1,
Init2, etc., to perform the initializations not done in Init0. Typically these will be system flags, and
converting the user input variables from Init0 into numbers the servo drive uses. Some of the useful conversion formulas are found in Appendix D.
The first line of Init0 must be a comment line with the program name. The second line must be a comment with the name or initials of the person who wrote the program and the date it was written. The third line, must be a comment showing the Revision level, the initials of the person who revised it, and the date of the revision.
When prompted for the test variable or constant, type
#81 <enter>
At this point the system returns to the start screen. If the command pr di tr <enter> is typed in, you will see that transition number 8 is displayed as:
GOTO STATE Seat Found IF Drive Current Command > DAC Seat Current
Editing a transition works the same way. Type pr ed
tr #n <enter>, where n is the index of the
transition you wish to edit. You will be prompted to enter the definition of the transition just as when adding a transition.
Remember, when altering the program transitions, only the program in active RAM is being altered. If you wish to save the changes, type pr sa <enter>, to transfer the program into the flash memory, before shutting down the drive.
Programming Standards
There are very few programming standards that need to be adopted to improve readability and troubleshooting.
All the user variable parameters should be defined in the first state to be executed (state index #1), and the state should be labeled Init0. The parameters to
The fourth line must be a printed text line displaying the Fisher part number for the application program and revision level. It is also recommended a fifth line be added which will display a brief description of the program function.
For example, the first five lines of Init0 might look like:
/* ACME Fuel Valve
/* DJW 12/15/99
/* Rev C, DJW 6/26/00
PRINT: 14B4002X012 Rev C
PRINT: ACME Fuel PN2201-38 Rev A
Saving and Retrieving Program Files to Disk
Application programs can be saved to disk or recalled from disk and loaded into the drive. The drive operating system does not have the capability to do this directly. An IBM compatible PC must be connected to the servo drive via a serial cable with a null modem, or a null modem cable. Most likely this can be the same computer used to program the drive
8
VC1000 Programming Manual
because the interconnection requirements are the same.
Retrieve and Upload a Program Into a Drive
Connect a PC to the drive’s serial interface. Using a terminal program, get the drive running so the start screen is displayed. Quit the terminal program by closing the terminal program. Do Not type qu
<enter> as this will stop the drive, and the drive
must be running to perform the rest of this procedure. Execute the program VC1000a.exe on the PC. This
causes the PC to display a screen that looks like the start screen. At this point the PC is emulating many of the servo drive functions.
Set serial communication to port COM1: by typing sy
co #1 <enter>.
Retrieve an application program from disk and load it into the PC by executing the commands pr lo
<enter>. You will then be prompted:
Do you want to load the program?
Press <ESC> to cancel or
<Return>to begin loading:
Press <enter> and you will be prompted:
At this point, all the data uploaded is in the servo drives RAM memory, but has not been permanently stored. To save the data, quit the program
VC1000.exe. Restart the terminal program and the
familiar start screen will be displayed. Save the program by typing pr sa <enter>. Save the system parameters by typing sy sa <enter>. Save the drive parameters by typing dr #1 sa <enter>.
You may wish to have both the terminal program and the VC1000.exe programs running on the PC at the same time, but it cannot be done. If both are running, they get confused with each other during the data transfers and either the transfer will not occur, or the data is corrupted during the transfer. Have only one program running at a time, as mentioned above.
Download and Save a Program From a Drive
Connect a PC to the drive’s serial interface. Using a terminal program, get the drive running so the start screen is displayed. If the program to be saved onto disk is still in the flash memory, type pr lo <enter> to transfer the program into RAM. Type sy lo
<enter> to transfer the system parameters into RAM,
and type dr #1 lo <enter> to load the drive parameters into RAM.
Quit the terminal program by closing the terminal program. Do Not type qu <enter> as this will stop the drive, and the drive must be running to perform the rest of this procedure.
- Recalling program from a file
What file do you wish to read?:
Type in the file name, including the path if required. For example, to read a file called FISHER01 from drive A, type A:FISHER01 <enter> The program file is recalled from disk and loaded into the PC memory.
Execute the upload command by typing pr up
<enter> and the program data is transferred to the
servo drive. Similarly, drive setup parameters can be recalled from
disk and uploaded to the servo drive. Assuming the program VC1000a.exe is still running on the PC and the communications port is still COM1:, execute the command dr #1 lo <enter> to load the drive parameters into the PCs RAM. Execute the command
dr #1 up <enter> to transfer the drive parameters
into the servo drive. Notice that this command never asks for a file name or path. The file transferred is named Drive1.sys and is located in the same directory as the VC1000.exe program.
Execute the program VC1000.exe on the PC. This causes the PC to display a screen that looks like the start screen. At this point the PC is emulating many of the servo drive functions.
Set serial communication to port COM1: by typing sy
co #1 <enter>.
Execute the program download command by typing pr
do <enter> and the program data is transferred from
the servo drive to the PC. Type dr #1 do <enter> to transfer the drive parameters from the drive to the PC.
The application program can now be saved to a disk by executing the commands pr sa <enter>. You will then be prompted:
Do you want to save the program?
Press <ESC> to cancel or
<Return>to begin saving:
Press <enter> and you will be prompted:
9
VC1000 Programming Manual
- saving program to a file What file do you wish to use?: Type in the file name, including the path if required.
For example, to save a file called FISHER01 to drive A, type A:FISHER01 <enter> The program file is transferred from the PC memory onto the disk.
Similarly, drive setup parameters can be stored on disk. Execute the command dr #1 do <enter> to transfer the drive parameters into a disk file. Notice that this command never asks for a file name or path. The file transferred is named Drive1.sys and is located in the same directory as the Simacon.exe program.
Again, you may wish to have both the terminal program and the VC1000.exe programs running on the PC at the same time, but it cannot be done. If both are running, they get confused with each other during the data transfers and either the transfer will not occur, or the data is corrupted during the transfer. Have only one program running at a time, as mentioned above.
must be possible to temporarily disconnect the second jumper, so some type of switch could be a part of this connection. In normal usage, the connection is closed to enable the drive. If the drive becomes disabled for any reason, the jumper connection must be broken and re-established to re-enable the drive.
Power up the PC and get the terminal program running. (See the section entitled The User Interface) Apply power to the servo drive. At this point the start screen should be seen on the PCs display. Turn off the auto run feature if it is on. Type sy au 0
<enter> to turn the auto run feature off. (See the
section entitled More Specifics About Working With the Drive System.)
The program is entered by typing commands into the PC keyboard. The first step is to declare the states for the program. The states must be established first by adding a state and then naming it. Later, the actions and transitions are added to the state. For example, to add the state Init0, the command pr ad st
#1<enter> is typed. The drive prompts:
State is ** New State **.
Press <ESC> to cancel or Enter the name of the state:
Example—Entering an Application Program
Following is an example of how to enter a drive program. The example program is found in Appendix F. Included is a state diagram to show the program flow and a description of the function of each program state. The programs function is to control a valve where the valve plug is pushed down to close the valve, which means the actuator extends to close the valve.
If starting with a new drive, without any programming loaded in it, hook up the personal computer that will be used to enter the program to the serial port of the computer and the serial port of the drive. Remember that the cable must be a null-modem type that switches pins 2 and 3 at one end of the cable, or a null modem must be used as part of the interconnection. (See the section entitled The User Interface). Connect a power cable to the “L1/DC+”, “L2/DC–“, and “ground” terminals, as appropriate for the power being used. An actuator does not need to be connected to the drive to program it, but a valve and actuator must be connected to the drive to test the programming.
The name Init0 <enter> is typed in. The state is now declared and named, and ready for the actions and transitions to be defined. States can be added and edited in almost any order. A new state can be inserted between two existing states. Note that the program execution always begins with state number 1.
To add actions, select the desired state and then type the add actions command and the action index number. The drive will prompt you, depending on the action being added. For example, using the example program, lets say we want to add action #8 of state Init0. It is assumed actions 1 through 7 have already been added. The state is selected by typing pr se
st #1 <enter>. Add action #8 by typing pr ad ac #8. The drive will display a list of actions (See
Appendix B). The SET action is index #2 so following the servo drive prompting type #2 <enter>. The drive will display a list of variables and prompt for the index of the variable to assign the valve to. The variable has not been defined yet so type Stroke
<enter>. The drive prompts:
The variable does not exist.
Press <ESC> if you do NOT want to add it to the list Press <ENTER> to add it to the list:
A jumper must be placed between the I/O Common and the 24V Common on the input connector. Another jumper must be connected between the Isolated +24VDC and DI2 of the input connector. It
10
Type <enter> again to establish the new variable name. The drive then prompts for the value to assign to the variable. The value to enter is the constant –1125 because the stroke length is 1.125 inches, and
Loading...
+ 22 hidden pages