I am writing a 5 axis post, and want to access the A B and C angles of the tool. The documentation says that the variable mom_tool_axis (an array) holds the A B and C of the tool. But when I try to use it in a custom command, the copiler complains that it is not an array. But if I use it as a simple variable, then I get an error at run time, complaining that the variable is an array!
Has any one used this variable, and has an example?
PS.: where is there more information on these variables than what the documentation provides? Some of these topics require more than a one paragraph description of the variable...
Solved! Go to Solution.
for example, if I write this:
then I get an error saying "can't read mom_tool_axis(0): variable isn't array"
What event? What has CAM replay to post done at that point? Everything up to the initial move may not have a tool axis yet. The review tool will help you diagnose when variables first start to be set.
... In other words - this code is inside what proc and from where is that proc called? The first event that most variables are populated by cam is Start Of Program. This does not mean all variables are alive and have values yet (there.) The review tool will help know when they become available.
... sorry - was a common editor of my responses. Try the code in the rapid move event - it will have the tool axis there (or I would be surprised if not.)
Ok, to clarify, this is an error that postbuilder gives me when I try to close the editor. In other words, I open the custom command, add the mom_tool_axis stuff, and then when I try to close it, it gives me that error message saying it's not an array.
I've tried putting it inside the rapid move event, same result.
... Actually - mom_tool_axis shows up for me in start of program (I didn't realize that.) Look for Ken's routine "MOOG_Show_Globals" by searching here. It will display all variables available at the calling point.