Re: [Emc-users] DIY output driver

2012-01-28 Thread andy pugh
On 28 January 2012 06:23, Viesturs Lācis viesturs.la...@gmail.com wrote:

 BTW client was happy, when he saw the first hand-burned lines in the
 wood that I managed to do last night in that small moment, when the
 laser was working...

Can I suggest two other options?

1) Put the existing laser into stock for a future project and buy
one of the ones shown on eBay earlier with a TTL on/off control.

or 2) Try to find an SSR that will do the trick, there are some that
look like they should work:
http://uk.rs-online.com/web/p/solid-state-relays/7203940/
(I found that one by filtering for current carrying capacity then
sorting by price, and looking down the list for the first DC-rated
one. It needs 10mA to switch, which I think is OK for a Mesa card)

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Homing

2012-01-28 Thread andy pugh
On 28 January 2012 11:33, Viesturs Lācis viesturs.la...@gmail.com wrote:

 I have set the homing sequence that Z homes first and then all the
 remaining joints.

If they share a home, they need to home in strict sequence one at a time.
However, reading more carefully, it sounds like you are homing Z to a
shared limit, but the other axes have home switches.

 What else am I missing here?

Possibly HOME_IS_SHARED ?
http://www.linuxcnc.org/docview/html/config_ini_homing.html


 After a long search I  found this one in manual:
 To use only one input for all homing and limits you will have to
 block the limits of the axis not homing with axis that is homing in
 HAL.

 I think that it could be done this way:
 loadrt mux2
 axis.2.homing = mux2.sel

mux2 doesn't work with boolean data, unfortunately.

 Is there any other simple and easy way to do it?

Guessing that you are looking at the inverted pins, so that 1 =
tripped, then you want limits AND NOT z-homing.
loadrt and2
loadrt not

net home-not axis.2.homing = not.0.in
net limit-mask and2.0.in0 = not.0.out
net all-limits-in and2.0.in1
net all-limits-out and2.0.out

 I have another problem:

 Z should home on its upper position and stay there.
 So in INI file I set:
 HOME =                  180.000
 HOME_OFFSET =           180.00

 It homes, sets joint coordinates to 180 and goes to 0 ignoring HOME = 180.

It's been a while, but I think HOME_OFFSET is the distance from the
switch point to the home position, so if the home switch is at 180 and
the home position is 180 then HOME_OFFSET is zero.


-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread John Thornton
Jon,

What is FF0 used for if it should be set to 0 for a motion axis?

Thanks
John

On 1/27/2012 8:16 PM, Jon Elson wrote:
 Viesturs Lācis wrote:
 In my previous attempts I had:
 DEADBAND =  0.0005
 P = 90
 I = 40
 D = 1,65
 FF0 = 0
 FF1 = 1,5
 FF2 = 0
 BIAS = 0,0005


 FF0 should always be zero on a motion axis. It creates an offset that
 varies with position.
 FF1 should always be much less than P. FF2 seems like it should always
 be much
 less than FF1. Too much D may cause instability.

 Jon

 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] question on gcode parsing

2012-01-28 Thread Michael Haberler
a bit of trawling yielded this:

http://fennetic.net/irc/emc3/src/emc/interpreter/

this has rs274 parsers done with ANTLR, and bison/flex

I have no idea what the status is

-m

Am 21.01.2012 um 16:31 schrieb Scott Hasse:

 All-
 
 I'm thinking about writing some gcode filters for EMC2 in python, and want
 to make these as robust and flexible as possible.  To that end, I'm
 wondering if there is a typical approach to parsing and validating
 arbitrary-format gcode into some sort of canonical form so that a
 text-based approach to transformation could be more generically written.  I
 see there is rs274 python bindings, but the API for that is not clear to
 me.  It seems it is for parsing gcode, but I don't see how I would use it
 to pretty print or normalize a gcode file for subsequent processing.
 
 In particular my first goal is a filter that would take XYZ input and with
 some parameters (radius, etc.) wrap the Y axis around an A axis.  Any
 advice on that particular problem or alternate approaches is certainly
 welcome.
 
 I've very much enjoying EMC2 and am working on my second machine conversion
 (an Anilam 3300) using Mesa 5i23 after finishing building and integrating a
 stepper-based rotary table:
 
 http://code.google.com/p/sector67-sandbox/wiki/FourthStepperAxis
 
 Thus my need for some software to generate A axis gcode :-)
 
 Thanks much!
 
 Scott
 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Homing

2012-01-28 Thread Spiderdab
  I have another problem:
 
  Z should home on its upper position and stay there.
  So in INI file I set:
  HOME =  180.000
  HOME_OFFSET =   180.00
 
  It homes, sets joint coordinates to 180 and goes to 0 ignoring HOME = 180.
 
 It's been a while, but I think HOME_OFFSET is the distance from the
 switch point to the home position, so if the home switch is at 180 and
 the home position is 180 then HOME_OFFSET is zero.
 
 
For what i know OFFSET should be the same of HOME, if you want the joint
to stay there. (at least my machine work like this..)
so:
HOME = 180.0
HOME_OFFSET = 180.0

Davide.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Homing

2012-01-28 Thread Viesturs Lācis
2012/1/28 andy pugh bodge...@gmail.com:

 mux2 doesn't work with boolean data, unfortunately.

I do not know, what is boolean, but You are right - it did not want to
work, because limit/homing switches are bit pins, mux2 inputs and
output are float.

So I created mux2bit component, where I fixed this...

So that part is working.

2012/1/28 Spiderdab 77...@tiscali.it:
  I have another problem:
 
  Z should home on its upper position and stay there.
  So in INI file I set:
  HOME =                  180.000
  HOME_OFFSET =           180.00

  It homes, sets joint coordinates to 180 and goes to 0 ignoring HOME = 180.

 It's been a while, but I think HOME_OFFSET is the distance from the
 switch point to the home position, so if the home switch is at 180 and
 the home position is 180 then HOME_OFFSET is zero.


 For what i know OFFSET should be the same of HOME, if you want the joint
 to stay there. (at least my machine work like this..)
 so:
 HOME = 180.0
 HOME_OFFSET = 180.0



Yes, I know that it _should_
But it does not!

Andy, it is working correctly up to the point, where it trips the
switch and sets the joint position as stated by home_offset.

The mysterious part is:
Why on earth it has to move to 0, when HOME is  set to be equal with
HOME_OFFSET, sho it should just stay there...

I am using 2.5.pre2-18-g799075f

BTW the best part is that both Y joints also are homing in their
positive end and they work correctly.

Here are the INI settings:

# Y1
[AXIS_1]

TYPE =  LINEAR
MAX_VELOCITY =  66.667
MAX_ACCELERATION =  120.0
BACKLASH =  0.000
FERROR =100.050
MIN_FERROR =100.010

# INPUT_SCALE =   3276.8
INPUT_SCALE =   -3276.8

OUTPUT_SCALE =  -71
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =66.667

MIN_LIMIT = 0.0
MAX_LIMIT = 1405.0
HOME =  1400.0
HOME_OFFSET =   1400
HOME_FINAL_VEL =10
HOME_SEARCH_VEL =   2
HOME_LATCH_VEL =-0.5
HOME_USE_INDEX =NO
HOME_IGNORE_LIMITS =YES
HOME_SEQUENCE = 1

# PID tuning params
DEADBAND =  0.002
P = 10
I = 0
D = 0
FF0 =   0
FF1 =   0
FF2 =   0
BIAS =  0



# Z
[AXIS_2]

TYPE =  LINEAR
HOME =  0.0
MAX_VELOCITY =  15
MAX_ACCELERATION =  60.0
STEPGEN_MAXACCEL =  70.0
BACKLASH =  0.000
SCALE = -400

MIN_LIMIT = -10.0
MAX_LIMIT = 20.0

FERROR = 0.050
MIN_FERROR = 0.005

