Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: BRF_MAS on January 30, 2023, 07:00:04 PM

Title: Unexpected behavior in AXSCRIPT when E-stop is reset
Post by: BRF_MAS on January 30, 2023, 07:00:04 PM
Hello, everyone-

We are stuck on a project with a logic issue and would greatly appreciate some guidance from the greater group.

Please see attached screenshot of the AXSCRIPT in question.

When step 7 is running and E-stop is set and reset, the script will continue executing step 7 through 10.  However, when step 10 is running and the E-stop is set and reset, the script starts back at step 1.

How do we ensure that the script continues to execute through step 10, rather than restart at step 1 after the E-stop is reset following a stop event?

Any thoughts would be greatly appreciated.

Thank you!
Title: Re: Unexpected behavior in AXSCRIPT when E-stop is reset
Post by: BobO on January 31, 2023, 10:21:15 AM
It's not happening exactly the way you are thinking. When you drop the enable and re-enable, it always disables the axis and then restarts the box at step 1, but because your moves are absolute, it looks like it is picking up where it left off.

If you want to suspend the move and recontinued, consider using the .Suspend flag in the Axis structure. You don't need to change the enable state of the box, just set/clear .Suspend.

If you want a real ESTOP, you need to use the .MasterEnable flag in the Axis structure. This kills and faults the axis instantly. You will need to reconfig/rehome the axis following the fault, but that is a real ESTOP.