Asymmetric following error

More
08 Apr 2020 16:21 #163208 by yahni
Asymmetric following error was created by yahni
Hello,

I do not know if anybody experienced the problem I have.

The configuration is a long (2m+) machinery driven by MESA 5I23 card and connected step/dir servos.
When the machine does slow motion jog, or does homing to negative direction either on X or Y axis it cumulates following error at 0.1 unit (mm) per sec or per 2 secs.

The number is steadily increasing until following error trips resulting "following error" message or the keyboard is released, then following error number goes back to 0. It happens usually at homing or in manually initiated jog move to negative direction.

Same jog or move to positive direction never cumulates following error, number remains almost constant below 0.1 unit or so..

Machine is open loop, nothing fancy.
Direction dependency on the rate of growth of the following error looks strange for me especially as homing or slow jog is not demanding.

Other following error issue can happen at any direction.
This is at G00 or G01 speed, at slow/medium speeds, like 6000 mm/min, but can happen any random speed.
Following error slowly cumulates, then resets to 0 value. Reset happens at any random number between 0 and 1.5
Noticeable sound is audible like the gear hits the rack, most probably as result of some sort of hard travel correction.
Since the machine is open loop must be initiated by Linuxcnc.
I have some indicator bars showing following error on each axis, audible bang sounds when the following error jumps back to 0 from higher number.

Any idea to fix? Is it bug or feature? Control is 3.3 GHz old PC. Should be fast enough. Timing is loose 70000 ns on base and 100000 on servo thread.

Thanks!
Y

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

More
08 Apr 2020 16:27 #163210 by PCW
Replied by PCW on topic Asymmetric following error
Can you post your hal/ini files?

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

More
08 Apr 2020 16:34 #163212 by yahni
Replied by yahni on topic Asymmetric following error
Sure! Which section? It is rather long and complicated.

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

More
08 Apr 2020 16:40 #163214 by PCW
Replied by PCW on topic Asymmetric following error
The main hal file with the axis/stepgen connections plus the ini file

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

More
09 Apr 2020 16:41 #163375 by yahni
Replied by yahni on topic Asymmetric following error
5I23 only nothing on parport.
Besides the asymmetric following error issue, machine works fine in 24/7

HAL file (only relevant axis.)
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[TRAJ]AXES
loadrt hostmot2 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
loadrt hm2_pci config="firmware=hm2/5i23/card1_5I23.bit num_encoders=8 num_stepgens=6 num_pwmgens=1,firmware=hm2/5i23/card2_5I23.bit num_encoders=6 num_stepgens=0 num_pwmgens=0"
loadrt encoder num_chan=8
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf hm2_5i23.0.read servo-thread
addf hm2_5i23.0.write servo-thread
addf hm2_5i23.0.read_gpio servo-thread
addf hm2_5i23.0.write_gpio servo-thread

addf hm2_5i23.1.read servo-thread
addf hm2_5i23.1.write servo-thread
addf hm2_5i23.1.read_gpio servo-thread
addf hm2_5i23.1.write_gpio servo-thread
setp hm2_5i23.0.watchdog.timeout_ns 1000000

setp hm2_5i23.0.stepgen.01.position-scale [AXIS_1]SCALE
setp hm2_5i23.0.stepgen.01.steplen 600 #in nanoseconds
setp hm2_5i23.0.stepgen.01.stepspace 600
setp hm2_5i23.0.stepgen.01.dirhold 5000
setp hm2_5i23.0.stepgen.01.dirsetup 5000
setp hm2_5i23.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL
setp hm2_5i23.0.stepgen.01.maxvel 600 #in position unit per sec
setp hm2_5i23.0.stepgen.01.step_type 0 #step/dir
setp hm2_5i23.1.encoder.01.scale 200 #pulse per position units
setp hm2_5i23.1.encoder.01.counter-mode FALSE #FALSE = Quadrature
setp hm2_5i23.1.encoder.01.filter TRUE
setp hm2_5i23.1.encoder.01.vel-timeout 2 #in seconds

