PID and Homing with index.

More
8 years 10 months ago - 8 years 10 months ago #102817 by UAVpilot
Replied by UAVpilot on topic PID and Homing with index.
index-enable connected.
hm2_7i92.0.encoder.00.index-enable <=> pid.x.index-enable <=> axis.0.index-enable

INI & HAL, inessential removed:
Warning: Spoiler!


I tried to change the order of the components in the thread - the result does not change. As expected.
Code:
... addf pid.x.do-pid-calcs servo-thread ... addf motion-command-handler servo-thread addf motion-controller servo-thread ...
Last edit: 8 years 10 months ago by UAVpilot.

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

More
8 years 10 months ago #102823 by PCW
Replied by PCW on topic PID and Homing with index.
Thread order is wrong, it should be:
hardware read
everything else
hardware write

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

More
8 years 10 months ago - 8 years 10 months ago #102851 by UAVpilot
Replied by UAVpilot on topic PID and Homing with index.
So?
Code:
loadrt hostmot2 loadrt [HOSTMOT2]DRIVER0 board_ip=[HOSTMOT2]BOARD0IP config=" num_encoders=6 num_pwmgens=0 num_stepgens=0 sserial_port_0=000xxx" addf hm2_7i92.0.read servo-thread loadrt trivkins loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES addf motion-command-handler servo-thread addf motion-controller servo-thread loadrt pid names=pid.x,pid.z,pid.s addf pid.x.do-pid-calcs servo-thread addf pid.z.do-pid-calcs servo-thread addf pid.s.do-pid-calcs servo-thread .... addf hm2_7i92.0.write servo-thread

I tried it. As expected, the problem remained.

I noticed that on the given oscillograms I was mistaken in the designation of cycles: The inscription "Cycle N + 1" should be read as "Cycle N + 2". Below is the correct picture. Sorry.



My patch causes the PID to skip the cycle N+1
Last edit: 8 years 10 months ago by UAVpilot.

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

More
8 years 10 months ago #102852 by PCW
Replied by PCW on topic PID and Homing with index.
I suspect there's still a hal file issue of some kind as this is not a common problem with home to index

The feedback position should change at the same time as and the commanded position. If not
that still suggests a thread order or HAL connection problem

Can you post your complete hal and ini files?

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

More
8 years 10 months ago - 8 years 10 months ago #102853 by UAVpilot
Replied by UAVpilot on topic PID and Homing with index.

File Attachment:

File Name: pid-test.tar.gz
File Size:30.33 KB
Last edit: 8 years 10 months ago by UAVpilot.

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

More
8 years 10 months ago #102854 by PCW
Replied by PCW on topic PID and Homing with index.
Note, here is the expected behavior
freeby.mesanet.com/home-index.png

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

Time to create page: 0.086 seconds
Powered by Kunena Forum