Re: [Emc-users] Encoders on 7i48

2011-09-17 Thread Dave
On 9/17/2011 6:39 AM, Viesturs Lācis wrote:
> BTW, I have set servo drive to work in velocity mode (there is special
> application for changing settings in servo drives). So I had to set
> the scale, how much RPM should motor do at 10V. Unfortunately I cannot
> find any PID related parameters to tune feedback loop in servo drive.
> I have Kollmorgen Servostar S601. Does anyone have experience with
> these drives to share with me?
> I haven't found in documentation, what does the output_scale parameter
> in INI file for servos do? For steppers it was easy - scale means how
> many steps are in one unit of length. I guess that is the same for
> Input_scale. But what about output scale?
>
> And also one more question to more knowledgable users about quadrature
> encoder signal: what does EMC consider as 1 pulse from quadrature
> encoder - the nominal resolution or the quadrature sgnals that are 4x
> nominal resolution?
>

Usually you set the drive velocity scaling to match the max velocity 
that you want to be able to spin the motor up to.

Say you want 1000 ipm as the absolute max velocity for that axis, figure 
out what your motor must spin to do  that (via the gearing) and that is 
your max motor velocity for 10V.

EMC uses all of the edges - at least that is my experience when using 
the Mesa cards and hostmot2.So it is the pulses per rev for the 
encoder x 4 when using quadrature mode on the encoder inputs.

Dave

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-17 Thread Viesturs Lācis
2011/9/17 Peter C. Wallace :
>>
>> I have 2 questions:
>> 1) I have managed to get 2 joints oscillate around zero, (which tells
>> me that they need have PID parameters adjusted). There is a problem
>> with a third joint, which just runs away. When I try to change
>> something for that third joint, it affects also some of first two. Why
>> is that so? For example, if I set Output_scale for third joint from 1
>> to -1, second joint will not oscillate around zero, but run away.
>
>
> There should be no interaction of the axis
>
> I would do as I has suggested and verify that all DAC channels work as
> expected before proceeding.
>
> interaction suggests a grounding/ analog input problem (do the drives have
> differential inputs ( most do) If so the IN+ sould go to 7I48 AOUT and the IN-
> to 7I48 ground

Thanks, I will take a look!

>>
>> 2) How do I solve the situation, when PWM value is +1, but encoder
>> position increases in negative direction? That is for the third joint.
>> As I mentioned, changing output scale to -1 for third joint will make
>> second joint to misbehave. What else can cause that? Should I change A
>> and B wires from encoder signal cable?
>
> I would first set up the encoders so they count in the correct direction for
> your axis, and then change the output scale to reverse the PID feedback if
> need be.

Ok, and how can I do that - fix the the direction of counting? Will
changing A and B leads do the trick?

Viesturs

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-17 Thread Peter C. Wallace
On Sat, 17 Sep 2011, Viesturs L?cis wrote:

> Date: Sat, 17 Sep 2011 19:02:48 +0300
> From: "[UTF-8] Viesturs L?cis" 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: "Enhanced Machine Controller (EMC)" 
> Subject: Re: [Emc-users] Encoders on 7i48
> 
> 2011/9/17 Peter C. Wallace :
>>
>> Since you have no feedback until you get your encoders working, I would just
>> try getting +- 10V out of the 7I48 by setting the output scale to 10,
>> disconnecting the PWM .value from the PID loop and setting it
>> manually in volts with setp ) try +10, -10, +5 ,-5 ,0 etc
>
> Thank You for the suggestion!
> EMC does receive encoder signal from servo drive (motors have
> resolvers, servodrive emulates encoder signal and outputs it on a
> 9-pin serial port connector, from where the signal is wired to 7i48).
> I am watching "position" pins of encoders from servo drive and they
> either increase to very high values or decrease to very low values.
> Actually EMC receives all 6 encoder signals, also 3 from linear scales
> -  I also checked their "position" pins, when pushing machine by hand
> (motors are detached) and it seems that the increase/decrease in the
> value of linear scales' position pin matches the actual travel.
>
> I have 2 questions:
> 1) I have managed to get 2 joints oscillate around zero, (which tells
> me that they need have PID parameters adjusted). There is a problem
> with a third joint, which just runs away. When I try to change
> something for that third joint, it affects also some of first two. Why
> is that so? For example, if I set Output_scale for third joint from 1
> to -1, second joint will not oscillate around zero, but run away.


There should be no interaction of the axis