HOME =  10.000
HOME_OFFSET =   10.00
HOME_SEARCH_VEL =   2.0
HOME_LATCH_VEL =-0.5
HOME_USE_INDEX =NO
HOME_IGNORE_LIMITS =YES
HOME_SEQUENCE = 0

# these are in nanoseconds
DIRSETUP   =  4000
DIRHOLD=  4000
STEPLEN=  4000
STEPSPACE  =  4000


# Y2
[AXIS_3]

TYPE =  LINEAR
MAX_VELOCITY =  66.667
MAX_ACCELERATION =  120.0
BACKLASH =  0.000
FERROR =100.050
MIN_FERROR =100.010

# INPUT_SCALE =   3276.8
INPUT_SCALE =   -3276.8

OUTPUT_SCALE =  -71
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =66.667

MIN_LIMIT = 0.0
MAX_LIMIT = 1405.0
HOME =  1400.0
HOME_OFFSET =   1400
HOME_FINAL_VEL =10
HOME_SEARCH_VEL =   2
HOME_LATCH_VEL =-0.5
HOME_USE_INDEX =NO
HOME_IGNORE_LIMITS =YES
HOME_SEQUENCE = 1

# PID tuning params
DEADBAND =  0.002
P = 380
I = 10
D = 1.9
FF0 =   0
FF1 =   0.1
FF2 =   0
BIAS =  0

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] question on gcode parsing

2012-01-28 Thread Kent A. Reed
On 1/28/2012 9:20 AM, Michael Haberler wrote:
 a bit of trawling yielded this:

 http://fennetic.net/irc/emc3/src/emc/interpreter/

 this has rs274 parsers done with ANTLR, and bison/flex

 I have no idea what the status is

 -m


Michael:

Interesting...the directory bits irc/emc3 certainly suggests irc 
conversations on the subject took place some five years ago. Did you 
look at the stuff in the irc/emc3/docs directory? The file 
EMC3_Architecture.doc reads like the conversations on this list the past 
few days.

I suppose a first item of business with the rs274ngc parser code would 
be to examine the grammar. As a start, I just looked at the Parser and 
rs274ngcTokenTypes files. I don't see a case statement or token for the 
O word, so some work has been left to the interested student with 
regard to the flow-control codes. I don't have time to dig deeper.

That this parser work already exists is another proof of something my 
thesis adviser told me long ago: there are rarely new ideas, just new 
attempts to implement them.

Regards,
Kent


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

 Date: Sat, 28 Jan 2012 11:25:00 +0200
 From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
 Reply-To: Enhanced Machine Controller (EMC)
 emc-users@lists.sourceforge.net
 To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Servo tuning - wtf?
 
 Hello!

 I have spent some time with the machine and have tried some of the 
 suggestions.

 2012/1/27 andy pugh bodge...@gmail.com:

 At that speed with a 2-pole motor a 1ms servo period ought to be OK,
 but you should try 500uS to see if that helps.


 This was the only thing that helped - I reduced servo period to 500 us
 and the motor oscillation borderline shifted from 3660 mm/min to 5114
 mm/min.
 Reducing servo period down to 250 us did not provide any additional 
 improvement.


 What happens if you disconnect the PID (and the motors from the
 machine!) and setp bldc.0.value 0.95 ?


 I did the following:
 # net motor.00.command  pid.0.output  =  bldc.0.value
 setp bldc.0.value 0.95

 Result: nothing. Motor does not move.

 If I change back:
 net motor.00.command  pid.0.output  =  bldc.0.value
 # setp bldc.0.value 0.95

 Then I can jog motor.

 I tried 3 times switching back and forth - with PID disconected and
 BLDC value set to 0,95 motor does not move.

Thats very strange, the motor should run at full speed with a fixed bldc drive 
value. Can you post your hal file somewhere (like pastebin.com)



 2012/1/27 Peter C. Wallace p...@mesanet.com:

 So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is 166.67) that
 will limit maximum PWM to the desired 95%


 I reduced those values and also set max output to be less than 95% of
 output scale:
 OUTPUT_SCALE =  125
 OUTPUT_OFFSET = 0.0
 MAX_OUTPUT =118

 It did not provide any additional improvement.

It would not provide any improvement, just prevent pathological behaviour if 
the PID sets the PWM to 100% (which should be prevented)




 So this far only reducing servo period did help. Unfortunately that is
 coming with RTAI error warning messages. I ran latency test for a
 while and got 12000 ns max jitter on servo thread.

 Viesturs

Is this on a 5I23?

2 KHz should be easy (I am running a 8I20 test at 6 KHz currently with a 5I23)

Do you have a base thread? (you shouldn't need one)


 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread noel
All interested in Servo Tuning.

Have a look at:
http://support.motioneng.com/Downloads-Notes/Tuning/default.htm

Regards,

Noel.

-Original Message-
From: Viesturs Lācis [mailto:viesturs.la...@gmail.com] 
Sent: Saturday, January 28, 2012 1:25 AM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Servo tuning - wtf?

Hello!

I have spent some time with the machine and have tried some of the
suggestions.

2012/1/27 andy pugh bodge...@gmail.com:

 At that speed with a 2-pole motor a 1ms servo period ought to be OK, 
 but you should try 500uS to see if that helps.


This was the only thing that helped - I reduced servo period to 500 us and
the motor oscillation borderline shifted from 3660 mm/min to 5114 mm/min.
Reducing servo period down to 250 us did not provide any additional
improvement.


 What happens if you disconnect the PID (and the motors from the
 machine!) and setp bldc.0.value 0.95 ?


I did the following:
# net motor.00.command  pid.0.output  =  bldc.0.value setp bldc.0.value
0.95

Result: nothing. Motor does not move.

If I change back:
net motor.00.command  pid.0.output  =  bldc.0.value # setp bldc.0.value
0.95

Then I can jog motor.

I tried 3 times switching back and forth - with PID disconected and BLDC
value set to 0,95 motor does not move.

2012/1/27 Peter C. Wallace p...@mesanet.com:

 So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is 
 166.67) that will limit maximum PWM to the desired 95%


I reduced those values and also set max output to be less than 95% of output
scale:
OUTPUT_SCALE =  125
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =118

It did not provide any additional improvement.

So this far only reducing servo period did help. Unfortunately that is
coming with RTAI error warning messages. I ran latency test for a while and
got 12000 ns max jitter on servo thread.

Viesturs


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers is
just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro
Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] question on gcode parsing

2012-01-28 Thread Michael Haberler

Am 28.01.2012 um 16:20 schrieb Kent A. Reed:

 On 1/28/2012 9:20 AM, Michael Haberler wrote:
 
 http://fennetic.net/irc/emc3/src/emc/interpreter/
 
 
 I suppose a first item of business with the rs274ngc parser code would 
 be to examine the grammar. As a start, I just looked at the Parser and 
 rs274ngcTokenTypes files. I don't see a case statement or token for the 
 O word, so some work has been left to the interested student with 
 regard to the flow-control codes. I don't have time to dig deeper.

I'm having a look at bison parser, I'm more familiar with that.

The syntax clearly predates O-word control structure; UV missing too. It's 
pretty much from the EBNF in the RS274NGC_3 paper.

This obviously never reached production stage - there are numerous typos 
although it compiles. Looks ok to shorten the way though.

.m



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Jon Elson
Kent A. Reed wrote:

 I don't interpret this simple method to mean add I to increase 
 stability but perhaps that just shows I don't know PID theory and practice.

   
 and I was wondering about this.  I agree with you that it is D that
 increases stability
 (up to a point).  If this is truly a typo, we need to get it corrected.
 

 If you could identify the problem sections I'd be happy to help 
 reconcile them.
   
It may be in the Wiki section that John Kasunich (I think) wrote about 
PID.  If it is
from him, then either it is something I still don't understand, or is a 
simple typo.
I had been reluctant to report it as an error, as it seemed wrong to me, 
but I
was still thinking it might be due to my lack of deeper understanding, 
and might
actually be correct.  I will look this weekend for the place(s) it 
appears and
document that, at least.

