Mesa Analog Vs Step Dir

More
30 Jun 2024 14:51 #304086 by anfänger
Replied by anfänger on topic Mesa Analog Vs Step Dir
Short question, will I see a 7i85s card in the halshow pins or will the Stepgen and additional encoder show up under the 7i97?

I modified my config line to:
loadrt hm2_eth board_ip="192.168.1.121" config="num_encoders=8 num_pwmgens=6 num_stepgens=4"

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

More
30 Jun 2024 15:13 #304088 by PCW
Replied by PCW on topic Mesa Analog Vs Step Dir
The 7I85S encoders will show up as additional 7i97 encoders.
The following user(s) said Thank You: anfänger

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

More
20 Jul 2024 15:29 #305708 by anfänger
Replied by anfänger on topic Mesa Analog Vs Step Dir
since I never used steppers. I ran pncconf and transferred the results to my machine and set it to quadrature mode
this might be stupid question but why is the a PID loop?
And why is the axis moving back an forth after I jogged it?
There is no feedback coming from the encoders / servo drives to linuxcnc. this should be commented out.
and the servo drives don't move when I jog them with a manual encoder.
I am a bit confused here. Did I made a mistake in PncConf?

Thanks Patrick
# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################
#  AXIS X JOINT 0
#*******************

setp   pid.x.Pgain     [JOINT_0]P
setp   pid.x.Igain     [JOINT_0]I
setp   pid.x.Dgain     [JOINT_0]D
setp   pid.x.bias      [JOINT_0]BIAS
setp   pid.x.FF0       [JOINT_0]FF0
setp   pid.x.FF1       [JOINT_0]FF1
setp   pid.x.FF2       [JOINT_0]FF2
setp   pid.x.deadband  [JOINT_0]DEADBAND
setp   pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp   pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp   pid.x.maxerror 0.012700

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

# Step Gen signals/setup

setp   hm2_7i97.0.stepgen.00.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i97.0.stepgen.00.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i97.0.stepgen.00.steplen         [JOINT_0]STEPLEN
setp   hm2_7i97.0.stepgen.00.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i97.0.stepgen.00.position-scale  [JOINT_0]STEP_SCALE
setp   hm2_7i97.0.stepgen.00.step_type        2
setp   hm2_7i97.0.stepgen.00.control-type     1
setp   hm2_7i97.0.stepgen.00.maxaccel         [JOINT_0]STEPGEN_MAXACCEL
setp   hm2_7i97.0.stepgen.00.maxvel           [JOINT_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     <= hm2_7i97.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_7i97.0.stepgen.00.position-fb
net x-pos-fb     => joint.0.motor-pos-fb
net x-enable     <= joint.0.amp-enable-out
net x-enable     => hm2_7i97.0.stepgen.00.enable

net        freigabe => hm2_7i97.0.pwmgen.00.enable


# 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]ENCODER_SCALE
#net motor.00.pos-fb hm2_7i97.0.encoder.00.position => pid.x.feedback
#net motor.00.pos-fb => joint.0.motor-pos-fb #push copy back to Axis GUI

# 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

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

More
20 Jul 2024 15:54 - 20 Jul 2024 15:56 #305709 by PCW
Replied by PCW on topic Mesa Analog Vs Step Dir
PID is used because the step generator is in velocity mode
If the P term is too high you can have oscillations.

Normally for stepgen feedback, the P term is set for 1/servo-period,
so 1000 for a 1 ms (1000000 ns) servo thread period.
The FF1 term is set for 1.000.
Last edit: 20 Jul 2024 15:56 by PCW.

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

More
20 Jul 2024 16:58 #305710 by anfänger
Replied by anfänger on topic Mesa Analog Vs Step Dir
These are the numbers I have. I get an error the my Stepgen.00.maxvel ist to big. could that be the case?
I just used the theoretical maximum velocity I could get by the servos.

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000

P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 1600.0
ENCODER_SCALE = 1600.0

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

More
20 Jul 2024 17:15 #305712 by PCW
Replied by PCW on topic Mesa Analog Vs Step Dir
Normally the stepgen maxvel is set to 25% greater than the
machine joint maximum velocity. You get the "too big" error
because the stepgen cannot reach the value you set because
of the current step timing. That is, with 5000 ns step time
and 5000 ns step space you are limited to a 100 KHz step rate.

At a step scale of 1600 steps/mm the maximum velocity
is bounded to 62.5 mm/second by the step timing. This
means that the actual maximum joint velocity should be
about 50 mm/s (leaving the stepgen about 25% headroom)

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

More
20 Jul 2024 17:40 - 20 Jul 2024 17:48 #305714 by anfänger
Replied by anfänger on topic Mesa Analog Vs Step Dir
many thanks,

I just reused the numbers from the analog control, didn't think about a max frequency.

I Adjusted it. but still oscillation about 0.1mm
It comes definitively from Linuxcnc. I disabled the drives and the dro ist still moving. So no feedback from the drives

I'll adjust the steps to 1000/mm later which should be reasonable and change the speeds to 100 / 75 mm/s which helps with the 1000mm x travel
But I ned to get rid of the oscillation
Last edit: 20 Jul 2024 17:48 by anfänger.

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

More
20 Jul 2024 18:00 #305715 by PCW
Replied by PCW on topic Mesa Analog Vs Step Dir
Yes, oscillations are basically guaranteed if the velocity is limited by the
stepgen settings.

Make sure the stepgen max velocity is 25% higher than the machine
maximum joint velocity and that the stepgen is not bounded by the step timing
(at 100 mm/s and 1000 steps per mm for example, you would not be able to
provide any overhead for the stepgen at all at 5000+5000 timing)

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

More
04 Aug 2024 11:21 #306909 by anfänger
Replied by anfänger on topic Mesa Analog Vs Step Dir
I'm kind of stuck I think there are some mistakes in my hal and ini setup.
I wonder if it would make sense to start new but its a relative complex machine an I've also done a lot to the GUI.
I attached my config files maybe some one sees what I can't see at the moment.
If not I'll restart new new

File Attachment:

File Name: probe_basic.ini
File Size:8 KB
 

File Attachment:

File Name: wully.hal
File Size:31 KB


these two files are for gui and hand wheel

 

File Attachment:

File Name: handrad.hal
File Size:10 KB
 

File Attachment:

File Name: time_2024-08-04.hal
File Size:7 KB


thanks Patrick
 
Attachments:

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

More
04 Aug 2024 14:46 #306923 by PCW
Replied by PCW on topic Mesa Analog Vs Step Dir
What are the specific issues you have now?

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

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