I would do as I has suggested and verify that all DAC channels work as 
expected before proceeding.

interaction suggests a grounding/ analog input problem (do the drives have 
differential inputs ( most do) If so the IN+ sould go to 7I48 AOUT and the IN-
to 7I48 ground


>
> 2) How do I solve the situation, when PWM value is +1, but encoder
> position increases in negative direction? That is for the third joint.
> As I mentioned, changing output scale to -1 for third joint will make
> second joint to misbehave. What else can cause that? Should I change A
> and B wires from encoder signal cable?

I would first set up the encoders so they count in the correct direction for
your axis, and then change the output scale to reverse the PID feedback if 
need be.


But first you need to find out where the interaction is coming from (could 
also be HAL file error)


>
> Viesturs
>
> --
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
> http://p.sf.net/sfu/rim-devcon-copy2
> ___
> 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.


--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-17 Thread Viesturs Lācis
2011/9/17 Peter C. Wallace :
>
> Since you have no feedback until you get your encoders working, I would just
> try getting +- 10V out of the 7I48 by setting the output scale to 10,
> disconnecting the PWM .value from the PID loop and setting it
> manually in volts with setp ) try +10, -10, +5 ,-5 ,0 etc

Thank You for the suggestion!
EMC does receive encoder signal from servo drive (motors have
resolvers, servodrive emulates encoder signal and outputs it on a
9-pin serial port connector, from where the signal is wired to 7i48).
I am watching "position" pins of encoders from servo drive and they
either increase to very high values or decrease to very low values.
Actually EMC receives all 6 encoder signals, also 3 from linear scales
-  I also checked their "position" pins, when pushing machine by hand
(motors are detached) and it seems that the increase/decrease in the
value of linear scales' position pin matches the actual travel.

I have 2 questions:
1) I have managed to get 2 joints oscillate around zero, (which tells
me that they need have PID parameters adjusted). There is a problem
with a third joint, which just runs away. When I try to change
something for that third joint, it affects also some of first two. Why
is that so? For example, if I set Output_scale for third joint from 1
to -1, second joint will not oscillate around zero, but run away.

2) How do I solve the situation, when PWM value is +1, but encoder
position increases in negative direction? That is for the third joint.
As I mentioned, changing output scale to -1 for third joint will make
second joint to misbehave. What else can cause that? Should I change A
and B wires from encoder signal cable?

Viesturs

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-17 Thread Peter C. Wallace

On Sat, 17 Sep 2011, Viesturs L?cis wrote:


Date: Sat, 17 Sep 2011 13:39:33 +0300
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Encoders on 7i48

Hello, Peter!


2011. gada 16. septembris 16:23 Peter C. Wallace  rakst??ja:


Mode 2 is correct for the 7I48, what bit file are you using?


My first email on this thread:

I am using this customized firmware, that was kindly provided by Peter Wallace:
http://www.cutting.lv/fileadmin/user_upload/SVST6_6.BIT
http://www.cutting.lv/fileadmin/user_upload/SVST6_6.PIN




are you sure you have the correct 7I43 connector?


Yes, 7i48 is attached to P4 connector.
I will check the cables with multimeter. From 7i43 to 7i48 and also
to/from servo drives. Although I do not see any symptoms for bad
wiring, I will try to check them to make sure .


Also whats driving the PWM signal value?


In HAL file I have:
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command pid.1.command
net pid-0-out  pid.0.output =>  hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale  [AXIS_0]OUTPUT_SCALE


Since you have no feedback until you get your encoders working, I would just 
try getting +- 10V out of the 7I48 by setting the output scale to 10,

disconnecting the PWM .value from the PID loop and setting it
manually in volts with setp ) try +10, -10, +5 ,-5 ,0 etc


I wanted to check, if servo drives respond to any signal from EMC by
trying to jog separate joints.

The behavior I am getting with servodrives turned on and manually enabled:
Pressing F2 (Toggle machine on) will give -9.98V on one channel,
10.01V on second channel, 0.0V on third channel.
Pressing F2 again (Toggle machine off) will set all channels to 0V.
Pressing F2 repeatedly is just setting those channels to -9.9V or 10V
and back to 0V.

In INI file for all 3 joints I have:
OUTPUT_SCALE =  1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =1.0

Are there any better procedures to test and set up EMC with servos? I
have no experience with these things yet.

