151
Mach4 General Discussion / Re: Axis Enable API Call?
« on: October 03, 2019, 10:00:10 PM »
Smurph,
Thanks for the reply. I’m thinking you probably gave the entire answer to my question above, but I would like to clarify what I am trying to do just in case there is a way to accomplish it.
I want to achieve the same result as clicking the enable button, but call it from a script. I’m assuming the Enable button on screen enables all the axes, turns on the axis enable outputs, sets the state of Mach to allow code to be run, and updates the graphics on screen. I want to do that (and nothing more) from within the screen load script.
I do not need to enable axes individually.
Where is the code which is called by the enable button stored? Even if this isn’t explicitly in the API, is there a way for a function in the screen load script to access the command?
Can the exact behavior of the enable button be modified (say to prevent enabling the machine if certain inputs are not present)?
Thanks for the reply. I’m thinking you probably gave the entire answer to my question above, but I would like to clarify what I am trying to do just in case there is a way to accomplish it.
I want to achieve the same result as clicking the enable button, but call it from a script. I’m assuming the Enable button on screen enables all the axes, turns on the axis enable outputs, sets the state of Mach to allow code to be run, and updates the graphics on screen. I want to do that (and nothing more) from within the screen load script.
I do not need to enable axes individually.
Where is the code which is called by the enable button stored? Even if this isn’t explicitly in the API, is there a way for a function in the screen load script to access the command?
Can the exact behavior of the enable button be modified (say to prevent enabling the machine if certain inputs are not present)?