I think that Mach decides where to send spindle commands to. If the spindle is assigned to port 0, then Mach should issue a ModBus command and the SS shouldn't hear about it. Spindle Speed is assigned to a Mach variable in the SS plugin. It uses the Spindle Index input to calculate the speed. I think the SmoothStepper plugin code is the problem. I'm surprised nobody else has reported this as a problem. The SS code doesn't look to see if the spindle is assigned to a valid SS port when it writes to the Mach variable that displays the spindle speed. I can make some changes to fix that. Additionally, I am thinking that I should relax the requirement of port and pin assignments. If it is not a valid port, then pop open the dialog that alerts the user. I will need to have a check box that says "Don't ask me again", since those people with Modbus controllers will not want to be bothered by this every time Mach starts or port and pin reassignment info is sent to the board.
I see a bit of a dilemma with respect to which device controls the display of the spindle RPM. For threading, it is imperative that the SS use the Index input (or in the future, the encoder A or B phase) directly on the SS. It needs that information immediately available, and it reports the spindle speed to Mach, and Mach calculates the trajectory based on the reported speed. Maybe it is possible to allow ModBus to update the spindle speed, but the SS will still need the Index input defined. In this case there would need to be an extra control that decided which device updates the Mach variable. That of course will be going away with Rev 4 of Mach. The plugin won't have access to those variables any more, so maybe it won't be a problem then. Mach will be using functions to transfer data back and forth, so it will be up to Mach to decide whether or not to use the data. Much better than multiple plugins each stomping on the same global variables. For now, if the Index input is define, the SS will update Mach's variable.
I'll look at it tomorrow and see if I can make a new plugin with that fix in it.
Greg