AngryRobot

Clear variables when program stopped?

4 posts in this topic

If I use the PrgStop command to stop executing a program (say when a different model type or tooling fixture has been selected) is there a way to force the variables to clear?  By default they retain their last value.

 

Share this post


Link to post
Share on other sites

Local variables or global?  I would think local variables would zero out if they are not flagged for retain, but I have not yet looked at this.

Share this post


Link to post
Share on other sites

Local variables.  I have not tried it with the actual hardware yet, but in simulation mode they maintain their last state.

 

Edit: at least in the simulator, both local and global variables set in the stopped program retain their last state.

Edited by AngryRobot

Share this post


Link to post
Share on other sites

Confirmed:  I just tested this with the hardware and both global and local variables DO retain their values when the program is stopped and also after it is restarted.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now