Machsupport Forum

Third party software and hardware support forums. => dspMC/IP Motion Controller => Topic started by: meatwad on February 13, 2013, 11:07:59 AM

Title: DSPMC Mach3 integration issues [SOLVED]
Post by: meatwad on February 13, 2013, 11:07:59 AM
We have a DSPMC/IP -S controller from Vital Systems, interfacing with Mach3 via direct connect Ethernet. Attempting to run a brushed servo motor with an Advanced Motion Controls drive. We have used these drives with our motors before, so I know that system isn’t an issue. The Advanced Motion Controls drive takes a +/-10v input and is connected to J2, pins 15 & 17. We have hooked up a linear encoder to Ch 0 (J6, pins 1, 2, 3, 4, 14, 15, 16, 17). We can see the encoder counting in Mach3 but when we try to jog the motor, there is no voltage change on any of the J2 pins (checked with DMM). I have also attached the log information if that helps. What you see is an attempt to jog the motor with no change in position. The error near the end is when I manually moved the linear encoder Any help or ideas would be greatly appreciated!

DSPMC plugin selected for Motion and I/O
Warning: Spindle Relays are disabled, spindle voltage will always be zeroThreadi
ng Setup Download: EncType 0, ENC# 0, CPR 1, Time 50
DSPMC/IP Online. Plugin: 3.28.2, DSPMC: 7762 / 0655, CPU Rev: 6
Sync & Still at Position X 0 Y 0 Z 0
myReset Estop = 0
Threading Setup Download: EncType 0, ENC# 0, CPR 1, Time 50
DSPMC PID Armed. Axis Enable: 7
Sync & Still at Position X 0 Y 0 Z 0
Jog Axis 0: Velicoty 380, Accel 4800, Distance -1.05e+006, Direction 1
Sync & Still at Position X 0 Y 0 Z 0
Jog Axis 0: Velicoty 380, Accel 4800, Distance 1.05e+006, Direction 0
Sync & Still at Position X 0 Y 0 Z 0
Jog Axis 0: Velicoty 380, Accel 4800, Distance -1.05e+006, Direction 1
Sync & Still at Position X 0 Y 0 Z 0
Jog Axis 0: Velicoty 380, Accel 4800, Distance -1.05e+006, Direction 1
Sync & Still at Position X 0 Y 0 Z 0
Jog Axis 0: Velicoty 380, Accel 4800, Distance -1.05e+006, Direction 1
Sync & Still at Position X 0 Y 0 Z 0
Jog Axis 0: Velicoty 380, Accel 4800, Distance 1.05e+006, Direction 0
Sync & Still at Position X 0 Y 0 Z 0
ERROR: Following Error Limit Exceeded on Axis 0. Servo Disarmed.New Spindle DAC
Voltage Transmitted 0.000000
Sync & Still at Position X 5486 Y 0 Z 0
myReset Estop = 0
DSPMC PID Armed. Axis Enable: 7
Sync & Still at Position X 5480 Y 0 Z 0
Config Changed
Notify Message Not Handled: 14
Servo Disarmed by Mach
New Spindle DAC Voltage Transmitted 0.000000
Sync & Still at Position X 0 Y 0 Z 0




Thanks,
Rich
Title: Re: DSPMC Mach3 integration issues
Post by: Vital System Support on February 13, 2013, 12:33:26 PM
Hello Rich,

Here are a few things:

- In the plugin configuration window, have you properly tuned the PID configuration?
- also (in the plugin configuration window), did you set the axis Input Source to "Machxx"?

There are quite a number of things you would need to do before you could perform motion in Mach3. The section "Mach3 Software Integration", in the User guide should contain a more detailed explanation of the steps. Hope that helps.
Title: Re: DSPMC Mach3 integration issues
Post by: TOTALLYRC on February 13, 2013, 04:22:36 PM
Hi Rich,
I just replaced my computer on my DSPMC powered mill so it is still fresh in my memory. Did you go into ports and pins and enable the axis that you want to use under motor outputs?
Then go into the plugin config page and set the PID tuning? I found that starting from P5000 and everything else 0 you you can tune from there. If you can,t get motion on the plugin config page you won' get it in Mach3.

If any of these suggestions don't work, come back and ask again. either Rufi or myself should be able to get you going.

