Machsupport Forum

Third party software and hardware support forums. => dspMC/IP Motion Controller => Topic started by: xavi on April 06, 2010, 12:45:48 PM

Title: DSPMC AxisWorks Configuration
Post by: xavi on April 06, 2010, 12:45:48 PM
Dear All;
I am Xavi. I have posted on the forum few months ago about Interfacing OROM Servo Driver – Motor and DSPMC controller.   Following some suggestions and the user guides I have made all the connections for the two needed axis (X and Y).  I am trying to tune the motors with AXIS-WORK Rev 4.6 software but I am having lot of problems.  I don’t know for sure whether the problems are due to my connection or the chosen Axis work settings.  The motor encoder signal (passing through the servo driver) for axis X is connected to DSPMC (J6) Ch 0 and axis Y to Ch 1.

Using AXIS-WORK Rev 4.6 software Problem:
One of the axes (Y) is working fine, although I had to set the speed and acceleration to less than 6 and 10 respectively. Higher than this value the program gives a follow error.
AXIS – X
For this axis as soon as the PID is armed the motor automatically starts running and then stops and the program gives a follow error. Only when the feedback source is set to any channel other than where it’s connected, on the “configure control “option, the motor run when I press execute  but no changes on the position Axis display.  

I have tried solving it by connecting the motor encoder signal to channel 2, by changing the setting values (speed, acceleration, PID), or by grounding the analogue signal to motor (so that it never moves), but I still have the same problem (quick automatic start and stop).
I have swapped the axis connections between (axis X & Y) on the breakout board and found that whichever axis connected to DSPMC ch1 (J6) and analogue output 1(J4) the motor run fine without follow error on axiswork.  For the other I have problem.  


I wonder if some of you may have experienced this or have some ideas on how I might be able to solve it.  Looking forward to your replying.
 
PS: I have attached a .doc file of my connections. The pdf user guide of the servo and dspmc controller are on my previous post.

Regards

Xavi
Title: Re: DSPMC AxisWorks Configuration
Post by: Vital System Support on April 06, 2010, 11:45:37 PM
hi Xavi,

what is the input source index for the problem axis?. it should be same as the axis number.  any other value will make it a slave axis.  can you post the dspmc.xml file?

thanks
Rufi

Title: Re: DSPMC AxisWorks Configuration
Post by: xavi on April 07, 2010, 10:21:32 AM
Hi Rufi;

For the input source index, I use the same number as the selected axis. The setting on dspmc.xml are different from the ones I am using. As I have moved this file before into the MACH3 software folder, when i was installing the MACH3. Right now I am changing the setting from the axiswork software one axis at time.  

I have saved the control configuration and PID setting I am using for each axis. The problem axis being "axis 2" the setting was saved on "axis2_Y" file. The good axis is on "axis 1" setting saved as "axis1_X", the same PID values are used for both axis.
I have also included screenshot of the PID tuning graph for the good axis both in reverse . I was wonder if the curves
reflects a good result. Looking forward hearing from you.

Thanks

xavi
 
Title: Re: DSPMC AxisWorks Configuration
Post by: Vital System Support on April 07, 2010, 10:32:10 AM
hi Xavi,