Jon

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Jon Elson
John Thornton wrote:
 Jon,

 What is FF0 used for if it should be set to 0 for a motion axis?
   
I used to think it was useless, but if you use the PID for a spindle 
speed control,
for instance, then it is quite useful for a velocity servo.  It serves 
about the same
purpose as FF1 in a positioning servo.  In a positioning servo, it would 
add an
offset proportional to position.  In a velocity servo, it would add an 
offset
proportional to speed, thereby correcting for finite gain in the loop.

Jon

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace p...@mesanet.com:


 I tried 3 times switching back and forth - with PID disconected and
 BLDC value set to 0,95 motor does not move.

 Thats very strange, the motor should run at full speed with a fixed bldc drive
 value. Can you post your hal file somewhere (like pastebin.com)


Done:
http://pastebin.com/0M1ASyhB

I tried one more, this time with joint1 (Y1 section in HAL file).
What I did:
Changed to trivkins
Added setp bldc.1.value 0.95
Commented out pid.1.out = bldc.1.value

Still the same - no movement.
If I reattach pid.1, I can jog the motor.



 It would not provide any improvement, just prevent pathological behaviour if
 the PID sets the PWM to 100% (which should be prevented)




 So this far only reducing servo period did help. Unfortunately that is
 coming with RTAI error warning messages. I ran latency test for a
 while and got 12000 ns max jitter on servo thread.


 Is this on a 5I23?


Yes, 5i23 with 2x 7i39s.


 2 KHz should be easy (I am running a 8I20 test at 6 KHz currently with a 5I23)

 Do you have a base thread? (you shouldn't need one)


No base thead.
The PC is:
Intel D525MW
2GB RAM
4GB CompactFlash in SATA adapter


I have been trying to get the tuning right.
So far I have managed to get one motor move smoothly up to 4000
mm/min. In HALScope it seems that f-error stays within 0,1 mm during
movement, which I find to be accetable, static f-error is less than
0,003 mm.

Here are PID parameters for that motor:
# PID tuning params
DEADBAND =  0.002
P = 380
I = 10
D = 1.9
FF0 =   0
FF1 =   0.1
FF2 =   0
BIAS =  0

I hav a problem with remaining 2 motors.
Firstly I thought that I might copy these settings, since drives and
motors are equal and then try to adjust for the different load.
That failed.
Then I started from scratch and I cannot find any settings to turn the
motors smoothly. I set everything to 0, P to 1 and it is already
oscillating. Then I set P and got joint exceeded following error.
The f-error is set to 100 mm, so obviously P should be higher.
I have tried numerous values between 1 and 300, but nowehere I get
smooth motion.

What should I do?

2012. gada 28. janvāris 18:14 noel noel.ro...@comcast.net rakstīja:
 All interested in Servo Tuning.

 Have a look at:
 http://support.motioneng.com/Downloads-Notes/Tuning/default.htm


Thank You! I will do some reading.

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread James Louis
Thank you Noel.
Also for those interested in determining which one of six servo control system 
models their particular hardware falls into (so you know which parameters to 
change BEFORE tuning) buy this book:
Control System Design Guide by George Ellis
It helped me a great deal.
Jim

- Original Message -
From: noel noel.ro...@comcast.net
To: 'Enhanced Machine Controller (EMC)' emc-users@lists.sourceforge.net
Sent: Sat Jan 28 10:14:09 2012
Subject: Re: [Emc-users] Servo tuning - wtf?

All interested in Servo Tuning.

Have a look at:
http://support.motioneng.com/Downloads-Notes/Tuning/default.htm

Regards,

Noel.

-Original Message-
From: Viesturs Lācis [mailto:viesturs.la...@gmail.com]
Sent: Saturday, January 28, 2012 1:25 AM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] Servo tuning - wtf?

Hello!

I have spent some time with the machine and have tried some of the
suggestions.

2012/1/27 andy pugh bodge...@gmail.com:

 At that speed with a 2-pole motor a 1ms servo period ought to be OK,
 but you should try 500uS to see if that helps.


This was the only thing that helped - I reduced servo period to 500 us and
the motor oscillation borderline shifted from 3660 mm/min to 5114 mm/min.
Reducing servo period down to 250 us did not provide any additional
improvement.


 What happens if you disconnect the PID (and the motors from the
 machine!) and setp bldc.0.value 0.95 ?


I did the following:
# net motor.00.command  pid.0.output  =  bldc.0.value setp bldc.0.value
0.95

Result: nothing. Motor does not move.

If I change back:
net motor.00.command  pid.0.output  =  bldc.0.value # setp bldc.0.value
0.95

Then I can jog motor.

I tried 3 times switching back and forth - with PID disconected and BLDC
value set to 0,95 motor does not move.

2012/1/27 Peter C. Wallace p...@mesanet.com:

 So if you set the PID comps MAX_OUTPUT to 158 (and PWM scale is
 166.67) that will limit maximum PWM to the desired 95%


I reduced those values and also set max output to be less than 95% of output
scale:
OUTPUT_SCALE =  125
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =118

It did not provide any additional improvement.

So this far only reducing servo period did help. Unfortunately that is
coming with RTAI error warning messages. I ran latency test for a while and
got 12000 ns max jitter on servo thread.

Viesturs


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers is
just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro
Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

This communication is for the use of the intended recipient only. It may 
contain information that is privileged and confidential. If you are not the 
intended recipient of this communication, the disclosure, copying, distribution 
or use hereof is prohibited. If you have received this communication in error, 
please advise me by return e-mail or by telephone and then delete it 
immediately.
attachment: winmail.dat--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012. gada 28. janvāris 18:14 noel noel.ro...@comcast.net rakstīja:
 All interested in Servo Tuning.

 Have a look at:
 http://support.motioneng.com/Downloads-Notes/Tuning/default.htm


In the link from Noel I find that all three  (well, the last maybe not
that much) PID tuning methods:
http://support.motioneng.com/Downloads-Notes/Tuning/3_pid_tune.htm

Suggest starting with finding correct D parameter, as opposed to
previously expressed opinions that P parameter is the one to start
with.

Can anyone with experience in servo tuning comment on this?


Can anyone comment on this?

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Spiderdab
Il giorno sab, 28/01/2012 alle 08.14 -0800, noel ha scritto:
 All interested in Servo Tuning.
 
 Have a look at:
 http://support.motioneng.com/Downloads-Notes/Tuning/default.htm
 
 Regards,
 
 Noel.
Really much interesting!
Thanks!

Davide.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace

On Sat, 28 Jan 2012, Viesturs L?cis wrote:


Date: Sat, 28 Jan 2012 18:42:03 +0200
From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
Reply-To: Enhanced Machine Controller (EMC)
emc-users@lists.sourceforge.net
To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Servo tuning - wtf?

2012/1/28 Peter C. Wallace p...@mesanet.com:



I tried 3 times switching back and forth - with PID disconected and
BLDC value set to 0,95 motor does not move.


Thats very strange, the motor should run at full speed with a fixed bldc drive
value. Can you post your hal file somewhere (like pastebin.com)



Done:
http://pastebin.com/0M1ASyhB

I tried one more, this time with joint1 (Y1 section in HAL file).
What I did:
Changed to trivkins
Added setp bldc.1.value 0.95
Commented out pid.1.out = bldc.1.value

Still the same - no movement.
If I reattach pid.1, I can jog the motor.




It would not provide any improvement, just prevent pathological behaviour if
the PID sets the PWM to 100% (which should be prevented)





So this far only reducing servo period did help. Unfortunately that is
coming with RTAI error warning messages. I ran latency test for a
while and got 12000 ns max jitter on servo thread.



Is this on a 5I23?



Yes, 5i23 with 2x 7i39s.



2 KHz should be easy (I am running a 8I20 test at 6 KHz currently with a 5I23)