Mike
Title: Re: DSPMC Mach3 integration issues
Post by: meatwad on February 14, 2013, 03:21:20 PM
Thanks for the help guys! We were able to work through the manual again and get things set up. We how have movement of the motor in the plug in configuration screen while tuning PID. The motor seems to be running fine but we are currently trying to figure out how to find the correct PID values other than pure trial and error (which hasn't seemed to be working for us). Any insight, resources or advice?


Thanks again!
Rich
Title: Re: DSPMC Mach3 integration issues
Post by: TOTALLYRC on February 14, 2013, 06:21:53 PM
Hi Rich,
Setting the PID is really trial and error.
Here is what I did on mine. I will assume inch measurements. I started with everything at 0. In the test motion section I put in short moves of .5 to 1 inch. Try a velocity of 100 and an accel of 10 to get started. Then I started putting in values for P until I got motion and had overshoot. P wound up being ~9000. Then I started adding D until it smoothed out and looked good on the graph. I then added a little I. Something on the order of 1 to 5 should do it. Too much I will make it take a long time to settle. I set a max error I of 10. A dead band of 3 -10 helps stop a lot of the dither when the machine is sitting idle. The deadband is in encoder counts so if you have a decent resolution encoder it will not even be noticeable in daily use. Once this all looked good I then add velocity feed forward which helps response. then I start adding in low pass filter. Low pass filter is adjusted in increments of 1 or 2. when you hit it just right it makes the motors nice and quiet when moving. Following error should be setat 1K to 2K to start. you can then tune it tighter depending on your machine requirements.

HTH.

Mike
Title: Re: DSPMC Mach3 integration issues
Post by: Vital System Support on February 14, 2013, 07:43:11 PM
please read the instructions of setting up PID in the user manual.  starting at page 40.  It talks about the PID filter parameters and some rules to follow.  Normally the customers get good results quickly working with the graph and the instructions in the manual.  We hardly get any support call for tuning.
Title: Re: DSPMC Mach3 integration issues
Post by: meatwad on February 15, 2013, 11:19:53 AM
Mike, you have been such a help! Thank you! We had been trying to follow the manual and it just wasn't working out for us (wouldn't have posted here if it was). Your information, combined with a few things from the manual, got us a very nice looking ramp with no overshoot. I attached a screenshot of our tune. Things seem to be running fine now, some of my numbers are a bit out of the range you used and the manual mentions but this may be acceptable and caused by varying hardware.

I'm sure I'll be back later with more questions. Haha! Thanks for your patience!




Rich
Title: Re: DSPMC Mach3 integration issues
Post by: Ghantos on March 16, 2014, 09:10:22 AM
hello Freinds!

i have a CNC router Bulleri (ITALY) works with CC100 controller.

now, i think how to use MACH3 to control it.
The machine has Bosch SM 10/20 servo drives that controlled with analouge input +-0-10v.

the control input i found in the elec.  layout is SW+ and SW- used to control the driver.

so can i use the DSPMC to control the axes only by connecting the SW+ and SW- ?? or i need to connect all the encoders and the tachometers ect....??? to the DSPMC.