BTW, I have set servo drive to work in velocity mode (there is special
application for changing settings in servo drives). So I had to set
the scale, how much RPM should motor do at 10V. Unfortunately I cannot
find any PID related parameters to tune feedback loop in servo drive.
I have Kollmorgen Servostar S601. Does anyone have experience with
these drives to share with me?
I haven't found in documentation, what does the output_scale parameter
in INI file for servos do? For steppers it was easy - scale means how
many steps are in one unit of length. I guess that is the same for
Input_scale. But what about output scale?

And also one more question to more knowledgable users about quadrature
encoder signal: what does EMC consider as 1 pulse from quadrature
encoder - the nominal resolution or the quadrature sgnals that are 4x
nominal resolution?
Thanks!

Viesturs

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
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.
--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-17 Thread Viesturs Lācis
Hello, Peter!

2011. gada 16. septembris 16:23 Peter C. Wallace  rakstīja:
>
> Mode 2 is correct for the 7I48, what bit file are you using?

My first email on this thread:
> I am using this customized firmware, that was kindly provided by Peter 
> Wallace:
> http://www.cutting.lv/fileadmin/user_upload/SVST6_6.BIT
> http://www.cutting.lv/fileadmin/user_upload/SVST6_6.PIN


> are you sure you have the correct 7I43 connector?

Yes, 7i48 is attached to P4 connector.
I will check the cables with multimeter. From 7i43 to 7i48 and also
to/from servo drives. Although I do not see any symptoms for bad
wiring, I will try to check them to make sure .

> Also whats driving the PWM signal value?

In HAL file I have:
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command pid.1.command
net pid-0-out  pid.0.output =>  hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale  [AXIS_0]OUTPUT_SCALE

I wanted to check, if servo drives respond to any signal from EMC by
trying to jog separate joints.

The behavior I am getting with servodrives turned on and manually enabled:
Pressing F2 (Toggle machine on) will give -9.98V on one channel,
10.01V on second channel, 0.0V on third channel.
Pressing F2 again (Toggle machine off) will set all channels to 0V.
Pressing F2 repeatedly is just setting those channels to -9.9V or 10V
and back to 0V.

In INI file for all 3 joints I have:
OUTPUT_SCALE =  1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT =1.0

Are there any better procedures to test and set up EMC with servos? I
have no experience with these things yet.

BTW, I have set servo drive to work in velocity mode (there is special
application for changing settings in servo drives). So I had to set
the scale, how much RPM should motor do at 10V. Unfortunately I cannot
find any PID related parameters to tune feedback loop in servo drive.
I have Kollmorgen Servostar S601. Does anyone have experience with
these drives to share with me?
I haven't found in documentation, what does the output_scale parameter
in INI file for servos do? For steppers it was easy - scale means how
many steps are in one unit of length. I guess that is the same for
Input_scale. But what about output scale?

And also one more question to more knowledgable users about quadrature
encoder signal: what does EMC consider as 1 pulse from quadrature
encoder - the nominal resolution or the quadrature sgnals that are 4x
nominal resolution?
Thanks!

Viesturs

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-16 Thread Peter C. Wallace

On Fri, 16 Sep 2011, Peter C. Wallace wrote:


Date: Fri, 16 Sep 2011 06:23:37 -0700 (PDT)
From: Peter C. Wallace 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Encoders on 7i48

On Fri, 16 Sep 2011, Viesturs L?cis wrote:


Date: Fri, 16 Sep 2011 14:37:41 +0300
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Encoders on 7i48

2011. gada 16. septembris 13:53 Viesturs L?cis
 rakst?ja:

2011/9/16 andy pugh :
On 16 September 2011 11:26, Viesturs L?cis  
wrote:



From manual:
The 7I48 takes up/down PWM or PDM signals from the Anything I/O card

From 
http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#pwmgen

Accepted values are 1 (PWM on Out0 and Direction on Out1), 2 (Up on
Out0 and Down on Out1), 3 (PDM mode, PDM on Out0 and Dir on Out1), and
4 (Direction on Out0 and PWM on Out1, "for locked antiphase").


It says you need Up/Down mode, so that means it has to be mode 2.

(connecting PWM/DIR to Up/Down inputs will have very wrong behaviour)


I tried both 2 and 3.
For type 3 I get -9.98V on X1 output after trying to jog it. X2 and Y
stay at 0V. Motors, whose drives receive these 9.98V signals, are
spinning...




Mode 2 is correct for the 7I48, what bit file are you using? are you sure you 
have the correct 7I43 connector?



Peter Wallace
Mesa Electronics

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




Also whats driving the PWM signal value?


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-16 Thread Peter C. Wallace

