Supported Axes: |
Position Control Axes |
Supported Control Modes: |
See the Commands Overview topic for basic command information and how to issue commands from PLCs, HMIs, etc.
Command Parameters
# |
Parameter Description |
Range |
1 |
Offset (position-units) |
any |
2 |
Amplitude (position-units) |
≥ 0 |
3 |
Frequency (Hz) |
0* to 1/4 of the loop frequency |
4 |
Cycles |
0 to 16 million in 0.25 steps (0 = continuous) |
5 |
Start Location
|
a valid integer as described |
6 |
Status Block (address) Note: See Specifying a Register Address below. |
Address or none (0) |
*See the Frequency section below for details on the lower limit.
Description
This command starts a continuous sinusoidal move on a position axis. If the number of cycles is specified, the sine move will end after completing the cycles and will hold position. For pressure or force, use the Sine Start (Prs/Frc) (76) command.
Before issuing this command, the Target Position must be at the location specified by the Start Location command parameter, or, a Transition command must previously have been issued to specify how the axis should move to get to the sine curve. A transition command will allow you to start a sine curve even though the axis is not at the correct starting point.
If you want the axis to follow the sine curve exactly starting from the beginning, do not use a transition; instead, make sure the axis is at the starting point before issuing the Sine Start command.
Offset
The Offset specifies the position of the center of the sine wave.
Amplitude
The Amplitude specifies the distance from the center to the peak. The amplitude can be zero or a positive number. An amplitude of zero is typically only used when it will be followed by the Change Target Parameter (80) command to ramp the amplitude from zero to some value.
If the amplitude would cause the target position to exceed the Positive or Negative Travel Limits, a command error will occur, which will halt the axis if the Auto Stops are set to do so.
Cycles
The Cycles specifies the number of cycles, in increments of 0.25. Each cycle begins at the location specified by the Start Location parameter. If Cycles is zero, the sine wave will repeat endlessly. By specifying various increments of 0.25, you can control whether the sine wave stops at the bottom, top, or middle. If the Cycles is an integer number, the sine move will stop at the same location where it started.
A cycle count of 0.25 is not allowed if the Start Location is at one of the peaks, and the Frequency is zero.
Due to the limits of 32-bit floating point values, the Cycles parameter can be a maximum of 16 million only if it is a whole number. If it contains a half, such a 45.5, it can be a maximum of 7,999,999.5. If it contains a quarter, such a 12.25 or 97.75, it can be a maximum of 3,999,999.75.
Frequency
The frequency can be any value from zero up to the maximum frequency listed in the table below. The maximum frequency is a quarter of the loop frequency (the loop frequency is the inverse of the Loop Time). For example, if the loop time is 1000 µsec, the maximum frequency is 250 Hz.
Loop Time |
Max Frequency |
250 µsec |
1000 Hz |
500 µsec |
500 Hz |
1000 µsec |
250 Hz |
2000 µsec |
125 Hz |
4000 µsec |
62.5 Hz |
Fractional frequencies are valid, such as 0.345 or 5.84. Issuing this command with a frequency of zero is typically only done when it will be followed by the Change Target Parameter (80) to ramp the frequency from 0 to some value. A frequency of zero is not allowed if the Start Location is at one of the peaks, and the cycle count is 0.25.
Frequencies below 0.00001 on the RMC75 or RMC150E, and below 0.05 on the RMC75S and RMC75P, may cause an irregular Target Position when used with the Start Locations Mid-Pos or Mid-Neg. Test any very low frequencies before using them.
Start Location
The Start Location specifies where on the sine wave the motion should start. When this command is issued, the Target Position must be at that position, unless a Transition command has previously been issued to specify how the axis should move to get to the sine curve. The Start Location options are given below. Notice that each cycle will start at the location specified by the Start Location.
Start Location |
Description |
Auto |
If the Target Position is at the positive peak, negative peak, or the center, then the sine move will start there. If it starts at the center, it will move in the positive direction. See Mid-Pos and Mid-Neg Details below. |
Mid-Pos |
The sine wave will start at the center (zero degrees) and move in the positive direction. See Mid-Pos and Mid-Neg Details below. |
Pos Peak |
The sine wave will start at the positive peak (90 degrees). |
Mid-Neg |
The sine wave will start at the center (180 degrees) and move in the negative direction. See Mid-Pos and Mid-Neg Details below. |
Neg Peak |
The sine wave will start at the negative peak (270 degrees). |
For example, if the Start Location is Auto, the Offset is 3, and the Amplitude is 1, then the Target Position must be at 2, 3, or 4 when this command is issued. If the Start Location is Pos Peak, the Offset is 10, and the Amplitude is 2, then the Target Position must be at 12 when this command is issued.
The diagrams below show the start of the sine wave for the Start Location options.
Mid-Pos
|
Mid-Neg
|
Neg Peak
|
Pos Peak
|
Mid-Pos and Mid-Neg Details
If the Start Location is Mid-Pos or Mid-Neg, in order to prevent a sudden jump in the velocity, the frequency will be logarithmically ramped from zero Hertz to the requested frequency during the first quarter cycle. Therefore, the first quarter cycle will not be a true sine function, and the first quarter cycle will take longer. See the Mid-Pos and Mid-Neg images above. If a sine move stops at the middle, the same type of ramping will occur in the last quarter cycle.
To achieve a different ramping behavior for Mid-Pos or Mid-Neg start locations, do the following:
Send the Sine Start command with the frequency set to zero. The sine wave will start, but there will be no motion.
Use the Change Target Parameter command to ramp the frequency to the desired value. The Change Target Parameter command provides great flexibility in defining the ramp.
Note: For Start Locations Mid-Pos or Mid-Neg, very low frequencies, such as 0.0001 or less, may cause an irregular Target Position. Test any very low frequencies before using them.
Note: For Start Locations Mid-Pos or Mid-Neg with a non-zero starting frequency, changing the frequency with the Change Target Parameter (80) command is not allowed until the sine wave has reached the first positive or negative peak.
Status Block
The optional Status Block specifies the location in the Variable Table of a block of six registers that provide read-only information on the sine move. This block will not be needed by most users and the Status Block parameter should then be set to none. For more details, see the Sine Move Status section below.
Stopping a Sine Move
If the number of cycles is non-zero, the sine move will automatically stop after reaching the number of cycles. By specifying the Cycles in various increments of 0.25, you can control whether the sine wave stops at the bottom, top, or middle. If the Cycles is a whole number, the sine move will stop at the same location where it started.
The Sine Stop (73) command is designed for stopping a sine move that is in progress. The stop location can be specified to be the positive peak, negative peak, next peak, middle, or after the current cycle completes. See the Sine Stop (73) command for more details.
If the stop location is the middle, the frequency will be ramped to zero hertz during the last quarter cycle. This prevents a sudden jump in the velocity, because the middle of a sine move otherwise has a non-zero velocity.
Of course, as with any motion on an axis, when a sine move is in progress, another motion command can be issued and the axis will immediately stop the sine move and start the new motion. For example, a Stop (Closed Loop) (6) command will stop the axis.
Ramping Sine Move Parameters
Use the Change Target Parameter (80) command to ramp the Offset, Frequency, or Amplitude, or change the Cycles of a sine move in progress. Each parameter can be ramped independently, that is, each parameter can be ramped whether or not other parameters are ramping. See the Change Target Parameter (80) command for details.
Example
A wave-generating application requires that the amplitude be ramped from 0 to 10 over 20 cycles. To do this, first issue the Sine Start (72) command with an Amplitude of 0. Then, issue the Change Target Parameter (80) command to ramp the Amplitude to 10 during 20 cycles.
Sine Move Status
Axis Status Registers for a Sine Move
The Cycles Axis Status register gives the whole number of cycles completed for the sine move in progress. It is listed in Axis Tools, in the Axis Status Registers pane, on the All tab, in the Target section. The Cycles Axis Status register is a DINT.
Status Block
Advanced users may wish to use the Sine Start command's Status Block, which provides read-only information on the sine move. This information is most useful when manipulating sine moves in user programs.
To use the Status Block, you must specify an address from the Variable Table in the Status Block parameter of the Start Sine command. The Status Block will require seven registers in the Variable Table, beginning with the specified address. As the sine move progresses, the selected registers in the Variable Table will be continuously updated. The selected variables will not be named automatically; you should give a descriptive name to each to help you keep track of them.
To prevent confusion, sine moves that are running simultaneously should not use the same Status Block address. Non-simultaneous sine moves can use the same Status Block address.
The Status Block provides the following information:
Status Block Offset |
Name |
Data Type |
Description |
0 |
Current Cycle Count |
The number of whole cycles the sine move has completed. Each cycle begins at the location specified by the Start Location command parameter. The fractional part of the cycle is given by the Current Cycle Fraction below. For continuous sine moves (without a fixed number of cycles), this value will wrap to zero after it reaches 10,000,000 and then continue incrementing. For sine moves with a fixed number of cycles, this value will not go beyond the requested cycle count. |
|
1 |
Current Cycle Fraction |
The fractional part of the Current Cycle above. The fractional part is given in this separate register to retain accuracy as the Current Cycle reaches high values. |
|
2 |
Current Angle |
The current angle from 0 up to, but not including, 360 degrees. This angle is the mathematical angle as shown in the sine wave diagram above. An angle of zero does not necessarily coincide with the start of a cycle. This value can be used for such things as determining whether the sine move is at the positive peak, negative peak, or middle. |
|
3 |
Current Amplitude |
The current amplitude of the sine move in position-units. |
|
4 |
Current Frequency |
The current frequency of the sine move in hertz. |
|
5 |
Current Offset |
The current offset of the sine move in position-units. |
|
6 |
Current Phase |
The current phase of the sine move in degrees. |
Specifying a Register Address
When issuing this command from anywhere other than RMCTools, the addresses in the Status Block command parameter must be entered as an integer value.
RMC addresses are represented in IEC format as:
%MDfile.element, where file = file number, and element = element number.
Use the following equation to convert a register address to integer format, N:
N = file * 4096 + element
Example:
Register address %MD8.33 is 8*4096 + 33 = 32801.
Status Bits
Target Generator Done bit
This bit indicates that the sine move has completed the specified number of cycles and has reached the ending point. Notice that this bit does not indicate whether the Actual Position has reached the Requested Position. If the Target Generator Done bit is set, and the Actual Position is within the In Position Tolerance window of the Target Position, the In Position Status bit will be set. The In Position bit indicates that the move is complete and the axis is at position.
Target Generator State A and B bits
B |
A |
Description |
0 |
0 |
Reserved |
0 |
1 |
Reserved |
1 |
0 |
Reserved |
1 |
1 |
Reserved |
Pri. TG SI Busy (Primary Target Generator Superimposed Busy) Bit
This bit will be set during the transition. The transition begins when the motion command is issued, not necessarily when the Transition command is issued. When the transition completes, this bit will clear.
See Also
Sine Stop (73) | Sine Start (Prs/Frc) (76) | Sine Stop (Prs/Frc) (77)
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion