Virtual axis Set Speed calculation

Hello,
does anybody have an idea how the virtual axis output is generated?

There is a parameter: Pure Virtual Axis / General Purpose Axis Reference / Control Outputs / Set Speed, where a variable of type REAL is mapped.
obrázok
I have used it several times, but only now I realize that I have no idea how it is calculated. In my previous applications, I used it intuitively and found that this output changes from 0 to 1 as normalized speed (where 1 represents nominal speed).
The encoder resolution and gearbox ratios were the same, so increments were equal to the units forming the actual position. However, there is nothing like the SERVO_V_MAX_OUTPUT parameter that existed in ACP10, which would bound it to a normalized range. This confuses me, and it seems that my previous usage may have been incorrect.

Thank you.
Regards
Michal Malek

Hello,

Here is the documentation of the expected behaviour.

McPureVAx - SetSpeed Documentation

image

Greetings
Michael

Hi Michael,
Thank you for the links. I suppose it works exactly as SDC did (c4f33f7b-51d5-48b2-b0a2-483551aca9e4).
I will try to explain it with an example:
I have a 1440 [ppr] sensor, and for simplicity, I set the gear input/output ratio to 1/1440. Therefore, the increments correspond directly to the units.

I have a real motor with a synchronous speed of 1500 [min⁻¹] and commanded half of the nominal speed (i.e., 1440 × 750 / 60 = 18000 [units/s]). This is the result:


The trace shows the velocity that is reached as expected (18000 u/s).
However, Set speed, which is the output of the virtual axis, is 0.5 (for nominal speed it is 1, etc.).
Therefore, for the drive input, this value must be multiplied by the nominal speed to reach 750 [min⁻¹], as the LFR trace shows.
And this is what I completely don’t understand.

The motor revolution per drive unit is 1/1440, and therefore the set speed of 18000 multiplied by 1/1440 gives 12.5 [s⁻¹], which is 12.5 × 60 = 750 [min⁻¹]. This is the expected output, but instead, the normalized value <0,1> appears at the output (last trace).
I tested it with the resolution and gear ratio both set to 1, and the result is the same. This proves that something is wrong either with my approach or (less likely) with the VirtAxis.
Even when the drive behaves correctly.

Thank you
Best regards
Michal Malek

Hello,
i currently do not have time to make an example with traces… sorry for that.

I do not think that you mechanical description makes sense.
Having a Gear which is i= 1/1440 seams not to be a real application.
And to use the encoder values for a gear ratio eighter.

The Output for the set Speed does not need to know any information about the encoder.

Lets say you have a mechanic:
i=2
Linear to Rotary = 360 Units
Velocity shall be 360 Unit/s

Velocity / Linear to Rotary * i = Set Speed in [Hz] [1/s]

360 [Units/s] / 360 Units * 2 = 2 [1/s]

You Motor has to move with 2 Rotation per Second to reach 360 Units / s at the mechanic.

I assume this Unit System was used because most frequency Inverters are having an input for Speed in [Hz].

Greetings
Michael

Hi Michael,
there is no need for additional traces. My traces are only for demonstration purposes.

The parameters from the example were set for simplicity, where the position controller works directly with increments. There is no other purpose than to make the example as simple as possible.

When the actual position (used as feedback for the position controller) in [units] is calculated as follows:

ActPos[incr] × LoadUnits / (MotorRev × EncResolution[incr])

the SetSpeed must respect the encoder parameters.

When [unit/s] is the output of the position controller, the scaling factor at the SetSpeed output must be the same as in the formula above, which corresponds to your equation with respect to the resolution (which defines the motor revolutions).

Thank you.
Regards
Michal Malek