We are just finishing up our linuxcnc retrofit with Probe Basic on our Mazak VTC16B. Everything seems to work just fine, except we are having an issue with the controller not keeping track of the current pocket number (Parameter #3990). The machine has a 24 position index style carousel ATC. It indexes correctly and on the first try after indexing, it will grab or store the appropriate tool in the appropriate pocket using M6 commands. After the first toolchange though, it's almost as if the controller resets itself as starting from Pocket 1. The GUI shows the correct pocket that is supposed to be used.
For example, if we start with Tool 3 in our spindle, Pocket 3 empty, Tools 2 & 3 in pockets 2&3; just after indexing if we store Tool 3 in carousel, it will rotate to pocket 3 and store the tool. If we then run a M6 T2, instead of rotating -1 pocket to grab T2, it will rotate +1 pocket, as if it were starting back at pocket 1. When doing this, the GUI shows pocket 3 being the active pocket and rotating +1 to pocket 4.
I'm assuming it has something to do with parameter 3990 not being updated or called out properly. We had to make some changes to the default config to make it all work with our machine. I've attached some of the proper config files, would somebody be able to provide any insight on where to start diagnosing this?