Machsupport Forum
Third party software and hardware support forums. => SmoothStepper USB => Topic started by: cncfreakcncfrea on November 07, 2012, 01:58:45 PM
-
Hi,
I want to do something like this with SS: http://www.youtube.com/watch?v=IvxzyV1I8T0,
I will do a test 1st by using a rotary encoder, CPR=2500, max. rpm=7200, (http://www.usdigital.com/products/e6?specification=single-ended-electrical) single ended and connect to SS's Port 2 pin 2&3. The port Pin 2-9 is set to inputs.
The encoder phase A&B is connected to pin 2 &3, 5v and gnd of encoder wired to Port3's 5v and gnd.
In Mach3 Ports&pin--->Encoder/mpg--> enabled Encoder 1---> A-port# = 2, A-pin#=2, B-port#=2, B-pin#=3, counts/unit=2500, velocity=7200rpm??
Is there anything else need to be configured in Mache3?
thanks,
Freddy
-
video link: http://s1204.photobucket.com/albums/bb407/cncfreakcncfreak/Forum/Machsupport/?action=view¤t=M4V05343.mp4
-
Are you trying to close the loop or just have encoder readouts?
If the latter then its no problem but if you are trying to use the encoder to close the loop then it will not be easy.
Hood
-
Hello Hood,
Option 2, Encoder readouts.
Can Mach3 do closed loop? or double closed loop for DC servo?
-
rogersmachine had sold a breakout board and plugin that would have mach keep track of any errors. the encoders would be read and updated on a dro on the screenset.
the error allowed had user settings. mach would estop if out of range of the error set. it worked well, but now use smoothetepper and never tried it since.
-
Dual closed loop is not really an option.Following error triggering is but then your drives do that already so is it worth it?
What I have often toyed with is the idea of keeping the logic side of my servo drives alive so that even if I whack the E-Stop the encoders are still tracked. I did a wee bit of VB for my reset button which looked to see if the encoder value was different from the position Mach thought it was and if so ask me whether I want to update or not. I had planned on using the Pokeys to input the encoder values but sadly there were issues with it missing counts with multiple encoders. This may have been cured now but at the time it didnt seem to be a priority for them to fix and I moved on.
Hood
-
From the video link I can change the value of the encoder position by rotating the encoder shaft, how do map the reading to the X DRO in the main page 'Program Run"?
About closed loop, if closed loop works, then I can add servo to my gantry which have big backlash on all axes.
-
You cant map that to the X DRO, the X DRO is under Mach control when using the parallel port.
To be able to use true closed loop back to Mach it would require you were using an external controller and that the plugin required for it updated the DROs, even then its not really Mach closing the loop.
If you have lots of backlash you can use comp but really the best way is to get rid of as much backlash as possible.
In one of the videos you linked to there is some form of closed loop going on but it is so slow it would, in my opinion, be of no use at all and may even make things worse.
Hood
-
How about swaping the OEM code of X DRO in 'Program Run' with 'Encoder 1 (X) position DRO' OEM code 29?
-
For what purpose?
If trying to close the loop then it would make no difference at all. If you swap out the X DRO for an encoder DRO that will not make Mach look at that DRO for positional information.
Hood
-
FWIW, the SmoothStepper plug-in sets the axis DROs in Mach based on where each axis actually is. It works something like this:
1) Mach plans moves
2) The SS plug-in sends the planned moves to the SmoothStepper
3) The SS reports back to Mach (sets DROs) on where each axis is.
-
Sorry forgot we were talking about the SS. The thing is however the SS plugin does not have any functionality in it to read endcoders and make updates to the position, unless however that has changed very recently?
Hood
-
No the SmoothStepper cannot use encoders as feedback.
-
Ok thanks Jeff.
Hood