Do you have a base thread? (you shouldn't need one)



No base thead.
The PC is:
Intel D525MW
2GB RAM
4GB CompactFlash in SATA adapter


I have been trying to get the tuning right.
So far I have managed to get one motor move smoothly up to 4000
mm/min. In HALScope it seems that f-error stays within 0,1 mm during
movement, which I find to be accetable, static f-error is less than
0,003 mm.

Here are PID parameters for that motor:
# PID tuning params
DEADBAND =  0.002
P = 380
I = 10
D = 1.9
FF0 =   0
FF1 =   0.1
FF2 =   0
BIAS =  0

I hav a problem with remaining 2 motors.
Firstly I thought that I might copy these settings, since drives and
motors are equal and then try to adjust for the different load.
That failed.
Then I started from scratch and I cannot find any settings to turn the
motors smoothly. I set everything to 0, P to 1 and it is already
oscillating. Then I set P and got joint exceeded following error.
The f-error is set to 100 mm, so obviously P should be higher.
I have tried numerous values between 1 and 300, but nowehere I get
smooth motion.


What should I do?




Sounds like your commutation is wrong, no amount of tuning will help this
(wrong Hall order if you are using Halls wron paratmeyets if you are using q 
mode etc etc)




2012. gada 28. janv??ris 18:14 noel noel.ro...@comcast.net rakst??ja:

All interested in Servo Tuning.

Have a look at:
http://support.motioneng.com/Downloads-Notes/Tuning/default.htm



Thank You! I will do some reading.

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace p...@mesanet.com:

 Sounds like your commutation is wrong, no amount of tuning will help this
 (wrong Hall order if you are using Halls wron paratmeyets if you are using q
 mode etc etc)


Any tips on troubleshooting?

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

 Date: Sat, 28 Jan 2012 19:56:50 +0200
 From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
 Reply-To: Enhanced Machine Controller (EMC)
 emc-users@lists.sourceforge.net
 To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Servo tuning - wtf?
 
 2012/1/28 Peter C. Wallace p...@mesanet.com:

 Sounds like your commutation is wrong, no amount of tuning will help this
 (wrong Hall order if you are using Halls wron paratmeyets if you are using q
 mode etc etc)


 Any tips on troubleshooting?

 Viesturs


Yes do what you are doing: PID with small P (perhaps even less than 1)
and nothing else.


Note that since this uses a 7I39 I know the motors are small enough to be safe 
to turn by hand, Don't do this with a large motor or with any attached 
hardware that can cut or pinch you!

Start the axis and turn the motor shaft by hand from the
holding position. The torque resisting the shaft rotation should increase as 
you move from the starting position and if the P number is small enough 
should feel like winding a spring. This force should be symmetrical in both 
directions of motion.

If it feels coggy or snaps to other null (no force) positions, commutation is 
not working (in h mode this likely means the Halls are not 
connected/notconnected right or the hall mode is wrong



 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace p...@mesanet.com:

 If it feels coggy or snaps to other null (no force) positions, commutation is
 not working (in h mode this likely means the Halls are not
 connected/notconnected right or the hall mode is wrong


Is bldc.n.pattern meant with hall mode?

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

 Date: Sat, 28 Jan 2012 20:37:17 +0200
 From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
 Reply-To: Enhanced Machine Controller (EMC)
 emc-users@lists.sourceforge.net
 To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Servo tuning - wtf?
 
 2012/1/28 Peter C. Wallace p...@mesanet.com:

 If it feels coggy or snaps to other null (no force) positions, commutation is
 not working (in h mode this likely means the Halls are not
 connected/notconnected right or the hall mode is wrong


 Is bldc.n.pattern meant with hall mode?


yes

 Viesturs

 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

 Date: Sat, 28 Jan 2012 20:37:17 +0200
 From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
 Reply-To: Enhanced Machine Controller (EMC)
 emc-users@lists.sourceforge.net
 To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Servo tuning - wtf?
 
 2012/1/28 Peter C. Wallace p...@mesanet.com:

 If it feels coggy or snaps to other null (no force) positions, commutation is
 not working (in h mode this likely means the Halls are not
 connected/notconnected right or the hall mode is wrong


 Is bldc.n.pattern meant with hall mode?

 Viesturs

You could also verify that the Hall signals connected to
the BLDC component are identical for the working and non working
axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)



 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace p...@mesanet.com:

 You could also verify that the Hall signals connected to
 the BLDC component are identical for the working and non working
 axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)


I will just switch off motor power, Hall and encoder power is supplied
from PC PSU, so it will remain.

I will report back in a minute.

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Homing

2012-01-28 Thread Frank Tkalcevic
In AXIS_1 and AXIS_2 section, you have HOME defined twice.  Once at 0, the
other at 10.0.

 -Original Message-
 From: Viesturs Lacis [mailto:viesturs.la...@gmail.com]
 Sent: Sunday, 29 January 2012 2:08 AM
 To: Enhanced Machine Controller (EMC)
 Subject: Re: [Emc-users] Homing
 
 2012/1/28 andy pugh bodge...@gmail.com:
 
  mux2 doesn't work with boolean data, unfortunately.
 
 I do not know, what is boolean, but You are right - it did not want to
work,
 because limit/homing switches are bit pins, mux2 inputs and output are
float.
 
 So I created mux2bit component, where I fixed this...
 
 So that part is working.
 
 2012/1/28 Spiderdab 77...@tiscali.it:
   I have another problem:
  
   Z should home on its upper position and stay there.
   So in INI file I set:
   HOME =                  180.000
   HOME_OFFSET =           180.00
 
   It homes, sets joint coordinates to 180 and goes to 0 ignoring HOME =
 180.
 
  It's been a while, but I think HOME_OFFSET is the distance from the
  switch point to the home position, so if the home switch is at 180
  and the home position is 180 then HOME_OFFSET is zero.
 
 
  For what i know OFFSET should be the same of HOME, if you want the
  joint to stay there. (at least my machine work like this..)
  so:
  HOME = 180.0
  HOME_OFFSET = 180.0
 
 
 
 Yes, I know that it _should_
 But it does not!
 
 Andy, it is working correctly up to the point, where it trips the switch
and sets
 the joint position as stated by home_offset.
 
 The mysterious part is:
 Why on earth it has to move to 0, when HOME is  set to be equal with
 HOME_OFFSET, sho it should just stay there...
 
 I am using 2.5.pre2-18-g799075f
 
 BTW the best part is that both Y joints also are homing in their positive
end
 and they work correctly.
 
 Here are the INI settings:
 
 # Y1
 [AXIS_1]
 
 TYPE =  LINEAR
 MAX_VELOCITY =  66.667
 MAX_ACCELERATION =  120.0
 BACKLASH =  0.000
 FERROR =100.050
 MIN_FERROR =100.010
 
 # INPUT_SCALE =   3276.8
 INPUT_SCALE =   -3276.8
 
 OUTPUT_SCALE =  -71
 OUTPUT_OFFSET = 0.0
 MAX_OUTPUT =66.667
 
 MIN_LIMIT = 0.0
 MAX_LIMIT = 1405.0
 HOME =  1400.0
 HOME_OFFSET =   1400
 HOME_FINAL_VEL =  10
 HOME_SEARCH_VEL =   2
 HOME_LATCH_VEL =-0.5
 HOME_USE_INDEX =NO
 HOME_IGNORE_LIMITS =YES
 HOME_SEQUENCE =   1
 
 # PID tuning params
 DEADBAND =  0.002
 P = 10
 I = 0
 D = 0
 FF0 =   0
 FF1 =   0
 FF2 = 0
 BIAS =  0
 
 
 
 # Z
 [AXIS_2]
 
 TYPE =  LINEAR
 HOME =  0.0
 MAX_VELOCITY =  15
 MAX_ACCELERATION =  60.0
 STEPGEN_MAXACCEL =  70.0
 BACKLASH =0.000
 SCALE =   -400
 
 MIN_LIMIT = -10.0
 MAX_LIMIT = 20.0
 
 FERROR = 0.050
 MIN_FERROR = 0.005
 
 HOME =10.000
 HOME_OFFSET =   10.00
 HOME_SEARCH_VEL =   2.0
 HOME_LATCH_VEL =-0.5
 HOME_USE_INDEX =NO
 HOME_IGNORE_LIMITS =YES
 HOME_SEQUENCE =   0
 
 # these are in nanoseconds
 DIRSETUP   =  4000
 DIRHOLD=  4000
 STEPLEN=  4000
 STEPSPACE  =  4000
 
 
 # Y2
 [AXIS_3]
 
 TYPE =  LINEAR
 MAX_VELOCITY =  66.667
 MAX_ACCELERATION =  120.0
 BACKLASH =  0.000
 FERROR =100.050
 MIN_FERROR =100.010
 
 # INPUT_SCALE =   3276.8
 INPUT_SCALE =   -3276.8
 
 OUTPUT_SCALE =  -71
 OUTPUT_OFFSET = 0.0
 MAX_OUTPUT =66.667
 
 MIN_LIMIT = 0.0
 MAX_LIMIT = 1405.0
 HOME =  1400.0
 HOME_OFFSET =   1400
 HOME_FINAL_VEL =  10
 HOME_SEARCH_VEL =   2
 HOME_LATCH_VEL =-0.5
 HOME_USE_INDEX =NO
 HOME_IGNORE_LIMITS =YES
 HOME_SEQUENCE =   1
 
 # PID tuning params
 DEADBAND =  0.002
 P = 380
 I = 10
 D = 1.9
 FF0 =   0
 FF1 =   0.1
 FF2 = 0
 BIAS =  0
 
 Viesturs
 


--
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers is
 just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro
 Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users



Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Viesturs Lācis viesturs.la...@gmail.com:
 2012/1/28 Peter C. Wallace p...@mesanet.com:

 You could also verify that the Hall signals connected to
 the BLDC component are identical for the working and non working
 axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)


 I will just switch off motor power, Hall and encoder power is supplied
 from PC PSU, so it will remain.

 I will report back in a minute.


I watched all 3 hall signals for both bldc components - the one that
works and the one of nonworking. The signal changing order is the
same.
At first I turned each motor so that hall1 is true, remaining 2 are
false. Then I very slowly turned the working motor until any signal
changed (hall3 went true), so then I very slowly turned nonworking
motor until any signal changed status. And all the time they matched
(X is true, blank is false):
hall1  hall2  hall 3
  X
  X X
 X
X   X
X
  XX
  X

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Homing

2012-01-28 Thread sam sokolik
Good catch!

(I was looking it over as my machine homes at its upper limit.  
(38,36,24) and I know that works and is setup similar to the setup below)

On 01/28/2012 01:00 PM, Frank Tkalcevic wrote:
 In AXIS_1 and AXIS_2 section, you have HOME defined twice.  Once at 0, the
 other at 10.0.

 -Original Message-
 From: Viesturs Lacis [mailto:viesturs.la...@gmail.com]
 Sent: Sunday, 29 January 2012 2:08 AM
 To: Enhanced Machine Controller (EMC)
 Subject: Re: [Emc-users] Homing

 2012/1/28 andy pughbodge...@gmail.com:
 mux2 doesn't work with boolean data, unfortunately.
 I do not know, what is boolean, but You are right - it did not want to
 work,
 because limit/homing switches are bit pins, mux2 inputs and output are
 float.
 So I created mux2bit component, where I fixed this...

 So that part is working.

 2012/1/28 Spiderdab77...@tiscali.it:
 I have another problem:

 Z should home on its upper position and stay there.
 So in INI file I set:
 HOME =  180.000
 HOME_OFFSET =   180.00
 It homes, sets joint coordinates to 180 and goes to 0 ignoring HOME =
 180.
 It's been a while, but I think HOME_OFFSET is the distance from the
 switch point to the home position, so if the home switch is at 180
 and the home position is 180 then HOME_OFFSET is zero.


 For what i know OFFSET should be the same of HOME, if you want the
 joint to stay there. (at least my machine work like this..)
 so:
 HOME = 180.0
 HOME_OFFSET = 180.0


 Yes, I know that it _should_
 But it does not!

 Andy, it is working correctly up to the point, where it trips the switch
 and sets
 the joint position as stated by home_offset.

 The mysterious part is:
 Why on earth it has to move to 0, when HOME is  set to be equal with
 HOME_OFFSET, sho it should just stay there...

 I am using 2.5.pre2-18-g799075f

 BTW the best part is that both Y joints also are homing in their positive
 end
 and they work correctly.

 Here are the INI settings:

 # Y1
 [AXIS_1]

 TYPE =  LINEAR
 MAX_VELOCITY =  66.667
 MAX_ACCELERATION =  120.0
 BACKLASH =  0.000
 FERROR =100.050
 MIN_FERROR =100.010

 # INPUT_SCALE =   3276.8
 INPUT_SCALE =   -3276.8

 OUTPUT_SCALE =  -71
 OUTPUT_OFFSET = 0.0
 MAX_OUTPUT =66.667

 MIN_LIMIT = 0.0
 MAX_LIMIT = 1405.0
 HOME =  1400.0
 HOME_OFFSET =   1400
 HOME_FINAL_VEL = 10
 HOME_SEARCH_VEL =   2
 HOME_LATCH_VEL =-0.5
 HOME_USE_INDEX =NO
 HOME_IGNORE_LIMITS =YES
 HOME_SEQUENCE =  1

 # PID tuning params
 DEADBAND =  0.002
 P = 10
 I = 0
 D = 0
 FF0 =   0
 FF1 =   0
 FF2 =0
 BIAS =  0



 # Z
 [AXIS_2]

 TYPE =  LINEAR
 HOME =  0.0
 MAX_VELOCITY =  15
 MAX_ACCELERATION =  60.0
 STEPGEN_MAXACCEL =  70.0
 BACKLASH =   0.000
 SCALE =  -400

 MIN_LIMIT = -10.0
 MAX_LIMIT = 20.0

 FERROR = 0.050
 MIN_FERROR = 0.005

 HOME =   10.000
 HOME_OFFSET =   10.00
 HOME_SEARCH_VEL =   2.0
 HOME_LATCH_VEL =-0.5
 HOME_USE_INDEX =NO
 HOME_IGNORE_LIMITS =YES
 HOME_SEQUENCE =  0

 # these are in nanoseconds
 DIRSETUP   =  4000
 DIRHOLD=  4000
 STEPLEN=  4000
 STEPSPACE  =  4000


 # Y2
 [AXIS_3]

 TYPE =  LINEAR
 MAX_VELOCITY =  66.667
 MAX_ACCELERATION =  120.0
 BACKLASH =  0.000
 FERROR =100.050
 MIN_FERROR =100.010

 # INPUT_SCALE =   3276.8
 INPUT_SCALE =   -3276.8

 OUTPUT_SCALE =  -71
 OUTPUT_OFFSET = 0.0
 MAX_OUTPUT =66.667

 MIN_LIMIT = 0.0
 MAX_LIMIT = 1405.0
 HOME =  1400.0
 HOME_OFFSET =   1400
 HOME_FINAL_VEL = 10
 HOME_SEARCH_VEL =   2
 HOME_LATCH_VEL =-0.5
 HOME_USE_INDEX =NO
 HOME_IGNORE_LIMITS =YES
 HOME_SEQUENCE =  1

 # PID tuning params
 DEADBAND =  0.002
 P = 380
 I = 10
 D = 1.9
 FF0 =   0
 FF1 =   0.1
 FF2 =0
 BIAS =  0

 Viesturs


 
 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers is
 just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro
 Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 

Re: [Emc-users] Homing

2012-01-28 Thread Viesturs Lācis
Thank You very much!
I tested and can confirm - this is fixed.
I knew this had to be something stupid :)

Viesturs

2012/1/28 Frank Tkalcevic fr...@franksworkshop.com.au:
 In AXIS_1 and AXIS_2 section, you have HOME defined twice.  Once at 0, the
 other at 10.0.

 -Original Message-
 From: Viesturs Lacis [mailto:viesturs.la...@gmail.com]
 Sent: Sunday, 29 January 2012 2:08 AM
 To: Enhanced Machine Controller (EMC)
 Subject: Re: [Emc-users] Homing

 2012/1/28 andy pugh bodge...@gmail.com:
 
  mux2 doesn't work with boolean data, unfortunately.

 I do not know, what is boolean, but You are right - it did not want to
 work,
 because limit/homing switches are bit pins, mux2 inputs and output are
 float.

 So I created mux2bit component, where I fixed this...

 So that part is working.

 2012/1/28 Spiderdab 77...@tiscali.it:
   I have another problem:
  
   Z should home on its upper position and stay there.
   So in INI file I set:
   HOME =                  180.000
   HOME_OFFSET =           180.00
 
   It homes, sets joint coordinates to 180 and goes to 0 ignoring HOME =
 180.
 
  It's been a while, but I think HOME_OFFSET is the distance from the
  switch point to the home position, so if the home switch is at 180
  and the home position is 180 then HOME_OFFSET is zero.
 
 
  For what i know OFFSET should be the same of HOME, if you want the
  joint to stay there. (at least my machine work like this..)
  so:
  HOME = 180.0
  HOME_OFFSET = 180.0
 


 Yes, I know that it _should_
 But it does not!

 Andy, it is working correctly up to the point, where it trips the switch
 and sets
 the joint position as stated by home_offset.

 The mysterious part is:
 Why on earth it has to move to 0, when HOME is  set to be equal with
 HOME_OFFSET, sho it should just stay there...

 I am using 2.5.pre2-18-g799075f

 BTW the best part is that both Y joints also are homing in their positive
 end
 and they work correctly.

 Here are the INI settings:

 # Y1
 [AXIS_1]

 TYPE =                  LINEAR
 MAX_VELOCITY =          66.667
 MAX_ACCELERATION =      120.0
 BACKLASH =              0.000
 FERROR =                100.050
 MIN_FERROR =            100.010

 # INPUT_SCALE =           3276.8
 INPUT_SCALE =           -3276.8

 OUTPUT_SCALE =          -71
 OUTPUT_OFFSET =         0.0
 MAX_OUTPUT =            66.667

 MIN_LIMIT =             0.0
 MAX_LIMIT =             1405.0
 HOME =                  1400.0
 HOME_OFFSET =           1400
 HOME_FINAL_VEL =      10
 HOME_SEARCH_VEL =       2
 HOME_LATCH_VEL =        -0.5
 HOME_USE_INDEX =        NO
 HOME_IGNORE_LIMITS =    YES
 HOME_SEQUENCE =               1

 # PID tuning params
 DEADBAND =              0.002
 P =                     10
 I =                     0
 D =                     0
 FF0 =                   0
 FF1 =                   0
 FF2 =                 0
 BIAS =                  0



 # Z
 [AXIS_2]

 TYPE =                          LINEAR
 HOME =                          0.0
 MAX_VELOCITY =                  15
 MAX_ACCELERATION =              60.0
 STEPGEN_MAXACCEL =              70.0
 BACKLASH =                    0.000
 SCALE =                       -400

 MIN_LIMIT =             -10.0
 MAX_LIMIT =             20.0

 FERROR =     0.050
 MIN_FERROR = 0.005

 HOME =                        10.000
 HOME_OFFSET =           10.00
 HOME_SEARCH_VEL =       2.0
 HOME_LATCH_VEL =        -0.5
 HOME_USE_INDEX =        NO
 HOME_IGNORE_LIMITS =    YES
 HOME_SEQUENCE =               0

 # these are in nanoseconds
 DIRSETUP   =              4000
 DIRHOLD    =              4000
 STEPLEN    =              4000
 STEPSPACE  =              4000


 # Y2
 [AXIS_3]

 TYPE =                  LINEAR
 MAX_VELOCITY =          66.667
 MAX_ACCELERATION =      120.0
 BACKLASH =              0.000
 FERROR =                100.050
 MIN_FERROR =            100.010

 # INPUT_SCALE =           3276.8
 INPUT_SCALE =           -3276.8

 OUTPUT_SCALE =          -71
 OUTPUT_OFFSET =         0.0
 MAX_OUTPUT =            66.667

 MIN_LIMIT =             0.0
 MAX_LIMIT =             1405.0
 HOME =                  1400.0
 HOME_OFFSET =           1400
 HOME_FINAL_VEL =      10
 HOME_SEARCH_VEL =       2
 HOME_LATCH_VEL =        -0.5
 HOME_USE_INDEX =        NO
 HOME_IGNORE_LIMITS =    YES
 HOME_SEQUENCE =               1

 # PID tuning params
 DEADBAND =              0.002
 P =                     380
 I =                     10
 D =                     1.9
 FF0 =                   0
 FF1 =                   0.1
 FF2 =                 0
 BIAS =                  0

 Viesturs


 
 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers is
 just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro
 Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 

Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace

On Sat, 28 Jan 2012, Viesturs L?cis wrote:


Date: Sat, 28 Jan 2012 21:03:57 +0200
From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
Reply-To: Enhanced Machine Controller (EMC)
emc-users@lists.sourceforge.net
To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
Subject: Re: [Emc-users] Servo tuning - wtf?

2012/1/28 Viesturs L??cis viesturs.la...@gmail.com:
2012/1/28 Peter C. Wallace p...@mesanet.com:


You could also verify that the Hall signals connected to
the BLDC component are identical for the working and non working
axis (with HALMeter) as you slowly rotate the motor shaft (with 0 P)



I will just switch off motor power, Hall and encoder power is supplied
from PC PSU, so it will remain.

I will report back in a minute.



I watched all 3 hall signals for both bldc components - the one that
works and the one of nonworking. The signal changing order is the
same.
At first I turned each motor so that hall1 is true, remaining 2 are
false. Then I very slowly turned the working motor until any signal
changed (hall3 went true), so then I very slowly turned nonworking
motor until any signal changed status. And all the time they matched
(X is true, blank is false):
hall1  hall2  hall 3
  X
  X X
 X
X   X
X
  XX
  X


Can you verify that in addition your raw encoder count the same way?



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Homing

2012-01-28 Thread Viesturs Lācis
The best part was that I had it working for other joints, but not for joint 2.
I do not know, how many times I looked through those INI settings...
I know that I am extremely good at not seeing things in front of my
eyes. Especially when I need to find some tool that I used few minutes
earlier and had put somewhere nearby. It almost always is right in
front of me, but I can spend 5 minutes and more looking for it. And I
am not even 30, so I do not want to know, how will I be able to work,
when I grow older :))