net Y-index hm2_5i23.1.encoder.01.index-enable axis.1.index-enable
net ypos-cmd axis.1.motor-pos-cmd => hm2_5i23.0.stepgen.01.position-cmd
net ypos-fb hm2_5i23.0.stepgen.01.position-fb => axis.1.motor-pos-fb
net yenable axis.1.amp-enable-out => hm2_5i23.0.stepgen.01.enable

INI file. Only relevant parts.
[EMCMOT]
EMCMOT = motmod
SHMEM_KEY = 111
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 70000
SERVO_PERIOD = 100000
TRAJ_PERIOD = 100000



[TRAJ]
AXES = 6
COORDINATES = XYZBC
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 40.00
MAX_LINEAR_VELOCITY = 500.00
NO_FORCE_HOMING = 1
ARC_BLEND_ENABLE = 1
ARC_BLEND_FALLBACK_ENABLE = 0
ARC_BLEND_OPTIMIZATION_DEPTH = 50
ARC_BLEND_GAP_CYCLES = 4
ARC_BLEND_RAMP_FREQ = 100

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

[AXIS_1]
TYPE = LINEAR
MAX_VELOCITY = 500
MAX_ACCELERATION = 150
STEPGEN_MAXACCEL = 0
BACKLASH = 0.00
SCALE = 599.922010139
FERROR = 2.0
MIN_FERROR = 1.0
MIN_LIMIT = -15
MAX_LIMIT = 5200
HOME = 0.0
HOME_USE_INDEX = NO
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -20.0
HOME_LATCH_VEL = -0.5
HOME_FINAL_VEL = -1
HOME_SEQUENCE = 4
HOME_IGNORE_LIMITS = NO


Thanks!

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

More
09 Apr 2020 17:05 #163376 by PCW
Replied by PCW on topic Asymmetric following error
Is anything linked to the base thread?
Its a likely suspect

If anything uses the base thread I would move their addf's to the servo thread

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

More
09 Apr 2020 19:28 #163384 by yahni
Replied by yahni on topic Asymmetric following error
Only these 3 functions are in base.
Not very demanding.
Will try to move them tomorrow to servo.

addf encoder.update-counters
addf debounce.2 base-thread
setp debounce.2.delay 10
addf debounce.1 base-thread
setp debounce.1.delay 300
#Encoder function is only a event counter to make statistic on non critical servo errors like under voltage / over voltage etc.
Debounce was used to clear any signal wire from noise. (Early attempt, to fix some obscolete problems. Wires do not pick up noise from environment. We used to have electic intermittent problem caused by faulty utility transformer few years ago. This was fixed, we have no noise whatsoever since then.)
Thank you!

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

More
09 Apr 2020 19:46 #163386 by PCW
Replied by PCW on topic Asymmetric following error
In addition the thread order seems strange and some functions have multiple calls

the main addf section should be:

addf hm2_5i23.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf hm2_5i23.0.write servo-thread

(the gpio read/write are not useful or needed)

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

More
22 Apr 2020 15:08 #165117 by yahni
Replied by yahni on topic Asymmetric following error
Sorry for the late reply, we also have this pandemia situation booming.
Changed it to the suggested order but it had no effect. Maybe marginal.

We will change the whole config to new Ethernet based cards next week. We will see if this issue will remain.

And thank you!
Y

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

More
22 Apr 2020 18:03 - 22 Apr 2020 18:09 #165144 by PCW
Replied by PCW on topic Asymmetric following error
Can you try a 1 Khz servo thread? (1000000 ns period)

another thing to try changing is the stepgen max accel value
This should not be 0 but rather 25% greater than the axis acceleration value

Because the position mode stepgen has known issues with excess jitter relative to period
Another likely solution would be to use the stepgens in velocity mode with PID feedback

pncconf created configurations use this method and you could use that as example
hal wiring
Last edit: 22 Apr 2020 18:09 by PCW.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum