Cam systems are used in a wide variety of different systems to control output devices. For example, in industrial control systems, cam systems are commonly used to control the operation of one or more output devices responsive to the operation of one or more other devices. For example, in one configuration cam systems are used to control output devices responsive to the operation of a motor. In such a configuration, the cam system may be used to synchronize the operation of the output devices to the operation of the motor, such that the output devices assume different output states in accordance with the real time position of the motor shaft. Therefore, for example, as a product moves on a conveyor belt, a cam system may be used to control the output devices responsive to motor position so as to cause certain actions to be taken at predetermined locations along the conveyor belt. Rather than use motor position as the motion control axis, another motion control axis may also be used, such as an axis more directly associated with the device driven by the motor. Other configurations are also possible.
Early cam systems were mechanically implemented, such as a camshaft used in an internal combustion engine system. With the development of digital signal processing technology, including microprocessor technology, cam systems are now widely electronically implemented. Electronic implementation of cam systems is advantageous because it allows more complex relationships between a larger number of devices to be defined. However, as the complexity of cam systems increases, there is an increased need for improved cam systems and related programming tools that are easy to use, flexible, and/or capable of allowing increasingly complex relationships to be defined and monitored. Output cam systems and methods that preferably meet one or more of these needs would be highly advantageous.
In accordance with a first preferred embodiment, A programming interface for a control system comprises a display region that provides a representation of a plurality of output cam profiles. The representation provides information concerning latch/unlatch operations of a plurality of cam elements that control on/off states of a plurality of output devices and that form the plurality of output cam profiles.
It should be understood that the detailed description and specific examples, while indicating preferred embodiments of the present invention, are given by way of illustration and not limitation. Many modifications and changes within the scope of the present invention may be made without departing from the spirit thereof, and the invention includes all such modifications.
Various preferred embodiments of the invention will now be described. Although the invention is described by way of example in the context of an industrial control system, it will be appreciated that the invention may be employed in other types of systems as well.
A. System Architecture
Referring now to the Figures,
In one embodiment, the building blocks 12-18 are implemented using objects in an object-oriented programming language. Thus, the axis block 12 may be implemented using an object having services that may be invoked using one or more axis instructions, and the output cam block(s) 14 may be implemented using an object having services that may be invoked using one or more output cam instructions. Further, each of the motion blocks 18 may be implemented using objects (e.g., a jog object, a move object, a time cam object, a gear object, and a position cam object) having services that may be invoked using one or more respective instructions (e.g., a jog instruction, a move instruction, a time cam instruction, a gear instruction, and a position cam instruction). In designing such a system, a new instance of the axis object may be created to represent a motion control axis (e.g., an electric motor, a shaft or other device driven by an electric motor, and so on). New instances of the output cam object may be created to represent new output cams. An axis instruction may then be incorporated in the user program to invoke the services of one of the axis objects, an output cam instruction may be incorporated into the user program to invoke the services of the output cam object, and so on. The axis and output cam instructions may then be executed by a microprocessor-based control unit, for example, to control movement of the motion control axis and to control one or more output devices responsive (directly or indirectly) to a position (e.g., absolute position, relative position, delta position, etc.) of the motion control axis, respectively. If an object-oriented approach is used, the axis instruction controls movement of the motion control axis by utilizing the services of the axis object, and the output cam instruction controls the state of one or more output devices by utilizing the services of an output cam object. Of course, it should be understood that these features, and all of the other features described herein, may also be implemented without using object-oriented techniques.
Referring now also to
The axis block 12 controls the motor 44 responsive to inputs from the jog block 18, the move block 20, the time cam block 22, the gear block 24, and the position cam block 28. The jog block 18 permits the user (via a jog instruction) to specify a new velocity at which the shaft of the motor 44 is to move. The move block 20 permits the user (via a move instruction) to specify a new position for the shaft of the motor 44. The time cam block 26 permits the user (via a time cam instruction) to specify an axis position profile which specifies axis position as a function of time. The gear cam block 28 permits the user (via a gear instruction) to specify an electronic gearing relationship between the shaft of the motor 44 and the shaft of another motor (not shown) in the system 10. The position cam block 26 permits the user (via a position cam instruction) to specify an axis position profile which specifies axis position for the shaft of the motor 44 as a function of a position of the shaft of another motor (not shown) in the system 10. In the case of the gear block 28 and the position cam block 30, it will be appreciated that these blocks will receive inputs from other axis blocks similar to the axis block 12, which may in turn receive inputs from motion blocks similar to the motion blocks 18. It is therefore seen that the complexity of the motion control system 10 can be increased by providing multiple axes (and therefore multiple motors or other devices) and defining various relationships between the axes. Also, as described below, the number of output cam blocks 14 is not limited in any way. Other blocks, objects, and instructions may also be used.
As shown in
The axis block 12 is coupled to the output cam blocks 14, which are in turn are coupled by way of the output blocks 16 to the output devices 50. Each output cam block 14 comprises control logic that is stored and executed in the controller module 40 (or other microprocessor-based control unit) and that is used to control output states of the output devices 50. The output block 16 may, for example, be a bit in memory that represents the desired output state of one of the output devices 50. The output module 48 may comprise one or more output circuits (not shown) coupled between the bits in memory and the output devices 50. The output cam block 14 is operative to receive information regarding motor position from the feedback device 46, and use the position information to control the output states of the output devices 50 in a predetermined manner. Typically, the operation of the output devices 50 will at least to some extent be cyclic, and the output cam block 14 synchronizes the operation of the output devices 50 to rotation of the shaft of the motor 44 (or to movement of a device driven by the shaft of the motor 44). Control of one output device 50 responsive to axis position is shown in
In practice, each output cam block 14 is responsible for one output block 16, which may comprise a predetermined number of output bits, such as thirty-two output bits. As will be described below, each single output bit can be programmed separately with an output cam profile, and compensated for position offset and time delay. Therefore, each output block 16 may be connected to thirty-two different output devices 50.
Also shown are input devices 54 and additional output devices 56. The I/O devices 54 and 56 are coupled to the I/O module 48, but are not controlled by any output cam block 14. Thus, the output cam block 14 is capable of implementing output cam control over output devices 50 that are connected to the same I/O module 48 as other output devices 56 in the system.
A variety of techniques may be used to transmit control signals to the output device 50 in response to output cam processing by the output cam block 14. In one configuration, the controller module 40 maintains an I/O image table for each of the input/output devices to which it is connected. When the output cam block 14 determines that the output device 50 should be turned on, the output cam block 14 turns on a bit in the I/O image table, and the controller module 40 sends a message by way of a communication network 47 to the I/O module 48 to cause the output device 50 to turn on. The communication network 47 may, for example, be a network implemented using a back plane of a rack that houses the modules 40 and 52, a remote I/O network, or other suitable network. In this regard, it may be noted that the output cam block 14 is embedded in the controller module 40, which also controls the other output devices 56 that are not controlled using output cam functionality. The other output devices 56 may be connected to the I/O module 48 or to other output modules that operate under the control of the controller module 40. Therefore, when the message is sent from the controller module 40 to the I/O module 48 that causes the output device 50 to change state, this state change message is typically sent as part of a larger message that also includes control signals for the other output devices 56 connected to the I/O module 48. Typically, in some existing programmable controller systems, I/O messages are sent between a controller module and an output module once per update cycle, which is typically in a range of milliseconds to tens of milliseconds. Therefore, assuming a message of this type is used in the configuration of
In another embodiment, in order to improve accuracy, the controller module 40 sends the I/O module 48 a state change scheduling message to schedule when one of the output devices 50 should be turned on and off, and the I/O module 48 is responsible for controlling the precise instant at which the output device 50 changes state. In this configuration, the message that is sent to the I/O module 48 includes a time stamp that instructs the I/O module 48 when to change the state of the output device 50. The controller module 40 and the I/O module 48 have a common understanding of time, that is, their clocks are synchronized with a high degree of accuracy. In one configuration, the I/O module 48 further subdivides the update cycle into sub-update cycles, and the output cam operation is assigned to be performed during one of the sub-update cycles in accordance with the time stamp (that is, the operation is assigned to a time slot best representing its relative desired position within the update cycle). This allows the I/O module 48 to change the state of the output device 50 between I/O messages from the controller module 40. This also allows multiple cam events for a single output device 50 to be processed each update cycle, because each event can be assigned to an appropriate sub-update period. In this configuration, using current programmable controller technology, the output module 50 is able to change the state of the output device 50 to an accuracy in the range of tens to hundreds of microseconds.
Referring now to
The output cam module 52 provides input and output updates through the standard I/O connection. As a result, the inputs and outputs are readily available for user access in a manner similar to the one of the output module 48.
In the preferred embodiment, therefore, the output cam block 14 is fully integrated into the motion control system 10. The output cam instructions (described below) associated with the output cam block 14 may be in the same user program as the axis motion control instructions associated with the axis block 12 and the motion blocks 18. Each of these instructions may be, for example, instructions available to a user in a common ladder logic programming language. Therefore, a single programming interface on a single computer may be used to program the axis block 12 (along with the motion blocks 18) and the output cam block 14. It is not necessary to program the axis block 12 and the output cam block 14 using two unrelated different programming interfaces on different computers. This also facilitates troubleshooting, because the operation of the axis block 12 and the motion blocks 18 preferably can be monitored and debugged simultaneously with the operation of the output cam block 14 and the output devices 50, and because the programming interface that is used to program the blocks 12-18 preferably resides on a single computer. Monitoring and debugging are also simplified because the output cam logic preferably operates in a common time reference as the axis motion control logic.
Additionally, integration of the output cam block 14 into the motion control system 10 facilitates coordinating arming and disarming of an output cam with the same control logic that controls the motion control axis. Therefore, there is no need to transmit messages back and forth between two separate pieces of control logic. This results in an ability to time output cam arming and disarming more accurately and in a manner which is more responsive to system conditions. Likewise, compensation of camming operations is easier to adjust during execution of the user program. The current position of the motion control axis may be monitored and adjustments in compensation may be timed more accurately.
Further, it may be noted that the block diagram of
Moreover, it may be noted that the arrangement shown is readily scalable. Although the motion control system of
Finally, the arrangement shown is integrated from a data standpoint, and this results in minimal hardware. In the embodiment of
Referring now to
B. Output Cam Programming
1. Instructions
Referring now to
In the preferred embodiment, the output cam instructions comprise two instructions: an arm output cam instruction 110 (
If an object oriented approach is used, then in addition to the services that objects available in an object-oriented programming interface typically offer (create instance, delete instance, etc.), the output cam object preferably offers an arm service, an update service, and a disarm service. The arm service is invoked by the arm output cam instruction 110, and details of this service will become apparent from the discussion of the details of the arm output cam instruction 110, below. Executing the arm output cam instruction 110 is sometimes referred to herein as initiating an output cam. The update service is invoked after the arm output cam instruction 110 has been executed and before the disarm output cam instruction 150 has been executed. The update service is invoked at regular update cycles, and is responsible for performing latch and unlatch operations at each update cycle. The disarm service is invoked by the disarm output cam instruction 150, and details of this service will become apparent from the discussion of the details of the disarm output cam instruction 150, below. Executing the disarm output cam instruction 150 is sometimes referred to herein as terminating an output cam. The arm output cam instruction 110 is then executable to control one or more output devices responsive (directly or indirectly) to a position (e.g., absolute position, relative position, delta position, etc.) of the motion control axis. In the context of an object-oriented environment, this occurs by virtue of the arm output cam instruction 110 utilizing the arm and update services of an output cam object. The attributes of the output cam object may indicate, for example, whether an output cam has been initiated, whether an output cam is pending, whether an output cam position is locked to another axis such as a master axis, and whether an output cam is transitioning between pending status and active status.
The axis operand 112 specifies the position input to the output cam. As previously indicated, there may be multiple axis blocks 12 in the motion control system 10, and the purpose of the axis operand 112 is to specify which one of the axis blocks 12 is to be used as a position input to the output cam. If the output cam instruction 110 is to be executed by the controller module 40, the axis operand 112 can be assigned to be a servo, feedback only, virtual, or consumed axis. If servo axis is selected, the axis block 12 corresponds to a servo drive, motor and/or load, and feedback device of the type shown with reference numbers 42, 44, 45 and 46 in
The ability to support multiple axis types is advantageous. For example, because the servo axis is supported, the output cam block 14 can utilize commanded position values for position information rather than feedback information from the feedback device 44. Also, the ability to specify servo axis avoids the need to specify feedback only (and thus avoids the need for additional hardware) in some instances. Moreover, because the feedback only axis type is also supported, the output cam instruction 110 can be executed by the output cam module 52, which receives position feedback from the motor 44 but does not control the motor 44. Thus, if the output cam instruction 110 is to be executed by the output cam module 52, the axis operand 112 may be assigned to be a feedback-only axis and to an axis assigned to the output cam module 52. Further, because the virtual axis is supported, the output cam block 14 may be synchronized to the same common source of position reference values as used by axis blocks of the system 10.
The execution target operand 114 specifies a specific output cam from the set that is connected to the axis specified by the axis operand 112. As previously indicated, there may be multiple axis blocks 12 in the motion control system 10 and, for each of the axis blocks 12, there may be one or more output cam blocks 14. The purpose of the execution target operand 114 is to specify which one of the output cam blocks 14 is to execute the arm output cam instruction 110. Of course, the output cam block 14 specified by the operand 114 should be connected to the axis block specified by the operand 112. Based on the value assigned the execution target operand 114, the output cam block 14 may either be an output cam block that is implemented using control logic that is executed in the controller module 40 or an output cam block that is implemented using control logic that is executed in the output cam module 52. Alternatively, the execution target operand 114 may specify an output cam block that is implemented using control logic that is executed in the motion control module 60 of
The motion control operand 116 stores status information during execution of the arm output cam instruction. This information includes whether execution is in process, error information, and so on. The operand is another variable in the system 10 that can be examined by other parts of a user program used to provide initiation and run-time status information as the arm output cam instruction 110 executes.
The output operand 118 is a predetermined number (e.g., thirty-two) of output bits that can be set and reset depending on the specified output cam. As previously indicated, each output cam block 14 is responsible for one output block 16, which comprises a predetermined number (e.g., thirty-two) of output bits, which can be a memory location or a physical actuator output. The output operand 118 specifies which output bit/device is to be affected by the execution of the arm output cam instruction 110.
The input operand 120 is a predetermined number (e.g., thirty-two) of input bits that can be used as enable bits to control operation of the specified output cam. As will be described below, the latching/unlatching of an output device 50 may be controlled using an enable bit as an input. The input operand 120 permits the input bit that is to be used as an enable bit to be specified. The input can be either a memory location or a physical input from a sensor or other device.
The output cam operand 122 is an array of output cam elements that allows the latch/unlatch behavior of an output bit/device to be configured. A cam element comprises a latch/unlatch combination for an output bit. The number of cams per output bit/device defines the size of this array. For execution by the controller module 40, the array size is limited by the available memory of the controller module 40. For execution by the output cam module 52, the array size is limited by the available memory of the output cam module 52. For execution by the controller module 40, changes to the output cam will take effect immediately. For execution by the output cam module 52, changes to the output cam takes effect at the execution of an arm output cam instruction 110. The output cam operand 122 is described in greater detail below.
The cam start position operand 124 and cam end position operand 126 define the left and right boundary of the output cam range. When the cam position moves beyond the cam start or cam end position, the behavior of the output cam is defined by the execution mode operand 130 and the execution schedule operand 132, described below. Changes to the cam start or cam end position take effect at the execution of the arm output cam instruction 110.
Preferably, the cam start position and the cam end position may be specified using floating point numbers. The use of floating point numbers is advantageous because it increases the range of values that may be represented, and allows the resolution of the numbers to be automatically re-scaled depending on the exponent. The use of floating point values allows values to be specified with precision regardless of motor speed. Also in the preferred embodiment, the cam start position and the cam end position may be specified in terms of “user units.” For distance, for example, a user unit may be the length of one package. This avoids the need for the user to specify distance in terms of encoder counts, for example, which may be less intuitive for the user. Preferably, floating point values and user units are used wherever time/distance values are specified.
The output compensation operand 128 is an array of output compensation elements. The array indices correspond to the output bit numbers. The number of the highest compensated output bit defines the minimum size of this array. In the case of execution by the controller module 40, changes to the output compensation will take effect immediately. In the case of execution by the output cam module 52 changes to the output compensation will only take effect at the execution of the arm output cam instruction 110. The output compensation operand 128 is described in greater detail below.
The execution mode operand 130 allows the execution mode to be selected. Depending on the selected execution mode, the output cam behavior may differ, when the cam position moves beyond the cam start or cam end position. The available execution modes include the following modes: once, continuous, and persistent. For the once mode, after the cam position moves beyond the cam start or cam end position, the output cam is disarmed and the process complete bit of the motion instruction is set. For the continuous execution mode, after the cam position moves beyond the cam start or cam end position, the output cam continues on the opposite side of the output cam range. For the persistent execution mode, after the cam position moves beyond the cam start or cam end position, the output cam is disarmed. However, when the cam position moves back into the output cam range the output cam is rearmed. Persistent mode therefore provides support for machine motion which moves in one direction, stops, then moves in the reverse direction performing the same operations in both directions. Thus, the arm output cam instruction 110 provides support for multiple output cam execution modes.
The execution schedule operand 132 allows different execution schedules to be selected that determine when an output cam block 14 (including individual cam profiles) associated with the output cam instruction 110 is to be armed. The available execution schedules include immediate, pending, forward only, reverse only, and bidirectional. For the immediate execution schedule, the output cam is armed immediately. For the pending execution schedule, the output cam is armed when the cam position of an armed output cam (i.e., a currently executing output cam) moves beyond its cam start or cam end position, thereby causing the output cam to be armed after execution of the currently executing output cam is complete. For the forward only execution schedule, the output cam is armed when the axis approaches or passes through the specified axis arm position in the forward direction. For the reverse only execution schedule, the output cam is armed when the axis approaches or passes through the specified axis arm position in the reverse direction. For the bidirectional execution schedule, the output cam is armed when the axis approaches or passes through the specified axis arm position in the forward or reverse direction.
The execution schedule operand 132 therefore provides flexibility to select different execution schedules, allowing the user to dynamically schedule profile changes to accommodate changes in product, machine operation, and so on. The option to select a pending execution schedule in particular supports dynamic changes to cam operation. For example, some packaging machines are designed to support dynamic changes to product size. When the product size changes, the output cam profiles typically also change. With the execution schedule operand 132, the output cam can be armed immediately, or armed based on axis position and direction (forward only, reverse only, or bi-directional), or armed when a currently executing output cam profile completes (pending). In the case of a pending execution schedule, the arm output cam instruction 110 is allowed to pend prior to product reaching a specified axis position, and then automatically arms when the current output cam instruction completes.
The axis arm position operand 134 defines the axis position where the output cam is armed, if the execution schedule operand 132 sets the execution schedule to either forward only, reverse only, or bi-directional and the axis moves in the specified direction. The cam arm position operand 136 defines the cam position that is associated with the axis arm position, when the output cam is armed. As described below, cam element position is preferably maintained separately from axis position, and the delta position of the motion control axis is monitored to ensure that the cam position moves at the same rate as the axis position. Changes to the axis arm or cam arm position will only take effect at the execution of the arm output cam instruction 110. Operation of the axis arm position operand 134 and the cam arm position operand 136 is shown in
The reference operand 138 allows a position reference to be selected such that the output cam is connected to either the actual position of an axis (as measured by a feedback device such as the feedback device 46) or the command position of an axis (as commanded by a motion controller responsive to inputs from one of the motion blocks 18). Thus, the user is provided with the added flexibility to select actual or commanded position reference when processing output cams. This is beneficial during startup and shutdown when machines operate at very slow speeds. During this time, output cam functionality is armed and outputs are affected. Due to the slow speed, actual feedback jitter affects cam operations by turning the outputs on/off multiple times as the actual position moves through cam latch and unlatch positions. This is an undesirable behavior for many of the output devices controlled by output cams. Allowing the user to select commanded position as the output cam reference eliminates jitter in output devices, because a commanded position value does not experience feedback jitter to the extent that the actual feedback position value experiences jitter. As an alternative, a built-in filter may be used to reduce jitter when monitoring actual position.
Referring again to
The disarm output cam instruction 150 has the following operands: an axis operand 152, an execution target operand 154, a motion control operand 156, and a disarm type operand 158. The axis operand 152 of the disarm output cam instruction 150 is similar to the axis operand 112 of the arm output cam instruction 110. The axis operand 152 specifies the position input (one of the axis blocks 12) of the output cam block 14 that is being disarmed. As described above, for execution by the controller module 40, the axis can be a servo, feedback only, physical, or consumed one. Likewise, for execution by the output cam module 52, the axis is a feedback axis and an axis assigned to the output cam module 52.
The execution target operand 154 defines a specific output cam block 14 from the set that is connected to the axis block 12 by the axis operand 152. The execution target operand 154 of the disarm output cam instruction 150 is similar to the execution target operand 114 of the arm output cam instruction 110. Based on the value assigned the execution target operand 154, the output cam block 14 is either an output cam block executed in the controller module 40 or in the output cam module 52.
The motion control operand 156 stores status information during execution of the disarm output cam instruction. This information includes whether execution is in process, error information, and so on. The operand is another variable in the system 10 that can be examined by other parts of a user program used to provide initiation and run-time status information as the disarm output cam instruction 150 executes.
The disarm type operand 158 permits the disarm type to be selected. Depending on the selected disarm type, one or more output cam blocks 14 are disarmed. The selected disarm type may be all, in which case all output cams connected to the axis block 12 specified by the axis operand 152 are disarmed. The selected disarm type may also be specific, in which case a specific output cam block 14 connected to the axis block 12 specified by the axis operand 152 and defined by the execution target operand 154 is disarmed.
2. Data Types
The output cam operand 122 allows the latch and unlatch operation of the output cam element to be configured. Latching refers to the rising edge of the cam element used to turn on an output bit. Unlatching refers to the falling edge of the cam element used to turn off the output bit.
The output cam operand 122 is an array of output cam elements. As just indicated, the parameters specified by the output cam operand 122 include an output bit, a latch type, an unlatch type, a left cam position, a right cam position, a duration, an enable type, and an enable bit.
The output bit is set to a value (e.g., from 0 to 31), corresponding to the different output bits (e.g., thirty-two different bits) for which the output cam block 14 is responsible. Each cam element in the array has an output bit parameter. The output bit is used to assign the cam element to a particular output bit.
The latch type describes the type of condition that is used to determine whether the output bit is latched. The latch type may be set to one of the following conditions: inactive, position, enable, and position and enable.
The unlatch type may be set to one of the following types of conditions: inactive, position, duration, enable, position and enable, duration and enable, and relative.
The relative unlatch type allows the user to specify a position offset from the latch operation in which to unlatch the cam element. This feature may be useful in situations where, when an event is detected, an action is to occur for a predetermined amount of axis travel. For example, the presence of a rejected part may cause a reject gate to open for the next ten inches of axis travel. A photo-eye may then be used to detect the presence of the product because its position on the belt is not guaranteed. The user then specifies in user units the distance the axis will travel following the latch event in which the unlatch event occurs. In the above example, the user specifies the latch type as “enable” (the reject detect photo-eye) and the unlatch type as “relative.”
The left and right cam positions define the cam range of an output cam element. Specifically, if the latch or unlatch type is set to “position” or “position and enable” with the enable bit active, the left and right cam positions specify the latch or unlatch position of the output bit.
The duration defines the duration of an output cam element. Specifically, if the unlatch type is set to “duration” or “duration and enable” with the enable bit active, the cam duration specifies the time between the latching and the unlatching of the output bit. For duration values, the user units may, for example, be seconds.
The enable type parameter is used when the latch type or the unlatch type is set to enable. If the enable bit is based on one of the input bits 164, then the enable type may be set to either non-inverted input or inverted input. If the enable bit is based on one of the output bits in the output block 16, then the enable type may be set to either non-inverted output or inverted output. The enable bit parameter specifies which one of the input bits 164 (if the enable type parameter specifies non-inverted input or inverted input) or which one of the output bits in the output block 16 (if the enable type parameter specifies non-inverted output or inverted output) is used as an enable bit. If the enable bit is an input, the state of the input bit may correspond to the state of an input device (sensor) or to the state of any other piece of data in the system 10. If the enable bit is an output bit, the output state of the output bit may or may not be associated with a particular output device 50 coupled to the output block 16.
From the foregoing, a number of additional features may be apparent. First, the latch/unlatch operations may be controlled based on multiple different possible event states. For example, the user is permitted to control latch/unlatch operations based on the state of an associated enable bit. Thus, the user may specify the turn on (latch) behavior as position and enable, and the turn off (unlatch) behavior as duration. The enable input can be any piece of I/O data that is available in the controller module 40 (or the output cam module 52). Thus, the enable input may be received from any of a variety of different sensors (e.g., a presence sensor to detect the presence of a production unit) and/or based on information acquired from anywhere in the motion control system 10. There is no need to provide a separate enable signal to the controller module 40 (or the output cam module 52). The ability to control the latch/unlatch operations based on parameters other than input motor position provides flexibility.
Further, the ability to control latch/unlatch operations based on the state of an associated enable bit also provides the user with the ability to define dependencies between cam elements. Thus, the operator is provided with the ability to condition the latch or unlatch operation of one cam element to the current output state of another cam element assigned to another output bit. The source of an enable bit can be assigned to an output bit associated with another cam element. This allows the user to condition the latch or unlatch operation of one cam element to the current output state of another cam element assigned to another output bit.
Another possible event state that a user may use to control latch/unlatch operations is an event state determined by an application task. Thus, the user may specify only the latch or unlatch operation of a cam, and allocate the opposing operation to an application task by setting the latch or unlatch type to inactive. For example, in a bottle filling operation, it may be desirable for the filling operation to start with the presence of a bottle when the machine is at a particular position, and end when an application task determines that the bottle is full. The user is permitted to specify a turn on (latch) operation of type “position and enable” to actuate the filling process, and a turn off (unlatch) operation of “inactive” allowing the user application to stop the filling process by turning the output bit off. Additional behaviors can be combined such as latching or unlatching based on position and the state of an enable bit, and unlatching based on time duration and the state of an enable bit.
Second, the user is provided with the ability to use multiple cam element assignments. No limitations are imposed (other than available memory and performance) to the number of cam elements that can be assigned to each output bit. Therefore, each output bit may be controlled as a function of multiple cam elements.
Third, the user has the ability to specify separate latch and unlatch operations per cam element. For example, the user can specify the turn on (latch) behavior as position and enable, and the turn off (unlatch) behavior as duration.
Finally, the user has the ability to dynamically change cam element (latch, unlatch) behavior during operation of the motion control system 10. The output cam instructions 110 and 150 are preferably executed in a multi-tasking environment which allows the controller module 40 to examine the configuration data at each update cycle and implements changes dynamically. The user may be permitted to change these values either programmatically or through an online data monitor. Thus, it is possible to change cam element definitions independent of the arm output cam instruction 110, for example, using other instructions in the programming interface, in response to user inputs using the on-line data monitor, and so on. It is possible to do this while the motion control axis is moving and without reinitiating the arm output cam instruction. The user is permitted to change the value (e.g., the duration time, the left and right position, and so on) or the type (e.g., from duration to position and enable). This is valuable during system setup or when the motion control system 10 switches from one operation to another (e.g., switches from handling one product to another). This allows the user to keep the machine running when doing the changeover, which increases productivity. The controller module 40 is a multi-tasking system, and the controller module 40 examines the configuration data at each update cycle and implements changes dynamically.
By way of overview, the output compensation operand 128 allows offset, delay, and mode compensations to be defined and implemented for each output bit. The parameters specified by the output compensation operand 128 include an offset parameter, a latch delay parameter, an unlatch delay parameter, a mode parameter, a pulse cycle time parameter, and a pulse duty cycle parameter.
With regard to the offset and delay compensation block 170, and as described in greater detail below, each output bit can have associated with it a position offset, a turn on (latch) time delay and a turn off (unlatch) time delay. The position offset allows the user to advance or retard all cam elements assigned to the output. Latch and unlatch time delays permit the user to enter time delays to turn on/off an output bit sooner or later and thereby to take into account the fact that different output devices may take different amounts of time to latch or unlatch. Again, it is possible to adjust these parameters independent of the arm output cam instruction 110, for example, using other instructions in the programming interface, in response to user inputs using the on-line data monitor, and so on, while the motion control axis is moving and without reinitiating the arm output cam instruction 110.
With regard to the mode compensation block 172, and as also described in greater detail below, each output bit can have associated with it a mode compensation. As will be described below, depending on the mode compensation that is selected, latching and unlatching an output bit is not necessarily the same as turning on and off the associated output device 50. For example mode compensation may be implemented so as to cause an output bit to pulse in the latched state rather than remain on. Again, it is possible to adjust these parameters independent of the arm output cam instruction 110, for example, using other instructions in the programming interface, in response to user inputs using the on-line data monitor, and so on, while the motion control axis is moving and without reinitiating the arm output cam instruction 110.
In one embodiment, the blocks 160, 162, 170 and 172 are implemented using control logic that includes one or more tables that store the information specified above as a separate entry for each cam element. For purposes of explanation, it is assumed that four tables are used, although it may be noted that in practice the tables may be combined, such as by combining the tables for blocks 160 and 162, and by combining the tables for the blocks 170 and 172.
As the motion control axis of the axis block 12 moves, the position of the axis is monitored and this information is provided to block 170. For each output bit, the table implemented in block 170 is accessed to provide offset and delay compensation as described above. A compensated latch and unlatch position for each output bit is maintained. Preferably, delta position information for the motion control axis is employed, and a cam position is defined which moves within the cam range at the same rate at which the axis position moves with the axis range of movement. The information from the block 170 is provided to the latch and unlatch block 160, and latch and unlatch operations are performed. The latched/unlatched state of each cam element is provided to the mode compensation block 172, which determines how the output device should be controlled based on the latched/unlatched state of the cam element (e.g., normal, inverted, pulsed, and inverted and pulsed, as described below).
The offset parameter provides position compensation and may be specified in position units (e.g., user units). The position offset allows the user to advance or retard all cam elements assigned to the output. The latch and unlatch delay parameter compensate for different latch/unlatch times of different types of output devices 50. Latch and unlatch time delays may be entered as a float value in units of seconds. The latch and unlatch compensation provides speed and acceleration compensation for the latch and separately for the unlatch operation. The user is permitted to specify latch and unlatch time delays for particular output devices 50. The position compensation is then calculated based on current velocity and acceleration as follows:
where ν is the current axis speed and a is the axis acceleration, and LatchDelay and UnlatchDelay are values specified by the user for a particular output device 50. The acceleration value α is continuously updated (i.e., every update cycle). Preferably, the acceleration value is filtered so as to obtain a smooth acceleration value which avoids jitter. It is also possible to obtain the internal calculation of the acceleration and velocity command from the servo drive 42 and use this value in the above equations. It may also be noted that it is possible for the user to specify either a positive or negative position offset or a negative position offset, as well as a positive delay or a negative delay.
The following equation illustrates the effect of the compensation values on the duration of an output cam element.
Compensated Duration=Duration+Latch Delay−Unlatch Delay
From the foregoing, a number of additional features should be apparent. First, the latch compensation for a given output device 50 is separately configurable from the unlatch compensation for that output device 50 such that compensation may be performed independently. Thus, the operator has the ability to specify a turn-on compensation that accurately reflects the turn-on delay of an output device 50 as well as a separate turn-off compensation that accurately reflects the turn-off delay of the output device 50. Also, it is possible to configure different latch and unlatch compensations for different output devices 50. Thus, the operator is provided with the ability to specify different turn-on compensations for different output devices 50 and/or the ability to specify different turn-off compensations for different output devices 50. Thus, it is possible to specify a latch delay and different unlatch delay for a given output device 50, and also to specify different latch/unlatch delays for different output devices 50.
Second, it may also be noted that the compensations may be dynamically adjusted based on system conditions. For example, if an actuator begins to wear causing an increase in the time required to turn it on, then the user has the ability to dynamically change the position offset, latch delay and unlatch delay for each output device 50 either programmatically or through an online data monitor. This avoids the need to shut down equipment to re-adjust, change the position of the output device, or enter a new compensation delay value, which would require stopping and restarting the process resulting in product waste. Also, all cam elements defined for a particular output bit may be affected at the same time by making a change in one place, namely, the position offset parameter. Every cam element that is assigned to the output bit is offset by the same amount because each cam element uses the same position offset value.
Third, the system has the ability to adjust compensation based on velocity and acceleration. During normal startup and shutdown procedures, the customers packaging equipment will experience periods of acceleration and deceleration while product is being processed. Camming functions will occur during this time and the accuracy of the output is as important during accel/decel as it is during constant velocity. Thus, the ability to adjust for both velocity and acceleration improves system operation, for example, during normal startup and shutdown procedures.
Fourth, the compensation may be time-based or delta position-based. Because the delay in terms of time (as in the case of the latch/unlatch delays), the compensation is independent of speed/acceleration. Output devices take a certain amount of time to actuate, and the actuation time is the same regardless of the speed of the axis. Therefore, specifying delay in terms of time is easier because the speed of axis does not need to be taken into account.
Mode compensation allows the output devices 50 to be controlled so as to behave in different ways depending on which mode of operation is selected. The output bit can have one of the following output modes: normal, inverted, pulsed, and inverted and pulsed.
The pulsing is preferably time-based so as not to be affected by axis speed. In this arrangement, the pulse cycle time is specified as a floating point value in seconds, and the duty cycle is specified as a percent of on-time to off-time. The ability to pulse the output may be used in situations where it is necessary to perform an operation based on a time-based pulsing pattern (e.g., a stitching process that applies glue to produce a pattern of glue spots). The pulsing feature could also be used to simulate an analog output.
As previously indicated, for each output bit of the output block 16, a current latch and unlatch position is maintained. This allows the current latch and unlatch position to be compensated independently. Additionally, as previously mentioned, the user has the ability to assign multiple output cams to each output device 50. The above-described compensation applies for all the cams that are defined for a given output device 50. As described above in connection with
Further, it is desirable to be able to maintain two different cam tables at the same time for each output bit, at least in some instances. As previously noted, it is possible to start a cam, execute the cam using one cam profile, and then change the cam profile, and begin execution of the new cam profile with an execution schedule of pending. Because of the position compensation described above, there is not a “clean” break between the two cam profiles. Different cams have different compensated positions, even if the uncompensated position is the same. Essentially, this means that two cam profiles may be operating simultaneously. Thus, a latch position may be using one cam table and one compensation table, and an unlatch position is using a different cam table and a different compensation table. An output bit may either be in the context of the active cam, and its cam definition and its cam compensation and parameters, or in the context of the pending cam and its cam definition and its compensation table. Therefore, the use of multiple compensation tables permits position to be tracked in different contexts, so that two cams may be supported while the cams are transitioning, and one cam (or output bit) is in one context and the other cam (or output bit) is in the other context. As an alternative example, the latch position of one output bit could be in the new context while the unlatch position of that output bit is still in the old context while the unlatch operation is finishing. One output bit may be in two different contexts or two different cams (and two different cam profiles) at the same time. Once all of the cam profiles have transitioned, the pending cam becomes the active cam and the prior active cam terminates, and then only one cam remains.
3. Overlapping Cams
Referring now to
4. Output Cam Editor
In the preferred embodiment, an output cam editor such as the output cam editor 190 shown in
The grid or tabular view 194 is a direct representation of the array data. The tabular view 194 provides a tabular representation of the cam profiles for the output bits, and comprises numeric and non-numeric values describing the latch and unlatch operations of the cam elements. The toolbar 196 provides access to the Insert, Undo, Redo, Zoom-In, Zoom-Out, and Zoom-To-Fit command buttons. The output cam editor 190 therefore presents output cam configuration data in both a tabular and graphical form, providing an easier way to view and modify cam elements for each output bit.
The techniques described herein extend to those embodiments which fall within the scope of the appended claims, regardless of whether they provide any of the above-mentioned advantageous features.
Many changes and modifications may also be made to the invention without departing from the spirit thereof. The scope of these changes will become apparent from the appended claims.
This application is a continuation of U.S. Ser. No. 10/175,356, now U.S. Pat. No. 7,096,076, filed Jun. 19, 2002, entitled “Output Cam System and Method,” hereby incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 10175356 | Jun 2002 | US |
Child | 11507101 | Aug 2006 | US |