2012/1/28 sam sokolik sa...@empirescreen.com:
 Good catch!

 (I was looking it over as my machine homes at its upper limit.
 (38,36,24) and I know that works and is setup similar to the setup below)

 On 01/28/2012 01:00 PM, Frank Tkalcevic wrote:
 In AXIS_1 and AXIS_2 section, you have HOME defined twice.  Once at 0, the
 other at 10.0.

 -Original Message-
 From: Viesturs Lacis [mailto:viesturs.la...@gmail.com]
 Sent: Sunday, 29 January 2012 2:08 AM
 To: Enhanced Machine Controller (EMC)
 Subject: Re: [Emc-users] Homing

 2012/1/28 andy pughbodge...@gmail.com:
 mux2 doesn't work with boolean data, unfortunately.
 I do not know, what is boolean, but You are right - it did not want to
 work,
 because limit/homing switches are bit pins, mux2 inputs and output are
 float.
 So I created mux2bit component, where I fixed this...

 So that part is working.

 2012/1/28 Spiderdab77...@tiscali.it:
 I have another problem:

 Z should home on its upper position and stay there.
 So in INI file I set:
 HOME =                  180.000
 HOME_OFFSET =           180.00
 It homes, sets joint coordinates to 180 and goes to 0 ignoring HOME =
 180.
 It's been a while, but I think HOME_OFFSET is the distance from the
 switch point to the home position, so if the home switch is at 180
 and the home position is 180 then HOME_OFFSET is zero.


 For what i know OFFSET should be the same of HOME, if you want the
 joint to stay there. (at least my machine work like this..)
 so:
 HOME = 180.0
 HOME_OFFSET = 180.0


 Yes, I know that it _should_
 But it does not!

 Andy, it is working correctly up to the point, where it trips the switch
 and sets
 the joint position as stated by home_offset.

 The mysterious part is:
 Why on earth it has to move to 0, when HOME is  set to be equal with
 HOME_OFFSET, sho it should just stay there...

 I am using 2.5.pre2-18-g799075f

 BTW the best part is that both Y joints also are homing in their positive
 end
 and they work correctly.

 Here are the INI settings:

 # Y1
 [AXIS_1]

 TYPE =                  LINEAR
 MAX_VELOCITY =          66.667
 MAX_ACCELERATION =      120.0
 BACKLASH =              0.000
 FERROR =                100.050
 MIN_FERROR =            100.010

 # INPUT_SCALE =           3276.8
 INPUT_SCALE =           -3276.8

 OUTPUT_SCALE =          -71
 OUTPUT_OFFSET =         0.0
 MAX_OUTPUT =            66.667

 MIN_LIMIT =             0.0
 MAX_LIMIT =             1405.0
 HOME =                  1400.0
 HOME_OFFSET =           1400
 HOME_FINAL_VEL =     10
 HOME_SEARCH_VEL =       2
 HOME_LATCH_VEL =        -0.5
 HOME_USE_INDEX =        NO
 HOME_IGNORE_LIMITS =    YES
 HOME_SEQUENCE =              1

 # PID tuning params
 DEADBAND =              0.002
 P =                     10
 I =                     0
 D =                     0
 FF0 =                   0
 FF1 =                   0
 FF2 =                        0
 BIAS =                  0



 # Z
 [AXIS_2]

 TYPE =                          LINEAR
 HOME =                          0.0
 MAX_VELOCITY =                  15
 MAX_ACCELERATION =              60.0
 STEPGEN_MAXACCEL =              70.0
 BACKLASH =                   0.000
 SCALE =                      -400

 MIN_LIMIT =             -10.0
 MAX_LIMIT =             20.0

 FERROR =     0.050
 MIN_FERROR = 0.005

 HOME =                       10.000
 HOME_OFFSET =           10.00
 HOME_SEARCH_VEL =       2.0
 HOME_LATCH_VEL =        -0.5
 HOME_USE_INDEX =        NO
 HOME_IGNORE_LIMITS =    YES
 HOME_SEQUENCE =              0

 # these are in nanoseconds
 DIRSETUP   =              4000
 DIRHOLD    =              4000
 STEPLEN    =              4000
 STEPSPACE  =              4000


 # Y2
 [AXIS_3]

 TYPE =                  LINEAR
 MAX_VELOCITY =          66.667
 MAX_ACCELERATION =      120.0
 BACKLASH =              0.000
 FERROR =                100.050
 MIN_FERROR =            100.010

 # INPUT_SCALE =           3276.8
 INPUT_SCALE =           -3276.8

 OUTPUT_SCALE =          -71
 OUTPUT_OFFSET =         0.0
 MAX_OUTPUT =            66.667

 MIN_LIMIT =             0.0
 MAX_LIMIT =             1405.0
 HOME =                  1400.0
 HOME_OFFSET =           1400
 HOME_FINAL_VEL =     10
 HOME_SEARCH_VEL =       2
 HOME_LATCH_VEL =        -0.5
 HOME_USE_INDEX =        NO
 HOME_IGNORE_LIMITS =    YES
 HOME_SEQUENCE =              1

 # PID tuning params
 DEADBAND =              0.002
 P =                     380
 I =                     10
 D =                  

Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace p...@mesanet.com:

 Can you verify that in addition your raw encoder count the same way?


