Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

MC_Phasing accelerates forever in one direction

2023-07-20
2023-07-21
  • jmarshall9120 - 2023-07-20

    I have a project set up as below. I'm controlling it with visualizations. The odd thing is that when I try to phase it starts accelerating and seems to continue to accelerate until I'm forced to halt the motor.

    I've experimented with parameters such as:

    PhaseShift: 21.00000
    Velocity: 30.00000
    Acceleration: 10.00000
    Deceleration: 10.00000
    Jerk: 100.00000
    

    and:

    PhaseShift: 0.00005
    Velocity: 0.00005
    Acceleration: 10.00000
    Deceleration: 10.00000
    Jerk: 100.00000
    

    These parameters all give the same result. The servo seems to accelerate at 10.0000, but accelerates until its wrecking effects and I have to halt it. My GearIn is at a 1:48, if that matters. Note, I've also tried to put in negative shift, and it still accelerates int he positive direction.

    If I set up the phasing with a virtual axis in the middle (as is in the codesys docs) I get no phasing:

    I tried the same parameters here and got no phasing on the axis.

    Any idea what I might be doing wrong here? Or does this seem like a bug?

     
  • gseidel - 2023-07-21

    Hi jmarshal9120,

    MC_Phasing cannot be used on the same master and slave as MC_GearIn.
    Your idea with the virtual axis is good, however, as mentioned here [0], please use the virtual axis as the slave of MC_Phasing and the master of MC_GearIn.

    Two other points: you should only use one instance of MC_GearIn, and you need MC_Power for the virtual axis.

    [0] https://content.helpme-codesys.com/en/libs/SM3_Basic/Current/SM3_Basic/POUs/Movement/MasterSlave/MC_Phasing.html

    Best regards,

    Georg

     
  • jmarshall9120 - 2023-07-21

    Hi @gseidl,

    Thank you for the reply. I have a few follow up questions

    1. "Your idea with the virtual axis is good, however, as mentioned here [0], please use the virtual axis as the slave of MC_Phasing and the master of MC_GearIn."

    Is this not how I have it configured above? I want to double check because as far as I'm seeing the picture above is doing this. Am I missing something?

    1. How is it that the Virtual Axis follows the Master if not GearedIn. Is MC_Phasing by itself supposed to create a 1:1 positional "GearIn" between master and slave?
     
  • jmarshall9120 - 2023-07-21

    @gseidl I tested the theory that MC_Phasing creates a 1:1 gearing and sure enough that's what it does. With that my understanding corrected on this, I was able to get phasing working. Thanks.

     

Log in to post a comment.