adccommunitymod (AutomationDirect) asked a question.

DoMore BRX axis jog with different speeds.

Created Date: January 07,2020

Created By: Ken_M

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I have a stepper motor I want to jog forward and reverse using 2 different sets of controls (4 controls total). I want the two sets of controls to have different speed, accel, and decel parameters. I'd like one set of the controls to be able to override the other one (I haven't gotten to the overriding portion, ran into trouble before then. Here is what I tried. Lets assume C1 and C2 is the primary set of controls, and C3 and C4 is the secondary. D1 is primary speed, D2 primary accel, D3 primary decel. D4 secondary speed, D5 secondary accel, D6 secondary decel. Axis Jog command, with the enable tied to e-stops. Its speed is set to D7, accel to D8, decel to D9. foreword is tied to C1 and C3 in parallel, reverse to C2 and C4. On another rung, the rise of C1 or C2 moves the values of D1,D2,D3 (primary speeds) to D7,D8,D9 (speed info specified in the jog command). Yet another rung the fall of C1 or C2 moves the values D4,D5,D6 to D7,D8,D9. This way, the Jog speeds equal to D4,5,6 anytime C1 or C2 is not pressed, When they are, the values will equal to d1,2,3. I need another 2 lines of logic to allow for one set of bits to overwrite the other, but I didn't get that far. The motor always moves with speed,accel, decel values of the secondary set of controls. The command box shows the speed settings of the primary set of controls when the primary are used, but the motor motion is that of the secondary (they are very different, its easy to tell). I thought it had something to do with once a jog move starts the speed values does not take effect. Tried to enter in some silly delays in there, but so far no luck. I tried the whole thing with 2 separate Jog commands, each with its own speed settings, each tied to its own set of controls. The good news there, is that the speed changes absolutely take effect. The bad news is that if both jogs enable at the same time (even if there is no input on fw/rv) the axis goes into fault. which makes overriding commands tricky. I think it has something to do with it being a multiscan instruction, I can't just enable one and disable the other, I'm back to silly delays. Worse yet, when the axis goes into fault, I can't seem to reset it. I can run axisconfig, which removes the fault indication, but the axis doesnt respond to any inputs until the PLC is reset. Can someone help? Thanks


  • adccommunitymod (AutomationDirect)

    Created Date: January 07,2020

    Created by: Ken_M

    I have a stepper motor I want to jog forward and reverse using 2 different sets of controls (4 controls total). I want the two sets of controls to have different speed, accel, and decel parameters. I'd like one set of the controls to be able to override the other one (I haven't gotten to the overriding portion, ran into trouble before then. Here is what I tried.

    Lets assume C1 and C2 is the primary set of controls, and C3 and C4 is the secondary.

    D1 is primary speed, D2 primary accel, D3 primary decel. D4 secondary speed, D5 secondary accel, D6 secondary decel.

    Axis Jog command, with the enable tied to e-stops. Its speed is set to D7, accel to D8, decel to D9.

    foreword is tied to C1 and C3 in parallel, reverse to C2 and C4.

    On another rung, the rise of C1 or C2 moves the values of D1,D2,D3 (primary speeds) to D7,D8,D9 (speed info specified in the jog command). Yet another rung the fall of C1 or C2 moves the values D4,D5,D6 to D7,D8,D9.

    This way, the Jog speeds equal to D4,5,6 anytime C1 or C2 is not pressed, When they are, the values will equal to d1,2,3.

    I need another 2 lines of logic to allow for one set of bits to overwrite the other, but I didn't get that far.

    The motor always moves with speed,accel, decel values of the secondary set of controls. The command box shows the speed settings of the primary set of controls when the primary are used, but the motor motion is that of the secondary (they are very different, its easy to tell).

    I thought it had something to do with once a jog move starts the speed values does not take effect. Tried to enter in some silly delays in there, but so far no luck.

    I tried the whole thing with 2 separate Jog commands, each with its own speed settings, each tied to its own set of controls. The good news there, is that the speed changes absolutely take effect. The bad news is that if both jogs enable at the same time (even if there is no input on fw/rv) the axis goes into fault. which makes overriding commands tricky. I think it has something to do with it being a multiscan instruction, I can't just enable one and disable the other, I'm back to silly delays. Worse yet, when the axis goes into fault, I can't seem to reset it. I can run axisconfig, which removes the fault indication, but the axis doesnt respond to any inputs until the PLC is reset.

    Can someone help?

    Thanks

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: January 07,2020

    Created by: Do-more PE

    You are trying to make something synchronous that is inherently not synchronous. That is what the red flag in the corner tells you about the instruction. You need to wait on the flags to clear before doing something else. In this case $AxisX.Active is probably the correct choice to use as a lockout.

  • adccommunitymod (AutomationDirect)

    Created Date: January 07,2020

    Created by: BobO

    I think you can do what you want using AXSCRIPT, but I doubt you will get there with AXJOG. AXSCRIPT will allow you to set a accel, decel, and velocity, and then immediately leave the instruction while leaving the axis running the last thing you told it. You'll use logic to determine which of 5 states you are in at any time (idle, fast/slow * left/right), and then a state transition triggers the AXSCRIPT required to put you into that state.

    Expand Post