NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Hardware Driver Boards Mesa 5i20 - 7I52S support

Welcome, Guest
Username: Password: Remember me

TOPIC: Mesa 5i20 - 7I52S support

Re:Mesa 5i20 - All pins at +5V 17 Dec 2011 13:08 #15779

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1649
  • Thank you received: 86
  • Karma: 116
First I would make use of the fact that the 7I52S has differential PWM
outputs to improve noise immunity (by tying HSIN+ to PWMOUT+ and HSIN- to PWMOUT- or perhaps the reverse to reverse directions)

The Enable signal on the drive is active high so chose the 7I52s enable output thats low at startup (Before even running EMC)

Forgot to say, you also need to enable the outputs (for channel 0 and 3) by setting GPIO 0 and GPIO 23 low
(page 10 in the manual)
Last Edit: 17 Dec 2011 13:26 by PCW. Reason: ommission
The administrator has disabled public write access.

Re:Mesa 5i20 - All pins at +5V 18 Dec 2011 10:29 #15814

  • boyzo
  • boyzo's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 1
PCW wrote:
If the BIAS is added, it should be 234 (so a -234 mm/sec velocity request from the PID output is translated to a 0 PWM value)

In addition the PWM scale should be set to 468 and the PID components MAX_OUTPUT should be set to 234 (that way the PIDs requested -234 velocity generates 0 PWM and +234 velocity generates 468 = full scale PWM)

I'm not sure how they are applied but there are already provisions output offsetting (OUTPUT_OFFSET)
Note that if it works it would have the opposite sign of your (added) BIAS (-234) since it its subtracted

Need help configuring the axis.

This is how drive expect PWM signals:

0% duty = -100% speed or torque
25% duty = -50% speed or torque
50% duty = 0 speed or torque
75% duty = +50% speed or torque
100% duty = +100% speed or torque

I can run y.axis in pncconf, but only in one direction. Assume DAC output scale = 10, then in Open loop test, Fast DAC speed of 5.1 move axis slow to one direction (both + and - button) and 4.9 to opposite direction. Increasing/decreasing this values increase speed.

In EMC, depend of configuration, I always get following error. This is my configuration:

#*******************
# AXIS Y
#*******************

setp pid.y.Pgain [AXIS_1]P
setp pid.y.Igain [AXIS_1]I
setp pid.y.Dgain [AXIS_1]D
setp pid.y.bias [AXIS_1]BIAS
setp pid.y.FF0 [AXIS_1]FF0
setp pid.y.FF1 [AXIS_1]FF1
setp pid.y.FF2 [AXIS_1]FF2
setp pid.y.deadband [AXIS_1]DEADBAND
setp pid.y.maxoutput [AXIS_1]MAX_OUTPUT

net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-output => pid.y.output
net y-pos-cmd => pid.y.command
net y-pos-fb => pid.y.feedback

# ---PWM Generator signals/setup---

setp hm2_5i20.0.pwmgen.02.output-type 1
I think this should be 4, but changing this does not chane nothing
setp hm2_5i20.0.pwmgen.02.scale [AXIS_1]OUTPUT_SCALE

net y-output => 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

#********************
# Axis Y
#********************
[AXIS_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.005
MIN_FERROR = 0.0005
MAX_VELOCITY = 46.6666666667
MAX_ACCELERATION = 44.0
P = 500.0
I = 30.0
D = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
BIAS = 234.0
DEADBAND = 0.0
ENCODER_SCALE = 1000.0
OUTPUT_SCALE = 468.0
OUTPUT_OFFSET = -234.0
MAX_OUTPUT = 234.0
MIN_LIMIT = -100.01
MAX_LIMIT = 800.0
HOME_OFFSET = 0.0
Last Edit: 18 Dec 2011 10:30 by boyzo.
The administrator has disabled public write access.

Re:Mesa 5i20 - All pins at +5V 18 Dec 2011 10:59 #15817

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1649
  • Thank you received: 86
  • Karma: 116
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 11:00 by PCW. Reason: sp
The administrator has disabled public write access.

Re:Mesa 5i20 - All pins at +5V 18 Dec 2011 22:18 #15828

  • cmorley
  • cmorley's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1488
  • Thank you received: 40
  • Karma: 89
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: 18 Dec 2011 22:19 by cmorley.
The administrator has disabled public write access.

Re:Mesa 5i20 - All pins at +5V 19 Dec 2011 02:43 #15833

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4119
  • Thank you received: 141
  • Karma: 129
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.
The administrator has disabled public write access.

Re:Mesa 5i20 - All pins at +5V 19 Dec 2011 03:19 #15837

  • boyzo
  • boyzo's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 1
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
The administrator has disabled public write access.
Moderators: PCW, jmelson
Time to create page: 1.762 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.