On Fri, 16 Sep 2011, Viesturs L?cis wrote:


Date: Fri, 16 Sep 2011 14:37:41 +0300
From: "[UTF-8] Viesturs L?cis" 
Reply-To: "Enhanced Machine Controller (EMC)"

To: "Enhanced Machine Controller (EMC)" 
Subject: Re: [Emc-users] Encoders on 7i48

2011. gada 16. septembris 13:53 Viesturs Lācis
 rakstīja:

2011/9/16 andy pugh :

On 16 September 2011 11:26, Viesturs Lācis  wrote:


From manual:
The 7I48 takes up/down PWM or PDM signals from the Anything I/O card

From http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#pwmgen
Accepted values are 1 (PWM on Out0 and Direction on Out1), 2 (Up on
Out0 and Down on Out1), 3 (PDM mode, PDM on Out0 and Dir on Out1), and
4 (Direction on Out0 and PWM on Out1, "for locked antiphase").


It says you need Up/Down mode, so that means it has to be mode 2.

(connecting PWM/DIR to Up/Down inputs will have very wrong behaviour)


I tried both 2 and 3.
For type 3 I get -9.98V on X1 output after trying to jog it. X2 and Y
stay at 0V. Motors, whose drives receive these 9.98V signals, are
spinning...




Mode 2 is correct for the 7I48, what bit file are you using? are you sure you 
have the correct 7I43 connector?



Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-16 Thread Viesturs Lācis
2011. gada 16. septembris 13:53 Viesturs Lācis
 rakstīja:
> 2011/9/16 andy pugh :
>> On 16 September 2011 11:26, Viesturs Lācis  wrote:
>>
>>> From manual:
>>> The 7I48 takes up/down PWM or PDM signals from the Anything I/O card
>>>
>>> From http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#pwmgen
>>> Accepted values are 1 (PWM on Out0 and Direction on Out1), 2 (Up on
>>> Out0 and Down on Out1), 3 (PDM mode, PDM on Out0 and Dir on Out1), and
>>> 4 (Direction on Out0 and PWM on Out1, "for locked antiphase").
>>
>> It says you need Up/Down mode, so that means it has to be mode 2.
>>
>> (connecting PWM/DIR to Up/Down inputs will have very wrong behaviour)
>
> I tried both 2 and 3.
> For type 3 I get -9.98V on X1 output after trying to jog it. X2 and Y
> stay at 0V. Motors, whose drives receive these 9.98V signals, are
> spinning...
>
> For type 2 I get -9.98V on X1 and X2 outputs right after enabling EMC,
> Y is 0V. Pressing F2 to disable returns outputs to 0V. Pressing it
> repeatedly will repeatedly turn motors on and off.

I would like to ask, if someone can share sample HAL config for 7i48
card. Currently I cannot figure out, how to set up pwm generators. I
am getting either + or - 9.99V on one channel, only -9.99V on second
channel and nothing on third channel.
Any ideas, where should I look?

Viesturs

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Encoders on 7i48

2011-09-16 Thread andy pugh
On 16 September 2011 09:03, Viesturs Lācis  wrote:

> I have Mesa 7i48 card, attached to 7i43.

The 7i48 requires Muxed Encoders (support introduced in this commit
http://git.linuxcnc.org/gitweb?p=emc2.git;a=commit;h=da0d5aa5563de8dc7f8f3a87044bd62e1ade5326

I have never figured out how to tell what branch a commit has gone
into, but I think you probably need a 2.5 version.

-- 
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Encoders on 7i48

2011-09-16 Thread Viesturs Lācis
Hello, gentlemen!

I would like to ask, if someone can suggest me, why I do not see
encoders in HAL Config. I have pasted a screenshot here:
http://www.cutting.lv/fileadmin/user_upload/emc2.png

I have Mesa 7i48 card, attached to 7i43.
The config line tells hm2 driver to load 6 pwm gens, 6 encoders and 3 stepgens.

I am using this customized firmware, that was kindly provided by Peter Wallace:
http://www.cutting.lv/fileadmin/user_upload/SVST6_6.BIT
http://www.cutting.lv/fileadmin/user_upload/SVST6_6.PIN

As the screenshot shows, there are 6 pwm gens, 3 stepgens, but no
encoders on 7i43 card.
What am I missing here?
Can I ask other 7i48 card owners to share their experience?

Note: that one encoder is HAL module for NHC (nozzle height control) purposes.
Thanks!

Viesturs

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users