also please let me know  any supplies for the DSPMC controllers.(kinds, IO's , Voltages...)

i want to to start now with the axes motion and later to use the I/O to control the machine functions

thank you in advanced.


Title: Re: DSPMC Mach3 integration issues
Post by: Vital System Support on March 17, 2014, 02:28:22 PM
To get motion, all you would need to do is to wire the +/-10V Analog Outputs and the signal ground from the DSPMC to your Servo Drives and wire the Encoder Feedback signals coming from your drives to the DSPMC.

The tachometers from the motors should be connected to your drives.

The system layout diagram can be found on the DSPMC webpage, somewhere in the middle part of the page. Wiring and hardware connections can be found in the DSPMC User Guide, Chapter 4: Hardware Interface Description. See port J2 for Analog Outputs, and ports J6 and J7 for encoder feedback.

Digital I/O can be wired to ports J4 and J5 on the DSPMC.  For 24Volt I/O, use the 7535P or 7535N breakout board on J4 or J5.

regards,
Rufi

Title: Re: DSPMC Mach3 integration issues
Post by: meatwad on April 15, 2014, 11:40:36 AM
Hello,
We are working through some more issues with our system. The command for this move was to move 1 inch on each axis. As you can see, the DRO is not showing a 1 inch movement. You can also see from our motor tuning screens that "steps per" should be 5080 for X and Y and 2693.531283 for Z. On the DSPMC status screen, the encoder and feedback values match each other but they do not match the expected values for a 1 inch move. Also, the "Cmd Pos" does not match our "steps per" for a 1 inch movement. We are unable to achieve consistent, accurate movement/readout. Any ideas?

We are running servo motors for X and Y and a stepper motor for Z, all with linear encoders.




Thanks,
Rich
Title: Re: DSPMC Mach3 integration issues
Post by: Vital System Support on April 15, 2014, 03:19:01 PM
Rich,

can you also post the screen shots of test motion graph for each axis.  this will help to pin point the issue lot quicker. 

also, if the PID tuning is not tight enough, the final position will not be close to commanded, or it may take more time to get to the commanded.

Regards,
Rufi
VSI

Title: Re: DSPMC Mach3 integration issues
Post by: meatwad on April 15, 2014, 04:00:34 PM
Here are the motion graph screens with a few PID modifications. I will also post the PID settings screenshots. We have also re-calibrated the Z-axis which changed the "steps per" count, I will post those settings as well. Thanks for looking at this.




Rich
Title: Re: DSPMC Mach3 integration issues
Post by: meatwad on April 15, 2014, 04:01:34 PM
More settings screens...
Title: Re: DSPMC Mach3 integration issues
Post by: meatwad on April 15, 2014, 04:02:50 PM
A few tweaks on the motor tuning as well.
Title: Re: DSPMC Mach3 integration issues
Post by: Vital System Support on April 15, 2014, 06:18:51 PM
your test motion obviously shows the PID tuning or drive response is not effective at all.  the blue and red lines should be as close as possible, ideally should overlap.   there could be a number of issues:
- PID tuning parameters need to be updated
- Servo Drive Gain setting is too low
- Servo drive and motor not capable of handling the load or velocity settings.

check your drives, they should deliver maximum velocity or maximum torque at +-10volts.

there is a section of pid tuning in the dspmc user manual.  please check that out for some tuning steps.

we can also login to your system to help you tune the pid parameters.  please email to support at vitalsystem dot com

thanks
rufi



Title: Re: DSPMC Mach3 integration issues
Post by: TOTALLYRC on April 17, 2014, 08:52:32 AM
To add to what Rufi has said your following error is so large that it is allowing the system to function when it should not. The greater the following error the farther from the true path you get before it faults out.

With 80k encoders on my mill I run a following error of 1k or less.

Based on my experience tuning my machines your "I" value is way too high. I normally end up with a value below 10 and on some systems it could be zero.

HTH
Mike
Title: Re: DSPMC Mach3 integration issues
Post by: meatwad on April 18, 2014, 03:38:44 PM
Thanks for the direction.We have tweaked the PID and achieved smoother movements and the machine is positioning closer but it is still not quite right. As you can see, we sent the x-axis 1 inch and it didn't quite make it there. The pulse count for one inch should be 5079.99999228, that is what the "Cmd Pos" reads but the "encoder" and "feedback" are still off. We have been able to get it to position within 1 thousandth of an inch but not consistently. The very next move may be off by 20 thousandths or it may also be within 1 thousandth.

We are running linear encoders, rack and pinion drive servo motors (Dunker w/15:1 gearbox) with Advanced Motion Control 16A20AC drives and DSPMC interface.



Thanks,
Rich
Title: Re: DSPMC Mach3 integration issues
Post by: TOTALLYRC on April 18, 2014, 07:50:54 PM
Hi Rich,
Your graph looks better but you still have a long way to go. Increase the D. I would guess it has to go way up. IIRC the D term is normally larger than the P by quite a bit. The quick tutorial says start with only the P term and keep going up until you have instability. I.E. The servo wont stay still and goes "crazy". don't let it do this for any length of time or damage may occur. Once you get to the point of instability, ad in the "D" term. IIRR D is normally 32 times the P term. There are of course no hard and fast rules on PID tuning but this should get you in the ball park. Once you have the P and the D where the system is running well with minimal following error, then add in small amounts of I. The small amounts of I allow for the system to get to the final position. Too much I and it can take quite a while for the system to get to the final position.

Hope this helps,
Mike
Title: Re: DSPMC Mach3 integration issues
Post by: Vital System Support on April 19, 2014, 02:03:06 PM
hi Rich,

you should test with short moves like quarter inch or less and at 2 to 3 times target accel and velocity.  this way at regular speeds you get even better results.

regards,
Rufi
Title: Re: DSPMC Mach3 integration issues
Post by: Joe406 on April 21, 2014, 04:06:19 PM
I am working with Rich on this issue.  I have followed the manual regarding the setup of the PID settings.  With the last posted settings I can get about 0.001" of accuracy on the initial move.  When I begin adding D to the setup it doesn't seem to change anything at all other than I seem to have to increase my max following error to allow any move at all.  Is there any other settings I can change that I may be missing?  Basically if I zero everything out and tell the machine to move to 5" it will be 5.001" on the first move.  If I send it to 10" and then back to 5" the results are 4.9895" to 5.0195".  I have started over and followed the manuals procedures multiple times.

Joe
Title: Re: DSPMC Mach3 integration issues
Post by: Vital System Support on April 22, 2014, 12:01:57 PM
Hello Rich,

We could do a remote login to your PC to help you with the tuning. You can add me on Skype: "marc.lim.vital", or call us at our office number if you're interested. We'll do our best to help you resolve the issue.

- Marc
Vital Systems Inc.
Title: Re: DSPMC Mach3 integration issues
Post by: Joe406 on April 23, 2014, 08:55:10 AM
Thank you Marc and Rufi for the quick response and all the help yesterday.  Watching you control my pc while talking me through the PID settings on the phone really helped!  I still have a few things to work out but I am in the right direction now.  I will post back if I run into any other issues.

Joe
Title: Re: DSPMC Mach3 integration issues
Post by: Joe406 on April 23, 2014, 09:57:15 AM
If I lower the I value a little will it speed up the amount of time it settlles on the movement?

Joe