In using ECR60+NPN(GPIO), I encountered an issue.

More
25 Nov 2023 18:41 - 25 Nov 2023 20:20 #286483 by MakerYang
I have a machine configuration for XYZBC, and previously, control in the simulation worked fine. However, recently, during real-world testing, I encountered the following issue: I have only enabled the NPN limit switch on the X-axis, and the switch is connected to a GPIO pin on the control board. It can trigger the limit properly, and the motor runs through the homing process as expected. However, the X-axis position information reported by the system remains unchanged, causing no movement of the tool in the GUI. I have searched through a lot of information and noticed that most people are using the internal homing function of ECR60. Could you provide some insights into how to resolve my issue?  

 

File Attachment:

File Name: machine_20...1-25.hal
File Size:7 KB

 

File Attachment:

File Name: machine_20...1-25.ini
File Size:4 KB

 

File Attachment:

File Name: machine_20...1-25.xml
File Size:7 KB
Attachments:
Last edit: 25 Nov 2023 20:20 by MakerYang.

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

More
25 Nov 2023 22:11 #286503 by rodw
Hi, I don't think many people at all have got cia402 internal homing working but this recent post might have solved it.
forum.linuxcnc.org/ethercat/44508-etherc...mary?start=30#282793

I might add that the cia402.comp was written  before custom homing capability was included. The correct way today would be to write a custom homecomp as discussed in the docs here linuxcnc.org/docs/devel/html/man/man9/homecomp.9.html (and also in code)
This overwrites homing.c which contains a big state machine. Many of the states can be skipped with cia402 internal homing as basically you start homing and wait until its done.

I started with this, then the base linuxcnc code was changed (to make it easier for people) which obsoleted my efforts.
my not working obsolete repo is here github.com/rodw-au/ciahome

A home component for cia402 would be a valuable contribution to linuxcnc.

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

More
26 Nov 2023 04:10 - 26 Nov 2023 05:04 #286527 by MakerYang
After following the documentation to compile and configure everything, there were no errors during runtime. Additionally, I would like to point out a mistake in the documentation: 'joint.N.is_custom-homing' should be 'joint.N.is-custom-homing', otherwise it results in an error.
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.000
BASE_PERIOD = 200000
SERVO_PERIOD = 1000000
HOMEMOD = armcnc_homecomp
#*******************
# AXIS X
#*******************

net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-pos-fb <= joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out

net x-pos-cmd => cia402.0.pos-cmd
net x-pos-fb => cia402.0.pos-fb
net x-enable => cia402.0.enable

setp cia402.0.csp-mode 1
setp cia402.0.pos-scale 10000

net x-statusword lcec.0.0.cia-statusword => cia402.0.statusword
net x-opmode-display lcec.0.0.opmode-display => cia402.0.opmode-display
net x-drv-act-pos lcec.0.0.actual-position => cia402.0.drv-actual-position
net x-drv-act-velo lcec.0.0.actual-velocity => cia402.0.drv-actual-velocity

net x-controlword cia402.0.controlword => lcec.0.0.cia-controlword
net x-modes-of-operation cia402.0.opmode => lcec.0.0.opmode
net x-drv-target-pos cia402.0.drv-target-position => lcec.0.0.target-position
net x-drv-target-velo cia402.0.drv-target-velocity => lcec.0.0.target-velocity

net debounce-home-x debounce.1.0.in <= armcncio.gpio.x-home
net both-home-x debounce.1.0.out

net both-home-x => joint.0.home-sw-in
net both-home-x => joint.0.neg-lim-sw-in
net both-home-x => joint.0.pos-lim-sw-in

net x-request-custom-homing <= joint.0.request-custom-homing
net x-is-custom-homing => joint.0.is-custom-homing

Following the above configuration, the problem still persists. When homing, the motor moves, but the tool position in the AXIS simulation does not change.

I am hoping to use a different GPIO connection for homing operations, such as the GPIO17 on a Raspberry Pi, instead of the internal method of the EtherCAT driver. I am not sure if the method you mentioned supports such an operation?
Last edit: 26 Nov 2023 05:04 by MakerYang.

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

More
26 Nov 2023 07:46 #286531 by rodw
Yes, you can home normally without using cia402 using linuxcnc's default method.
This is what I do on my ethercat machine (except I use a Rtelligent or Weipu ethercat I/O module)
I have attached my hal file. You'll see i have commented out 
#net 0-home-index <= joint.0.index-enable  => cia402.0.home
and replaced with
net 0-home          lcec.0.3.in-04          => joint.0.home-sw-in
Attachments:

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

More
26 Nov 2023 08:40 #286534 by Hakan
Bring up "halshow" and watch the relevant variables for position feedback lcec.0.0.actual-position cia402.0.drv-actual-position cia402.0.ps-fb and joint.0.motor-pos-fb (you see the chain how the motor position comes in) to see where the position value gets lost, if it does get lost.

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

More
26 Nov 2023 11:23 #286542 by rodw

Bring up "halshow" and watch the relevant variables for position feedback lcec.0.0.actual-position cia402.0.drv-actual-position cia402.0.ps-fb and joint.0.motor-pos-fb (you see the chain how the motor position comes in) to see where the position value gets lost, if it does get lost.

Because movement is happening outside of linuxcnc, following errors happen quickly as actual position is not changing. you need to set certain positions to actual position  on every call to the component while it is homing. I can't find Domic's original cia402 post where this was dscussed.

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

More
26 Nov 2023 16:40 #286558 by foxington
excuse me gentelmen,

dominiks original post 

every driver has own homing procedure and should be different from general CIA402 standard... firstly you have to have a look in the ethercat manual of your driver and should simulate it just via terminal or windows twincat3 enviroment ... I have done internal homing in the old standard DS402 which cia402 is based on... lets have a look to ds402 component ... maybe should help you... 

in homing there are some delay++ counter because the scan cycle.. 

I have working with kollmorgen drivers for years and find very similar drivers (rebrand kollmorgen s3xx) pilz pmctendo... all stuff around looks same but homing sequence and interpolation position input has different shape... 

But new drivers with cia402 standard are on the way... they will come in next weeks and I should check cia402 homing too... 

but time, time is very important level and for rural guy it is too much...

regards Slav

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

More
26 Nov 2023 18:43 #286567 by rodw
@foxington, your link takes me to the component source code, not the actual forun post, Was that what you intended?

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

More
26 Nov 2023 18:54 #286569 by foxington
I am sorry, my missread ... I though you want to read original code ... I saved them for bad times... 

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

More
26 Nov 2023 19:55 #286574 by Hakan
That was interesting anyway, it says that the cia402 component gives the commanded position back as actual position, without checking with the drive. When it finds that the drive is in internal homing state.
No wonder there is no motion in the gui.

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

Time to create page: 0.227 seconds
Powered by Kunena Forum