Fehlemann Picomax 100 Retrofit

More
19 Aug 2023 20:59 #278497 by anfänger
They are rotary encoders on the servos with 2000 lines per revolution. The leadscrew has 5 mm pitch. So I have an input scale of 1600 set.
Output scale is 208.333 for max rpm 2500 rpm.
Gain on the encoders is 250 rpm / V
Machine units are mm

Acceleration of the drives is 100 times higher than on linuxcnc. Filter of the drives is at 20 ms.

I pull sections off ini and Hal tomorrow.
I think there is a small error I am just to blind to see

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

More
19 Aug 2023 21:12 #278498 by PCW
Replied by PCW on topic Fehlemann Picomax 100 Retrofit
A 20 ms filter time constant on analog in is _way_ too long

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

More
20 Aug 2023 07:41 - 20 Aug 2023 07:49 #278529 by anfänger
Thanks, I made a mistake here it 20 unite, so 2 ms
Smallest I can go is 0.2 ms
Should I go as small as possible?
Here the section of my INI
[TRAJ]
AXES = 4
COORDINATES = X Y Z A
HOME = 0 0 0 0 
MAX_ANGULAR_VELOCITY = 125
DEFAULT_ANGULAR_VELOCITY = 3
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 20
MAX_LINEAR_VELOCITY = 208.3333
SPINDLES = 1
NO_FORCE_HOMING =       1 #spaeter auskommentiren
POSITION_FILE = position.txt

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[KINS]
KINEMATICS = trivkins coordinates=XYZA
JOINTS = 4


[AXIS_X]
MIN_LIMIT = -29.330
MAX_LIMIT = 973.670
MAX_VELOCITY = 208.3333
MAX_ACCELERATION = 125

[JOINT_0]

TYPE =                  LINEAR
MAX_VELOCITY =          208.3333
MAX_ACCELERATION =      500.0
BACKLASH =              0.000
FERROR =                50000 
#0.5
MIN_FERROR =            50000 
#0.5
INPUT_SCALE =           1600

OUTPUT_SCALE =          208.3333
OUTPUT_OFFSET =         0.0
MAX_OUTPUT =            208.3333

MIN_LIMIT = -29.330
MAX_LIMIT = 973.670
#HOME =                  0.000
#HOME_OFFSET =           0.0
#HOME_SEARCH_VEL =       -50
#HOME_LATCH_VEL =        5
#HOME_USE_INDEX =        YES
#HOME_IGNORE_LIMITS =    YES
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0
# PID tuning params
DEADBAND =              0.000015
P =                     50
I =                     0
D =                     0
FF0 =                   0
FF1 =                   0.048
FF2 =                   0
BIAS =                  0


and the x-axis in my hal:


[code]# ################
# X [0] Axis
# ################

# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
#net emcmot.00.enable => hm2_7i97.0.pwmgen.00.enable
net        freigabe => hm2_7i97.0.pwmgen.00.enable
net emcmot.00.enable <= joint.0.amp-enable-out 

# encoder feedback
setp hm2_7i97.0.encoder.00.counter-mode 0
setp hm2_7i97.0.encoder.00.filter 1
setp hm2_7i97.0.encoder.00.index-invert 0
setp hm2_7i97.0.encoder.00.index-mask 0
setp hm2_7i97.0.encoder.00.index-mask-invert 0

setp  hm2_7i97.0.encoder.00.scale  [JOINT_0]INPUT_SCALE
net motor.00.pos-fb hm2_7i97.0.encoder.00.position => pid.0.feedback
net motor.00.pos-fb => joint.0.motor-pos-fb #push copy back to Axis GUI

# set PID loop gains from inifile
setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.0.maxoutput [JOINT_0]MAX_OUTPUT

# position command signals
setp hm2_7i97.0.pwmgen.00.output-type 1 
setp hm2_7i97.0.pwmgen.00.offset-mode 1 # offset mode so 50% = 0
setp hm2_7i97.0.pwmgen.00.scale  [JOINT_0]OUTPUT_SCALE

net emcmot.00.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net motor.00.command  pid.0.output  =>  hm2_7i97.0.pwmgen.00.value

# home and limit

net in_x_ref         =>     joint.0.home-sw-in
net in_x_limit_n     =>     joint.0.neg-lim-sw-in
net in_x_limit_p     =>     joint.0.pos-lim-sw-in
[/code]
Last edit: 20 Aug 2023 07:49 by anfänger.

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

More
20 Aug 2023 13:39 #278546 by PCW
Replied by PCW on topic Fehlemann Picomax 100 Retrofit
Yes, I would use the minimum filtering as the more delay, the lower the stable P term will be.

Other things:

1. The maximum velocity for a joint must be lower than the velocity at 10V
(say 80 to 90 % of the velocity at 10V) This is because there must be "headroom"
for the PID to operate when moving at full machine speeds.

2. The FF1 term should be close to 1.0 _if_ the output scale is the velocity at 10V

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

More
20 Aug 2023 16:32 - 20 Aug 2023 17:01 #278554 by anfänger
I Adjusted accordingly, but still the vibration.
So I bypassed the PID system:

net motor.00.bypass    joint.0.motor-pos-cmd => hm2_7i97.0.pwmgen.00.value

I know now I don't have any real control, but I still have the oscillating issue. So I guess it is my wiring and the oscillation might be 50 Hz...
There are no power cables running parallel to the analog cables, but they are unshielded twisted pair for 500mm.
was no issue on the other machines.
 

1. sounds reasonable usually I go down in the end anyway or never use the max speed.

2. thanks I need to reread the tutorial
Last edit: 20 Aug 2023 17:01 by anfänger.

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

More
20 Aug 2023 18:56 #278560 by tommylight
Make a new config, set P at 0, enable the drives from LinuxCNC.
Do the motors still vibrate?
Do the motors move slowly in one direction?

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

More
20 Aug 2023 19:34 #278565 by anfänger
Yes they do vibrate still.
Drift I could compensate in the drives. but there is almost none.

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

More
20 Aug 2023 20:24 #278566 by PCW
Replied by PCW on topic Fehlemann Picomax 100 Retrofit
Sounds like maybe a grounding/input connection issue.

Drift compensation is not terribly important as the drives should
never be enabled when the feedback loop is not closed.
(and a small offset causes minimal error)

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

More
20 Aug 2023 22:47 #278581 by tommylight
Do the motors have Tacho Geber ?
Is it wired to the drives?
-
If yes, then most probably grounding/shielding/wiring as PCW mentioned.

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

More
21 Aug 2023 04:25 #278583 by anfänger
No Tacho (analog) signal from the motor to the drives, they use 2000 line encoders.
And when I use internal signals from the drives they run smoothly. Even with a potentiometer test setup from a 9v battery using another connection, No oscillation.
What I didn’t check was disconnecting the analog wire from the mesa board and have just the open wire or use the battery and the cables running to the mesa board.

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

Moderators: piasdom
Time to create page: 0.083 seconds
Powered by Kunena Forum