Page 1 of 1

Carousel Macro18

Posted: Fri Nov 26, 2021 2:44 pm
by repauli1
I am so close to getting the tool changer to function, but I am getting a "ERROR EXECUTING M18" . Has anyone run across this. Please note I added an underscore I "_I" to the end of CaroselAtHome (input28) to recognize it as an input easily. And also changed input to 44 for my system.
Any pointers appreciated, hope everyone had a great Thanksgiving!

Re: Carousel Macro18

Posted: Fri Nov 26, 2021 3:32 pm
by cncsnw
Report?

Re: Carousel Macro18

Posted: Sat Nov 27, 2021 1:30 am
by ashesman
repauli1 wrote: Fri Nov 26, 2021 2:44 pm I am so close to getting the tool changer to function, but I am getting a "ERROR EXECUTING M18" . Has anyone run across this. Please note I added an underscore I "_I" to the end of CaroselAtHome (input28) to recognize it as an input easily. And also changed input to 44 for my system.
Any pointers appreciated, hope everyone had a great Thanksgiving!
Changing a variable name to _I will not matter as long as you change it everywhere it appears, e.g. use find and replace. To match Centroid convention you should only use _I on an input.

First thing would be to check that input 44 (and all other tool change inputs) are wired and working correctly. On the main screen press Alt I. then check the inputs go red/green and have the expected polarity.

Another way to debug is to load the macro file mfunc18.mac (or whatever it is called) like you would load a normal g code program. Then step through the macro in single block mode until you find where the error is coming from.

I don't know for sure how the default M18 macro works, but it is possible that it is looking for the state of a particular input or memory bit that has been changed. By moving that signal to another input it may not now be aligned with the macro. M100 and M101 are used in the macros to check the state of inputs and memory bits. Remember that the M18 macro executes as a g code program. It has no knowledge of the PLC code or variable names like CaroselAtHome. It just uses M100 /50044 to check the state of input 44.

Re: Carousel Macro18

Posted: Sat Nov 27, 2021 9:53 am
by repauli1
Thanks, I think that points me in the right direction. I am only changing _I on inputs, and inputs and outputs have passed my function testing. I will load and do block by block.. great tip.