looks like you need to change the polarity of the bad encoder.  there is a setting in the xml to do that so you dont have to swap the plus and minus encoder signals.  Please get the xml file from www.vitalsystem.com/dspmc (http://www.vitalsystem.com/dspmc), and then use that as base and make changes to match your system.  you can download this file from AxisWorks to dspmc, make changes and then save in the same dspmc.xml file. this way when you run Mach3, all settings are already done and matched with your machine.   You should have only one copy of dspmc.xml in your computer (backup copies with different name).

the graph time is too long. for tuning, it is better to keep the move within 1/2 second and at high speed.  the following-error is required in a servo pid system, so you cannot get rid of it completely.  but I can see there is lot of room for improvement in your graph.

thanks
Rufi

Title: Re: DSPMC AxisWorks Configuration
Post by: xavi on April 09, 2010, 08:44:16 AM
Hi Rufi;

Thanks you for your replay... The problem was on the polarity as you mentioned.  I am now trying to tune (by trial and error) both of the axis.  I have attached pictures of the corresponding axis S-curve, i am wondering if more improvement is needed in your opinion.  Also do have  any reference (website) that explain these parameter CFF and CDFF gain? Thanks again for your help.

Regards

Xavier
Title: Re: DSPMC AxisWorks Configuration
Post by: Vital System Support on April 09, 2010, 12:05:43 PM
hi Xavier

having 0 in the max error I while I term is non zero is not correct.  there must be a limit on the I term error, otherwise oscillations are uncontrolled.

try these pid settings, and tweak them based on the response you see on the graph.  looks like you are getting very close to having a good tune settings.

P 5000
I 50
D 100000
Scale 1500
Max Error I 400
everything else is 0

also increase the distance from .1 to .25.

I dont have good experience with cff and cdff.  and I dont use them.

if you see still see too much oscillation, then decrease max err I.  

regards,
Rufi
 


Title: Re: DSPMC AxisWorks Configuration
Post by: xavi on April 27, 2010, 02:59:15 PM
Dear Rufi;

My apologises for late replaying... I had a bit of set back as the labs were being used by student... I have played with the setting you suggested and attached a pic of the graph...

I have question on Starting DSPMC with Mach3... On DSPMC user manual I couldn't find information on the Map of J2 pins into Mach3... I am driving my axis through the DAC J2 pins... How are these mapped into Mach3...  or rather wht setting shold I use for Motor output on Mach3... Because the Mach3 Motor output setting it uses "step, direction" for the axis...     Looking forward to your replay...
Thanks in advance

xavi
Title: Re: DSPMC AxisWorks Configuration
Post by: Vital System Support on April 27, 2010, 03:28:43 PM
the tunning graph looks good.

for dac motor outputs, you dont need any setting in mach3.  it is loaded from dspmc.xml file.  make sure this file has all the correct settings and placed in c:\mach3 folder.  

there is a very nice editor Notepad++ which I use to edit dspmc.xml file.  download from http://sourceforge.net/projects/notepad-plus/files/ (http://sourceforge.net/projects/notepad-plus/files/)

thanks
Rufi
Title: Re: DSPMC AxisWorks Configuration
Post by: TOTALLYRC on April 28, 2010, 02:22:05 AM
+1 on Notepad++ ;D

In Mach3 under the config tab you will need to go into the ports and pins tab. From there you will need to go to motor outputs and click on the axes that you want to use. It will change from a red X to a green check mark.

Mike
Title: Re: DSPMC AxisWorks Configuration
Post by: xavi on May 03, 2010, 03:57:07 PM
Thanks Guys...

I am able to Jog motors with mach3, also the limit switches, e-stop are working fine... I trying to tune the axis (encoder count/mm) with mach3...
I am not sure wht should be the setting for RPM on the dspmc.xml file. The servo motor/driver user manual gives the number of encoder pulses of 2048 pulse/rev  and a encoder divider rate of 1000 pulse/rev.  i don't know which of these figure i should multiply by 4 and use as setting for the RPM....


Xavi
Title: Re: DSPMC AxisWorks Configuration
Post by: Vital System Support on May 03, 2010, 05:05:15 PM
hi Xavi,

the xml file section <RPM> <CountsPerRev_...> is not used by mach3.  the counts per unit (mm or inch) is entered in mach3 motor tuning window, as well as <Axis0><CountsPerUnit> fields in dspmc.xml file.

do you know the number of motor turns per mm?

eg 0.5 revs / mm x 1000 counts / rev x 4 = 2000 counts / mm


thank you
Rufi
 
Title: Re: DSPMC AxisWorks Configuration
Post by: xavi on May 04, 2010, 09:16:08 AM
Hi Rufi.

I don't know the motor turns/mm. I have tuned this setting with Mach3 axis calibration (under setting tabs) and used a dial gauge indicator (to give me the distance), Mach3 automatically gave me the pulse /mm.  I don't know yet how I am going to work out the backlash...  still trying to figure it out...

I am also having problem referencing the axis to its home position.
I have configured the home switch to be x-- (x-axis) and y-- (y-axis)... when i press the "Ref all home" the axis travels to the switch and once it finds it stops the program.  and the status box reads: "Limit switch triggered".   On diagnostic page both the "--Limit" and "Home Led" lights up as expected, but the program is not considering it as home switch when I tell it to home...  Any idea what might be the problem.  

Thanks

xavi
Title: Re: DSPMC AxisWorks Configuration
Post by: Vital System Support on May 04, 2010, 09:51:13 AM
In the dspmc.xml you can select to Ignore limit switches during homing:

<HomingIgnoreLimits>1</HomingIgnoreLimits>

that should fix your problem

Once you have figured out counts per mm, you can then move the axis manually and observe the backlash counts in the mach3 dspmc window.  then enter this backlash count value in dspmc.xml file for the selected axis.

regards,
Rufi

Title: Re: DSPMC AxisWorks Configuration
Post by: meatwad on February 12, 2013, 04:39:12 PM
I am having a different problem but with a similar setup. I am seeing no output to my motor drive but I checked C:\mach3 and I don't have a dspmc.xml file. In fact, I have searched my drive and I don't have one in any location. Is this something I need to download?



Thanks
Rich
Title: Re: DSPMC AxisWorks Configuration
Post by: Vital System Support on February 12, 2013, 05:31:38 PM
dspmc.xml is not used any more. it has been obsolete for some years now.   all system configuration is done inside mach3 and dspmc plugin config screens.