Scotty (Customer) asked a question.

Chaining AXSCRIPTs on the same axis

I can't seem to chain multiple AXSCRIPTs on the same axis without the Wait For Timer steps interfering with the other AXSCRIPTs.

 

A normally open contact starts the first AXSCRIPT (let's call it A). The last step in A sets a bit which activates the next AXSCRIPT (B). And again the last step in B sets another bit that activates another AXSCRIPT (C).

 

The scripts are a series of short moves with a short wait between them, shown below. There are nearly 100 moves, hence the need for multiple scripts.

Capture 

In operation however when A starts, B & C also begin triggering their Wait For Timer steps, so all three scripts are running at once, even though they're set to Power Flow and B & C's input logic is off.

 

Any ideas what I'm missing?

 

Cheers,

 

Scott.


  • ADC Community_04 (AutomationDirect)

    Something to consider is that .Timer member is associated to the axis itself and not the AXSCRIPT instruction. If you want to verify it is waiting correctly, you could exaggerate your wait times for testing. I used 1 sec, 2 sec and 5 seconds when testing and that allowed me time to observe the wait times.

  • Scotty (Customer)

    Thanks. I took your suggestion and tried a simpler version.

     

    What I observed was the scripts outputting correctly to the axis, which was a relief. However DMD shows each script stepping through the script commands, not just the script which is active. This is what gave the impression that the scripts were all running at once. Also given the chaotic nature of the moves (which is by design) it wasn't immediately obvious what was happening.

     

    I had read that the timer was common to the axis, so I jumped to the conclusion about the timer being the problem.

     

    Don't know if it's possible but in future DMD versions could the display behavior be changed so that only the active script/s show stepping through the commands?

     

    Thanks again for the help.

    Expand Post
    • HOST_franji1 (HOST Engineering)

      Status (currently) is "dumb". For example, if you have a MOVE box that is disabled (i.e. no power flow), the status of the parameters are still shown (that doesn't mean the MOVE is active, it is only showing the values of the parameters).

       

      The same is true for multiple AXCRIPTs w/same axis. The disabled ones still show the status of the axis (including the script step). There are ways to figure out which instructions are controlling a device, like an Axis.

      Expand Post
      • Scotty (Customer)

        Thanks. It was the script step thing that got me, but now that I know it's all good.

      • HOST_BobO (AutomationDirect)

        We really hate it when stuff like this misleads users and causes confusion. We talked a bit about it to see if there is anything we can do, and we think there may be. Not yet sure how much effort it will be, but we will look into it more.