Hello Guest it is April 19, 2024, 05:03:18 PM

Author Topic: SmoothStepper Modbus RPM DRO conflict  (Read 14537 times)

0 Members and 1 Guest are viewing this topic.

SmoothStepper Modbus RPM DRO conflict
« on: December 14, 2010, 04:00:33 AM »
I have a Hitachi SJ200 VFD running Modbus installed on my system with a brain to convert/send RPM to the RPM DRO.  Without SmoothStepper running I have no problems running the spindle at speed or with the read back.
When the SmoothStepper is run I can start and stop the spindle but the RPM shows a constant 0.  I can monitor the brain and the correct RPM speed is being sent to the DRO. 
When I start Mach3 with the SmoothStepper I get the following error:

   Spindle-Axis Step Port= 0.  Valid values are 1 and 2.
   Spindle-Axis Direction Pin= 0.  Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 16, and 17


I tried switching Step and direction to unused pins on ports 1 and 2 without success.  The Modbus will only run with Spindle enabled on Port 0.
I am using the basic 1024.set screen set.

Attached is my xml file

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #1 on: December 14, 2010, 09:19:09 AM »
The SS plug-in tries to make sure that the Ports&Pins settings are sensible, I suspect that Greg never thought about using one with a spindle that is on ModBus such as this. Perhaps this is something he can change in the plug-in? Why does the ModBus plug-in require the spindle to be on Port 0?
Happy machining , Jeff Birt
 
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #2 on: December 14, 2010, 11:24:51 AM »
The SS plug-in tries to make sure that the Ports&Pins settings are sensible, I suspect that Greg never thought about using one with a spindle that is on ModBus such as this. Perhaps this is something he can change in the plug-in? Why does the ModBus plug-in require the spindle to be on Port 0?

The wiki says Modbus uses Port 0: In Mach3, one uses Port number zero to refer to the Modbus device
I also read somewhere (maybe the Modbus forum) that this is how others have set up their tools.
I did try using outputs from Ports 1 and 2 and still could not get a read back in the RPM DRO.

Attached are the Spindle and Motor Output settings that work with Modbus.

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #3 on: December 14, 2010, 12:07:08 PM »
I've not used a ModBus controlled spindle before, but I see a selection there in the Spindle Configuration page for a ModBus spindle. Is there a reason you are using a Brain rather than the built in functionality? Also, how do you have the spindle configured in the SmoothStepper configuration screen?
Happy machining , Jeff Birt
 
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #4 on: December 14, 2010, 12:21:18 PM »
I've not used a ModBus controlled spindle before, but I see a selection there in the Spindle Configuration page for a ModBus spindle. Is there a reason you are using a Brain rather than the built in functionality? Also, how do you have the spindle configured in the SmoothStepper configuration screen?

The Spindle Configuration page Modbus spindle is for the MOD/IO board and not for a directly connected to serial port Modbus device.  In the SmoothStepper configuration I have tried PWM and Step/Dir but I still get a constant 0 RPM in the DRO.

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #5 on: December 14, 2010, 12:24:22 PM »
Have you tried setting the SS config to None/Relay?
Happy machining , Jeff Birt
 
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #6 on: December 14, 2010, 12:27:12 PM »
Have you tried setting the SS config to None/Relay?

Jeff,

  Actually I have the setting at None/Relay.  I tried the other settings (PWM, Step/Dir) when I didn't get the correct RPM DRO reading.

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #7 on: December 14, 2010, 12:37:15 PM »
OK. I sent Greg a note about this. He has been working on the plug-in recently so maybe it is something he can look into. Can you attach the brain that your using, perhaps a tweak can be made there to get it to work.
Happy machining , Jeff Birt
 
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #8 on: December 14, 2010, 12:45:31 PM »
OK. I sent Greg a note about this. He has been working on the plug-in recently so maybe it is something he can look into. Can you attach the brain that your using, perhaps a tweak can be made there to get it to work.

Jeff,

  Attached is the brain I use to read RPM in Hz. from the VFD. convert to RPM, send to RPM DRO.
Re: SmoothStepper Modbus RPM DRO conflict
« Reply #9 on: December 15, 2010, 10:59:52 PM »
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