Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!

More
20 Jun 2024 13:12 #303414 by eduard
This is what I`m implementing now, but delta and leadshine are not correct and did not advertise just the half of the truth of gantry control. They both working on it, and many functions are not implemented yet. Like homing at all, rigid gantry function and align function. But I have the promise from leadshine they will finish the dual homing for the end of the month and will release a new fw.

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

More
20 Jun 2024 13:45 #303416 by eduard
Thanks for the effort putting in this modification! Now I have time to test it. 

This is what I do:
Download the file el8_homecomp_mod.com and after giving the path to homing.c compile with halcomp
"sudo halcomp --install el8_homecomp_mod.com"

This went ok without errors. 

I changed the Marco's component from the ini to yours:
HOMEMOD=el8_homecomp_mod

Uncommented the drives internal homing in hal on every axis:

net x-home-request         joint.0.request-custom-homing     =>         cia402.0.home
net x-homing             joint.0.is-custom-homing         <=         cia402.0.stat-homing
net x-homed             joint.0.custom-homing-finished     <=         cia402.0.stat-homed

run the lcnc, and the hal pins show up:


I set a hal part for toggle the custom home request:
#custom home request
sets joint.0.custom-homing-is-requested true

After that I have errors, this pin not exists. But is there. Whats next?

Thanks!
Attachments:

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

More
20 Jun 2024 14:07 #303418 by Aciera
change this line:
net x-home-request joint.0.request-custom-homing => cia402.0.home

to

net x-home-request joint.0.custom-homing-is-requested => cia402.0.home

Then the pin 'joint.0.request-custom-homing' (the uppermost entry in your 'WATCH' list should give your the options 'Set' , 'Clr' to manually set the pin to true (ie 'Set'))

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

More
20 Jun 2024 14:55 #303422 by eduard
The problem is with: joint.0.custom-homing-is-requested

When I set to true to change the state in hal to toggle custom homing, I have this error:
/home/eduard/linuxcnc/custom/M5_EtherCAT.hal:33: signal 'joint.0.custom-homing-is-requested' not found

this is the toggle in hal:
sets joint.0.custom-homing-is-requested true

But I have this hal pin, based on halshow as I attached in prevous post.

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

More
20 Jun 2024 15:01 #303424 by Aciera

sets joint.0.custom-homing-is-requested true

You are using the wrong hal command (sets) here as that is for setting a signal.
Use 'setp' instead:
setp joint.0.custom-homing-is-requested true

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

More
20 Jun 2024 15:08 #303425 by eduard
Ok, I changed to setp, but the pin is not writebale.

M5_EtherCAT.hal:33: pin 'joint.0.custom-homing-is-requested' is not writable

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

More
20 Jun 2024 15:13 - 20 Jun 2024 15:18 #303426 by Aciera
[edit]
We are trying to set the wrong pin
I'm sorry the line should be:
setp joint.0.request-custom-homing true
Last edit: 20 Jun 2024 15:18 by Aciera. Reason: fix wrong command

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

More
20 Jun 2024 15:24 #303427 by eduard
Yepp, I did not see either.

But here is the next error:
HAL: ERROR: signal 'x-home-request' already has output pin

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

More
20 Jun 2024 15:27 #303428 by Aciera
Besides this line:
net x-home-request joint.0.custom-homing-is-requested => cia402.0.home
do you have another line with 'x-home-request' in your hal?
 

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

More
20 Jun 2024 15:40 #303429 by Aciera
Ok, it seems that 'cia402.0.home' is of type 'IO' not 'IN' so I changed the custom homing comp to make 'joint.0.custom-homing-is-requested' have type 'IO'. Not sure if this works but give it a go:
 

File Attachment:

File Name: el8_homeco...06-20.gz
File Size:4 KB


Don't forget to halcompile --install the new comp.
Attachments:

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

Time to create page: 0.125 seconds
Powered by Kunena Forum