Fitting an encoder on a Tormach 1100

More
05 Apr 2018 11:39 #108437 by andypugh
Looking at the 7i85S manual I think that you probably also have a smart-serial channel on the 7i85, so you could connect your 7i73 to that board if that suited you (and thus add up to 4 extra MPG channels in addition to your 4 encoders)

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

More
05 Apr 2018 11:47 - 05 Apr 2018 12:07 #108438 by Clive S
@Andy thank for your continued help. I think I am getting there slowly now.

This is the log from setting encoder=3 I only see two encoders !! this does not change if I say 3 or 4 encoders
The log in the last post was with deleting the encoder=0 from the file completely

What does the line IO Pin 027 (P2-07): Muxed Encoder Select #0, pin Mux Select 0 (Output) signify

m2/hm2_5i25.0: IO Pin 000 (P3-01): StepGen #4, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 001 (P3-14): IOPort
hm2/hm2_5i25.0: IO Pin 002 (P3-02): StepGen #0, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 003 (P3-15): IOPort
hm2/hm2_5i25.0: IO Pin 004 (P3-03): StepGen #0, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 005 (P3-16): IOPort
hm2/hm2_5i25.0: IO Pin 006 (P3-04): StepGen #1, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 007 (P3-17): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_5i25.0: IO Pin 008 (P3-05): StepGen #1, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 009 (P3-06): StepGen #2, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 010 (P3-07): StepGen #2, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 011 (P3-08): StepGen #3, pin Direction (Output)
hm2/hm2_5i25.0: IO Pin 012 (P3-09): StepGen #3, pin Step (Output)
hm2/hm2_5i25.0: IO Pin 013 (P3-10): IOPort
hm2/hm2_5i25.0: IO Pin 014 (P3-11): IOPort
hm2/hm2_5i25.0: IO Pin 015 (P3-12): IOPort
hm2/hm2_5i25.0: IO Pin 016 (P3-13): IOPort
hm2/hm2_5i25.0: IO Pin 017 (P2-01): IOPort
hm2/hm2_5i25.0: IO Pin 018 (P2-14): IOPort
hm2/hm2_5i25.0: IO Pin 019 (P2-02): IOPort
hm2/hm2_5i25.0: IO Pin 020 (P2-15): IOPort
hm2/hm2_5i25.0: IO Pin 021 (P2-03): IOPort
hm2/hm2_5i25.0: IO Pin 022 (P2-16): IOPort
hm2/hm2_5i25.0: IO Pin 023 (P2-04): IOPort
hm2/hm2_5i25.0: IO Pin 024 (P2-17): IOPort
hm2/hm2_5i25.0: IO Pin 025 (P2-05): IOPort
hm2/hm2_5i25.0: IO Pin 026 (P2-06): IOPort
hm2/hm2_5i25.0: IO Pin 027 (P2-07): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_5i25.0: IO Pin 028 (P2-08): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_5i25.0: IO Pin 029 (P2-09): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_5i25.0: IO Pin 030 (P2-10): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_5i25.0: IO Pin 031 (P2-11): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_5i25.0: IO Pin 032 (P2-12): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_5i25.0: IO Pin 033 (P2-13): Muxed Encoder #1, pin Muxed Index (Input)


Edit: Yes I believe I have the right number of encoders as I can seen the hal pins

can these encoders be used for mpg jogs wheels as well
Last edit: 05 Apr 2018 12:07 by Clive S.

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

More
05 Apr 2018 12:08 #108441 by andypugh
Muxed encoders squeeze 4 physical 3-track encoders into 7 pins on the 5i25 connector.

The Select pin is toggled by the 5i25 firmware to select which connector on the 7i85S it looks at.
It does this every time it reads the encoder inputs.

The pin-list above shows that you are set up for 4 encoders connected to the 7i85. Now start to work out what you are going to do with the data from those encoders.
The following user(s) said Thank You: Clive S

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

More
05 Apr 2018 18:09 #108459 by Clive S
I have mounted an encoder on the mill


don't look at the chatter.

Now I have to sort out a custom hal for it to work
Attachments:

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

More
07 Apr 2018 18:11 #108559 by Clive S
Re this from a log fie I am using a 5i25 with a 7i85s on port P2

hm2/hm2_5i25.0: IO Pin 028 (P2-08): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_5i25.0: IO Pin 029 (P2-09): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_5i25.0: IO Pin 030 (P2-10): Muxed Encoder #0, pin Muxed Index (Input)

can you please help me with the correct syntax to use the above in hal so that I can copy some code like

setp hm2_5i25.0.encoder.00.counter-mode 0

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

More
07 Apr 2018 18:22 - 07 Apr 2018 18:23 #108560 by PCW
you cannot really use the log file entries for anything other than debugging pinouts
If you want a list of encoder pins and parameters present in a running LinuxCNC or Path-Pilot instance you could do this: (assuming PathPilot includes LinuxCNC's command line utilities)

halcmd show pin *encoder*
halcmd show param *encoder*
Last edit: 07 Apr 2018 18:23 by PCW.

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

More
07 Apr 2018 19:14 #108562 by andypugh

can you please help me with the correct syntax to use the above in hal


You haven't actually said what you want to do with the encoders yet...

And as PCW says, the output seen so far is only useful to know which pins on the FPGA card are doing what.
You need the HAL pin names to use the encoders in HAL.

In a non-pathpilot setup you can use:

halcmd show pin
halcmd show param

When LinuxCNC is running to get all the pins and parameters. I am not sure how you do that in PP. Possibly

admin halcmd show pin

You are going to need help from someone who actually uses Pathpilot I am afraid.

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

More
08 Apr 2018 17:29 #108612 by Clive S
Thank you Andy & Peter for your patience.

I am having trouble getting halcmd to work ( I can see it on the machine in various places) but I have managed to print this from halmeter which i believe is the correct pins and

I have loaded 4 encoders but initially I would like to use encoder.0 to use the spindle for rigid tapping it has 2000p/r I could change it for 1000p/r if needed. Then if I can get that going first I would like 3 MPG's as well.
Attachments:

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

More
08 Apr 2018 17:43 - 08 Apr 2018 17:44 #108613 by PCW
OK so as a start you will want to:

setp hm2_5i25.0.encoder.00.scale 8000

( a 2000 PPR encoder has 8000 quadrature counts per turn )

You can verify this by hand rotating the spindle, and "halmetering" hm2_5i25.0.encoder.00.position
if scaled properly, the encoded position should change by 1 for each turn of the spindle
Last edit: 08 Apr 2018 17:44 by PCW.

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

More
08 Apr 2018 17:44 - 08 Apr 2018 17:45 #108614 by andypugh
net spindle-position hm2_5i25.0.encoder.00.position => motion.spindle-revs
net spindle-velocity hm2_5i25.0.encoder.00.velocity => motion.spindle-speed-in
net spindle-index-enable hm2_5i25.0.encoder.00.index-enable <=> motion.spindle-index-enable
setp hm2_5i25.0.encoder.00.scale 8000

Should be all you need.
Last edit: 08 Apr 2018 17:45 by andypugh.

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

Moderators: cncbasher
Time to create page: 0.277 seconds
Powered by Kunena Forum