How do You mean - count the same way?

If I understand correctly, then I tested this:
If both motors turned clockwise
Then rawcounts increase in positive direction for _both_ motors.

The thing is:
For working motor - turning clockwise is movement in positive direction.
For nonworking motors - turning clockwise is moving in negative direction.

I have:
INI file scale values (input, output scale) with + signs for working motor;
INI file scale values with - signs for nonworking motor.

Bldc scale value for all motors is -8192

Should I also have Hall pattern changed so that it is exactly opposite
to working motor?

What is _recomended_ approach for reversing the direction?


I also tried Your suggestion: setting all PID parameters to 0 and
choose small P.
I set P to 3 and turned motor by hand.
The resisting torque increased. It felt like gradual increase. I
turned it both directions, it felt the same strength of resistance. I
was able to turn it approximately full turn in each direction, it did
not cog or jump anywhere, but returned approximately to starting
point.

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

 Date: Sat, 28 Jan 2012 21:29:07 +0200
 From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
 Reply-To: Enhanced Machine Controller (EMC)
 emc-users@lists.sourceforge.net
 To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Servo tuning - wtf?
 
 2012/1/28 Peter C. Wallace p...@mesanet.com:

 Can you verify that in addition your raw encoder count the same way?


 How do You mean - count the same way?

 If I understand correctly, then I tested this:
 If both motors turned clockwise
 Then rawcounts increase in positive direction for _both_ motors.

 The thing is:
 For working motor - turning clockwise is movement in positive direction.
 For nonworking motors - turning clockwise is moving in negative direction.

 I have:
 INI file scale values (input, output scale) with + signs for working motor;
 INI file scale values with - signs for nonworking motor.

 Bldc scale value for all motors is -8192

 Should I also have Hall pattern changed so that it is exactly opposite
 to working motor?

