Mesa 5i20 - 7I52S support

More
18 Dec 2011 18:59 - 18 Dec 2011 19:00 #15817 by PCW
Replied by PCW on topic Re:Mesa 5i20 - All pins at +5V
The PID BIAS _must_ be 0 (dont try to do the offset in two places)
the theory is that you set the PID loop component so its output range is -234 to 234
then this number is offset by 234 so you get a 0 to 468 range fed to the PWM generator
Whether or not OUTPUT_OFFSET works I do not know, If not you would have to feed this through an offset component (COMP)
Last edit: 18 Dec 2011 19:00 by PCW. Reason: sp

Please Log in or Create an account to join the conversation.

More
19 Dec 2011 06:18 - 19 Dec 2011 06:19 #15828 by cmorley
PWM component in hostmot2 does not have an output_offset parameter.
you will have to use a offset comp.
The output_offset option has been removed from the very latest PNCconf because of this.
actually only a couple components support output_offset, software PWM being one for instance.
I guess this should be mentioned in the docs...
Last edit: 19 Dec 2011 06:19 by cmorley.

Please Log in or Create an account to join the conversation.

More
19 Dec 2011 10:43 #15833 by andypugh
cmorley wrote:

you will have to use a offset comp.


The component called "offset" is a bit overkill for this use-case, it is intended to offset axis positions and handles feedback matching too.

The "scale" component will work, it has both scale and offset components so you could add 1 and divide by 2 to convert a -1 to +1 value into an offset 0 to +1.

Please Log in or Create an account to join the conversation.

More
19 Dec 2011 11:19 #15837 by boyzo
I am trying to find some code example for offset, but I can not find any.

Can you give me HAL example, based on the code I upload yesterday?

And thank you guys for all the support. It seems I am trying to do some not so ordinary configuration, but this might help someone else as well.

Bojan

Please Log in or Create an account to join the conversation.

More
19 Dec 2011 17:18 #15843 by andypugh
boyzo wrote:

Can you give me HAL example, based on the code I upload yesterday?


Using www.linuxcnc.org/docview/html/man/man9/scale.9.html

Add the lines in red:

loadrt scale names=x,y,z
addf scale.y servo-thread
...
net y-output => pid.y.output
net y-pos-cmd => pid.y.command
net y-pos-fb => pid.y.feedback

net y-output => scale.y.in
setp scale.y.gain 0.5
setp scale.y.offset 0.5


net offset-pwm-y scale.y.out => hm2_5i20.0.pwmgen.02.value
net y-pos-cmd axis.1.motor-pos-cmd
net y-enable axis.1.amp-enable-out => hm2_5i20.0.pwmgen.02.enable

Please Log in or Create an account to join the conversation.

More
19 Dec 2011 20:57 #15865 by boyzo
Thank you for this. Some man pages are for expert only and I am not one of them.

Now I need to tune this thing (I am receiving folowing error for any encoder and motor direction, bot motor moves several mm).
What I suspect is my connection to 7I52S.

What is correct connection of PWM, PWM gnd, ENable. The pins are TX2A, /TX2A, TX2B, /TX2B. Is there any way to find this out from configuration files?

Please Log in or Create an account to join the conversation.

More
19 Dec 2011 21:19 #15869 by PCW
Replied by PCW on topic Re:Mesa 5i20 - All pins at +5V
first If you are not changing your PID scales the offset is 234 not 0.5 and the gain is 1

Tuning is very premature unless you can verify that you get 50% PWM with 0 error
what I would do is disconnect your motor power
set a large FERROR and MIN_FERROR (say 100)
set all PID terms to 0 except a small P term (say 1)
now start EMC and see if you get a 50% duty cycle from the PWM pin (A VOM will read 2.5V)
this PWM (or voltage if you dont have a scope) should vary from 0 to 5V as you turn the motor shaft

If not there's no point in even starting to tune

As far as I can see the PWMs should be in order
TX0A = ENA0
TX0B = PWM0
TX1A = ENA1
TX1B = PWM1
etc

Please Log in or Create an account to join the conversation.

More
19 Dec 2011 22:46 #15875 by PCW
Replied by PCW on topic Re:Mesa 5i20 - All pins at +5V
Yes that pinout is verified with EMC2

BTW P3.3 (TX0A) is the proper polarity for an active high enable)

I also noticed an assembly error on the 7I52s cards (These are the first lot and were modified from standard 7I52's)
The error is that the termination resistors were left on the card (They are the receive data terminators on a standard 7I52)
when it was modified. These are 150 Ohm 1206 resistors R12,R13,R20,R21,R34,R35. These present a large load on the outputs which will reduce their drive ability and swing. If you can do SMT repair, these resistors should be removed, If not we can issue a RMA and modify the card.

Please Log in or Create an account to join the conversation.

More
21 Dec 2011 13:54 #15929 by boyzo
I manage to run it.

Using PID output scale of 10 I defined offset -5.0. With this definition, I get expected result on PWM output pin and 50% PWM gives me +-0.003mm oscilation. I can jog on both direction, now I will start do tune for performance.

I dont think that returning card tu USA make sense as shipping cost are high. I will see what I can do here in Slovenia.

Thank you all for help and advise.

Please Log in or Create an account to join the conversation.

More
21 Dec 2011 14:26 #15931 by andypugh
boyzo wrote:

II dont think that returning card tu USA make sense as shipping cost are high. I will see what I can do here in Slovenia..

There is a Mesa stockist in CZ which might be more convenient for you?

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.250 seconds
Powered by Kunena Forum