Encoder connection
23 Dec 2020 18:22 #192994
by Muzzer
Encoder connection was created by Muzzer
Trying to connect a linear encoder to my 7i76 to check I have the thing connected up correctly.
Although I don't want to use it for feedback yet, I'd hoped I could use PnCConf to configure it as an X axis encoder as an easy way to get up and running. This is using a 5i25 / 7i76 on a lathe setup.
LinuxCNC bombs out when I try to start up. It seems to be trying to allocate the same pin to 2 different outputs but I can't see any conflict in the setup options.
Could someone tell me where I'm going wrong here please? Or perhaps suggest a better way of testing the encoder connection. Thanks!
Although I don't want to use it for feedback yet, I'd hoped I could use PnCConf to configure it as an X axis encoder as an easy way to get up and running. This is using a 5i25 / 7i76 on a lathe setup.
LinuxCNC bombs out when I try to start up. It seems to be trying to allocate the same pin to 2 different outputs but I can't see any conflict in the setup options.
Could someone tell me where I'm going wrong here please? Or perhaps suggest a better way of testing the encoder connection. Thanks!
Attachments:
Please Log in or Create an account to join the conversation.
23 Dec 2020 18:49 #193000
by chris@cnc
Replied by chris@cnc on topic Encoder connection
Check line 86 in your hal. You have created a duplicate pin
./Bantam_v1.hal:86: Signal 'x-pos-fb' can not add OUT pin 'hm2_5i25.0.encoder.00.position', it already has OUT pin 'hm2_5i25.0.stepgen.00.position-fb'
./Bantam_v1.hal:86: Signal 'x-pos-fb' can not add OUT pin 'hm2_5i25.0.encoder.00.position', it already has OUT pin 'hm2_5i25.0.stepgen.00.position-fb'
Please Log in or Create an account to join the conversation.
23 Dec 2020 19:13 #193006
by PCW
Replied by PCW on topic Encoder connection
You cannot drive single signal (x-pos-fb in this case) from two sources
if you want to use encoder position feedback you need to comment out
the:
net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
line
if you want to use encoder position feedback you need to comment out
the:
net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
line
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19219
- Thank you received: 6440
23 Dec 2020 19:15 #193007
by tommylight
Replied by tommylight on topic Encoder connection
Edit the Bantam .hal file with a text editor and omit one of the lines:The snippet is from your error report and it tells exactly what is preventing LinuxCNC from starting, namely in line 86 of the Bantam_v1.hal file (this file with the other config files is located at /home/your_user_name/linuxcnc/configs/Bantam_v1/ ) where it is trying to assign pin x-pos-fb to hm2_5i25.0.encoder.00.position AFTER it has already been assigned to hm2_5i25.0.stepgen.00.position-fb.
To use the stepper with no feedback, omit the entire line with hm2_5i25.0.encoder.00.position in it by putting # in front of it, OR to use it with encoder/glass scale omit the entire line with hm2_5i25.0.stepgen.00.position-fb in it. Save and start the config from the desktop shortcut.
/Bantam_v1.hal:86: Signal 'x-pos-fb' can not add OUT pin 'hm2_5i25.0.encoder.00.position', it already has OUT pin 'hm2_5i25.0.stepgen.00.position-fb'
To use the stepper with no feedback, omit the entire line with hm2_5i25.0.encoder.00.position in it by putting # in front of it, OR to use it with encoder/glass scale omit the entire line with hm2_5i25.0.stepgen.00.position-fb in it. Save and start the config from the desktop shortcut.
Please Log in or Create an account to join the conversation.
23 Dec 2020 23:43 #193045
by Muzzer
Replied by Muzzer on topic Encoder connection
Thanks, chaps - really appreciate the help there.
This makes sense - I'll give it a go tomorrow. I'm learning here and it's great to have the support.
This makes sense - I'll give it a go tomorrow. I'm learning here and it's great to have the support.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.067 seconds