No

 What is _recomended_ approach for reversing the direction?


Changing input and output scales as you have


 I also tried Your suggestion: setting all PID parameters to 0 and
 choose small P.
 I set P to 3 and turned motor by hand.
 The resisting torque increased. It felt like gradual increase. I
 turned it both directions, it felt the same strength of resistance. I
 was able to turn it approximately full turn in each direction, it did
 not cog or jump anywhere, but returned approximately to starting
 point.


OK so commutation is ok, but somthing is funny here. You said it oscillated 
even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
what is the difference between the setup now and when it oscillates?



 Viesturs

 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Viesturs Lācis
2012/1/28 Peter C. Wallace p...@mesanet.com:

 OK so commutation is ok, but somthing is funny here. You said it oscillated
 even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
 what is the difference between the setup now and when it oscillates?


I will try to explain:
I am trying to tune 2 motors simultaneously, because it is a gantry machine.
So what I did few minutes ago:
For both motors: all PID parameters set to 0
P = 3
I tried to jog the gantry at slow speed.
At 240 mm/min it is smooth, at 480 mm/min still smooth, but at 676
mm/min there are spots, when one of motors stalls and oscillates in
small amount at high frequency. I suspect that the stalling is due to
some uneven load to motor, when moving forward.
Anyway, I d not know, how to overcome such stalls and subsequent oscillation.
Hitting F2 to disable and re-enable motion stops oscillation and I can
jog forward. Until one of motors stalls and starts vibrating again.

I do understand that final settings for both gantry motors might
differ, I just think that in the beginning they could be tuned
together as both of them are stalling now.

Viesturs

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Jon Elson
Viesturs Lācis wrote:
 2012. gada 28. janvāris 18:14 noel noel.ro...@comcast.net rakstīja:
   
 All interested in Servo Tuning.

 Have a look at:
 http://support.motioneng.com/Downloads-Notes/Tuning/default.htm

 

 In the link from Noel I find that all three  (well, the last maybe not
 that much) PID tuning methods:
 http://support.motioneng.com/Downloads-Notes/Tuning/3_pid_tune.htm

 Suggest starting with finding correct D parameter, as opposed to
 previously expressed opinions that P parameter is the one to start
 with.

 Can anyone with experience in servo tuning comment on this?


 Can anyone comment on this?
   
If your P is too high, no amount of D will stop the violent oscllation.
If your P is too low, there will be no movement at all, and D will
do nothing.

I think you need to have P within a reasonable band for the particular
servo drive so that movement happens when it is commanded.

Note that a lot of treatises on PID tuning use an oven and a
thermometer as the model.  This is a one-quadrant system,
and not as relevant to a servo motion axis.

Jon

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] question about tapered threading (etc)

2012-01-28 Thread Steve Blackmore
On Fri, 27 Jan 2012 10:06:40 +, you wrote:

On 27 January 2012 08:32, Steve Blackmore st...@pilotltd.net wrote:

 I'm not asking that the existing G33 be abandoned, just an addition,
 correct version added, preferably using G32.

As I said earlier, that's fairly easy to do with the G-code remapping
functions in version 2.6.

2.6 ??

Haven't seen the belated 2.5 yet...

Steve Blackmore
--

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] DIY output driver

2012-01-28 Thread Rafael Skodlar
On 01/27/2012 10:23 PM, Viesturs Lācis wrote:
 2012/1/28 Rafael Skodlarra...@linwin.com:

 Of course that won't work with most if not all the suggestions I've seen
 so far. If I understand it correctly, your laser already has a circuit
 to drive it at reasonable current to do it's magic.

 Circuit I suggested earlier was under assumption you have a bare laser
 diode connected to it. You cannot daisy chain circuits one after another
 and expect laser to work properly.

 Relays are out of question IMO because they are too slow mechanical
 devices with many other drawbacks for this application. I see no reason
 to bring in solid state relays into the picture either. You are not
 driving high voltage stuff.

 You either need to modify your PCB that came with the laser diode or
 build a new circuit. Maybe you can reverse engineer that PCB and use one
 spot to inject signal from the EMC side.

 Ed, Kirk, Rafael, thank You!

 Given my lack of skills in electronics, I think that interfering and
 modifying the pcb that comes with laser is the last thing I want to
 do.
 Here are some pics of the laser and its pcb I took late in last night
 with my phone (it was late enough that I forgot to upload them
 yesterday evening):
 http://picpaste.com/2012-01-27_21.54.59-QzJqS24n.jpg
 http://picpaste.com/2012-01-27_21.55.16-mx4U2GiU.jpg
 http://picpaste.com/2012-01-27_21.55.36-wtANcKHw.jpg
 http://picpaste.com/2012-01-27_21.56.28-ySpITI8d.jpg

 I think that I will try the use a relay approach, because:
 1) it is simple enough for me to do it;
 2) it does not require modifying existing laser's board;
 3) it will be fast enough for me, because I am going to use the laser
 in a a la milling fashion - move laser along the line to be burned
 instead of moving it back and forth and switching it on, when
 necessary, because:
 a) the laser is weak, so by definition it can't burn quickly;

That will cause missed or late start unless you compensate that with 
stepper or servo waiting for the relay/laser delay. Photo sensor in a 
loop (PID) could fix that but that's more work than creating a simple 
current limit circuit with LM317 and a few other components as noted 
earlier.

If all else fails, you can burn a T-shirt for yourself :-)
http://blog.craftzine.com/archive/2011/07/diana_engs_laser_lace_tops.html

 b) machine is heavy and relatively slow, compared to normal laser
 engravers, so it would not be able to handle very powerful laser
 anyway;

Not necessarily true. Not knowing how it looks like it's hard to tell. 
Remember that light can be transmitted over a long distance around the 
corners using mirrors like this one:
http://madmodder.net/index.php?topic=4895.0 as long as it's not too foggy.

 c) g-code generation - I have no idea, how to generate g-code for
 normal laser engraving, but I know, how to do it for a la milling
 style.


 BTW client was happy, when he saw the first hand-burned lines in the
 wood that I managed to do last night in that small moment, when the
 laser was working...

 Viesturs

more links:
http://www.laoslaser.org/
these guys have a roadmap something suggested on this list:
http://wiki.laoslaser.org/index.php/Roadmap

I hope we see some pictures of the final system.

-- 
Rafael

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread andy pugh
2012/1/28 Viesturs Lācis viesturs.la...@gmail.com:

 Can anyone with experience in servo tuning comment on this?

I don't actually have much experience with servos, but in my day-job
very simple controllers only have P, then we add precontrol, then I,
then transient precontrol. D is the very last thing that gets added.

I am not talking about adjusting gains here, I am discussing what gets
included in the software.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] question about tapered threading (etc)

2012-01-28 Thread andy pugh
 Haven't seen the belated 2.5 yet...

It has, indeed, been imminent for a long time. I suspect that a lot
of the delay has been due to the EMC lawyers.
I have a suspicion that 2.6 will follow fairly shortly after 2.5.
It is available as pre-compiled packages, and as far as I know has few bugs.

-- 
atp
The idea that there is no such thing as objective truth is, quite simply, wrong.

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Kenneth Lerman
On 1/28/2012 5:05 PM, Jon Elson wrote:
 Viesturs Lācis wrote:
 2012. gada 28. janvāris 18:14 noelnoel.ro...@comcast.net  rakstīja:

 All interested in Servo Tuning.

 Have a look at:
 http://support.motioneng.com/Downloads-Notes/Tuning/default.htm


 In the link from Noel I find that all three  (well, the last maybe not
 that much) PID tuning methods:
 http://support.motioneng.com/Downloads-Notes/Tuning/3_pid_tune.htm

 Suggest starting with finding correct D parameter, as opposed to
 previously expressed opinions that P parameter is the one to start
 with.

 Can anyone with experience in servo tuning comment on this?


 Can anyone comment on this?

 If your P is too high, no amount of D will stop the violent oscllation.
 If your P is too low, there will be no movement at all, and D will
 do nothing.

 I think you need to have P within a reasonable band for the particular
 servo drive so that movement happens when it is commanded.

 Note that a lot of treatises on PID tuning use an oven and a
 thermometer as the model.  This is a one-quadrant system,
 and not as relevant to a servo motion axis.

 Jon

Also, most of the descriptions of PID that I've seen involve what 
happens as process variables change due to outside influences (such as 
room temperature, or feedstock variations). We are concerned with the 
response to a setpoint change.

Ken


 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Servo tuning - wtf?

2012-01-28 Thread Peter C. Wallace
On Sat, 28 Jan 2012, Viesturs L?cis wrote:

 Date: Sat, 28 Jan 2012 22:12:12 +0200
 From: [UTF-8] Viesturs L?cis viesturs.la...@gmail.com
 Reply-To: Enhanced Machine Controller (EMC)
 emc-users@lists.sourceforge.net
 To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
 Subject: Re: [Emc-users] Servo tuning - wtf?
 
 2012/1/28 Peter C. Wallace p...@mesanet.com:

 OK so commutation is ok, but somthing is funny here. You said it oscillated
 even with a P of 1 and all else 0. Did it not oscillate with a P of 3?
 what is the difference between the setup now and when it oscillates?


 I will try to explain:
 I am trying to tune 2 motors simultaneously, because it is a gantry machine.
 So what I did few minutes ago:
 For both motors: all PID parameters set to 0
 P = 3
 I tried to jog the gantry at slow speed.
 At 240 mm/min it is smooth, at 480 mm/min still smooth, but at 676
 mm/min there are spots, when one of motors stalls and oscillates in
 small amount at high frequency. I suspect that the stalling is due to
 some uneven load to motor, when moving forward.
 Anyway, I d not know, how to overcome such stalls and subsequent oscillation.
 Hitting F2 to disable and re-enable motion stops oscillation and I can
 jog forward. Until one of motors stalls and starts vibrating again.

 I do understand that final settings for both gantry motors might
 differ, I just think that in the beginning they could be tuned
 together as both of them are stalling now.

 Viesturs


Can you manually run the gantry to a carefully marked home position after
it stalls to verify that you are not losing counts?

losing counts might cause this behaviour


 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
()_() signature to help him gain world domination.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users