How To Hookup Spindle Encoder to EMC via Mesa?
- NICKKINSMAN
- Offline
- Senior Member
Less
More
- Posts: 54
- Thank you received: 0
09 Sep 2011 19:09 #13076
by NICKKINSMAN
How To Hookup Spindle Encoder to EMC via Mesa? was created by NICKKINSMAN
I am running Mesa control boards. A 5I20 Anything I/O for the computer interface. It is fed from a 7I29 for x & z servo (including encoders), 7I37TA for limit swithes, start/stop, etc.
The only thing I need to hook up is the spindle encoder. It is a absolute type encoder with A, B, and Index channels. It has 5V+ and common. Somehow I need to get this terminated to get the feedback so EMC can know spindle location for threading.
How do I go about doing this? Do I need another encoder board to decipher this signal and convey it to EMC?
I have to imagine this is a standard item to connect, as all CNC lathes have to connect to a spindle encoder!
Thanks!
The only thing I need to hook up is the spindle encoder. It is a absolute type encoder with A, B, and Index channels. It has 5V+ and common. Somehow I need to get this terminated to get the feedback so EMC can know spindle location for threading.
How do I go about doing this? Do I need another encoder board to decipher this signal and convey it to EMC?
I have to imagine this is a standard item to connect, as all CNC lathes have to connect to a spindle encoder!
Thanks!
Please Log in or Create an account to join the conversation.
09 Sep 2011 23:43 #13080
by cmorley
Replied by cmorley on topic Re:How To Hookup Spindle Encoder to EMC via Mesa?
The 7i29 can connect to 4 encoders and you are only using 2 at the moment.
You said absolute encoder but did you mean incremental?
What is your specific question ? pinouts of the 7i29 ?
HAL coding ?
You said absolute encoder but did you mean incremental?
What is your specific question ? pinouts of the 7i29 ?
HAL coding ?
Please Log in or Create an account to join the conversation.
- NICKKINSMAN
- Offline
- Senior Member
Less
More
- Posts: 54
- Thank you received: 0
11 Sep 2011 01:54 #13091
by NICKKINSMAN
Replied by NICKKINSMAN on topic Re:How To Hookup Spindle Encoder to EMC via Mesa?
Respectfully, I don't believe that is right - the 7I29 has only 2 sets of feeds/encoders for 2 axis. However, you may be referring that you can input 4 axis to the anything I/O board - that is true. The 7I29 is only using 1/2 of the 50pins available. I could duplex another 7I29 as well, but that board is geared for axis contorol, not simply encoder feedback. I do have another anyting I/O 50 pin input available as well, though, so that is not so much an issue.
I am thinking I may need anohter input board to terminate the spindle encoder too, but what kind? I can't find any boards specfically for encoders only, and all of them seem to be geared for axis control, by that I mean they have a servo power feed, and an encoder feed together. I only need to get the encoder signal back to EMC.
And yes, there is a difference in the encoder on the spindle (absolute type) to the encoders I have on the axis control (differential type). I had to research it a little to understand, but the absolute encoder knows which angle the spindle is at no matter what point in the rotation or at what time it starts. This is what is needed to turn threads, that way EMC knows how to sync up the axis feed with the spindle angle to continue cuts at the same points. It also has a reference signal for every revolution, which will feedback the spindle speed to EMC.
The differential types (on the x and z axis) only count up or down from a specfied '0' point which is set when you zero or reference the axis.
So, what I am asking is how do I get the absolute encoder terminated back to EMC via the Mesa Anything I/O board? Someone must have done this in using Mesa boards on their lathe!
I believe I need a board in between the encoder and Anythign I/O that will power the 5V encoder, and decipher the channel signals to feedback to EMC.
I am thinking I may need anohter input board to terminate the spindle encoder too, but what kind? I can't find any boards specfically for encoders only, and all of them seem to be geared for axis control, by that I mean they have a servo power feed, and an encoder feed together. I only need to get the encoder signal back to EMC.
And yes, there is a difference in the encoder on the spindle (absolute type) to the encoders I have on the axis control (differential type). I had to research it a little to understand, but the absolute encoder knows which angle the spindle is at no matter what point in the rotation or at what time it starts. This is what is needed to turn threads, that way EMC knows how to sync up the axis feed with the spindle angle to continue cuts at the same points. It also has a reference signal for every revolution, which will feedback the spindle speed to EMC.
The differential types (on the x and z axis) only count up or down from a specfied '0' point which is set when you zero or reference the axis.
So, what I am asking is how do I get the absolute encoder terminated back to EMC via the Mesa Anything I/O board? Someone must have done this in using Mesa boards on their lathe!
I believe I need a board in between the encoder and Anythign I/O that will power the 5V encoder, and decipher the channel signals to feedback to EMC.
Please Log in or Create an account to join the conversation.
11 Sep 2011 02:23 #13092
by PCW
Replied by PCW on topic Re:How To Hookup Spindle Encoder to EMC via Mesa?
Yes there are only 2 encoder interfaces per 7I29 (an if you use only one 7I29, 1/2 of the flat cable signals are unused)
I think you are mixing up encoder terminology here, the term "differential" is used to describe the electrical interface of an encoder (often the two possible electrical interface types are referred to as differential or RS-422 as opposed to TTL or single ended)
I think you mean an incremental (or quadrature) encoder type when you say differential
It is possible but I doubt that you have an absolute encoder on the spindle (listing the encoder interface pins will clear this up) Normally EMC keeps track of spindle position by using a incremental encoder with an index signal (A,B,Z signals with A,B being the quadrature signals and Z being the once-per-turn index signal)
If you have a TTL encoder (non-differential) this can be connected to s simple breakout like a 7I42TA or the encoder wires can connect directly to the FPGA pins (though a mistake here can e expensive)
I think you are mixing up encoder terminology here, the term "differential" is used to describe the electrical interface of an encoder (often the two possible electrical interface types are referred to as differential or RS-422 as opposed to TTL or single ended)
I think you mean an incremental (or quadrature) encoder type when you say differential
It is possible but I doubt that you have an absolute encoder on the spindle (listing the encoder interface pins will clear this up) Normally EMC keeps track of spindle position by using a incremental encoder with an index signal (A,B,Z signals with A,B being the quadrature signals and Z being the once-per-turn index signal)
If you have a TTL encoder (non-differential) this can be connected to s simple breakout like a 7I42TA or the encoder wires can connect directly to the FPGA pins (though a mistake here can e expensive)
Please Log in or Create an account to join the conversation.
- NICKKINSMAN
- Offline
- Senior Member
Less
More
- Posts: 54
- Thank you received: 0
11 Sep 2011 02:51 #13093
by NICKKINSMAN
Replied by NICKKINSMAN on topic Re:How To Hookup Spindle Encoder to EMC via Mesa?
You are correct, I meant incremental encoder for the X/Z axis.
From your question on pinout - the spindle encoder has PA, PB and SC (in addtion to GND and +5V) in modern terminology, I beleive that is the A,B and Index.
So, maybe you are right then, your description seems to fit the 3 legs I have on this encoder. With this being the case, can you rehash what you meant below, I am not sure if you are saying the7I42TA is my answer or not? I have 7I37TA, will that work or not?
From your question on pinout - the spindle encoder has PA, PB and SC (in addtion to GND and +5V) in modern terminology, I beleive that is the A,B and Index.
So, maybe you are right then, your description seems to fit the 3 legs I have on this encoder. With this being the case, can you rehash what you meant below, I am not sure if you are saying the7I42TA is my answer or not? I have 7I37TA, will that work or not?
Please Log in or Create an account to join the conversation.
11 Sep 2011 13:07 #13103
by cncbasher
Replied by cncbasher on topic Re:How To Hookup Spindle Encoder to EMC via Mesa?
adding extra encoders to a mesa configuration , would involve adding another encoder to the firmware which can be done , either by recompiling the hostmot2 firmware , or possibly picking a larger configuration that you need any unused pins revert to gpio . but remeber each bank P3 P4 etc holds 12 signals not 24 the unused pins are ground .
encoder signals can be connected just fine to the mesa io cards , using A,B,Z as PCW explained . using the preconfigured pins A,B,I as shown in pncconf or dmesg txt listing
either addon board will work , although i personaly use the 7I42TA types
encoder signals can be connected just fine to the mesa io cards , using A,B,Z as PCW explained . using the preconfigured pins A,B,I as shown in pncconf or dmesg txt listing
either addon board will work , although i personaly use the 7I42TA types
Please Log in or Create an account to join the conversation.
12 Sep 2011 12:02 #13119
by andypugh
Replied by andypugh on topic Re:How To Hookup Spindle Encoder to EMC via Mesa?
cncbasher wrote:
I don't know of any Mesa firmwares with fewer than 4 encoders (other than those with none). So adding an extra is just a case of changing a number in the config string (which is probably in the INI file).
I have just wired my encoders direct to FPGA card pins, and that appears to work fine for 5V TTL signals.
However, there is no reason that you can't use the 7i37TA, it makes wiring easier, and protects the FPGA.
Edit the INI file (look for a num_encoders parameter) then start and stop EMC2. Then type 'dmesg' at the command prompt and somewhere in all that text will be the pin-out of your FPGA card. Just hook up the encoder wires via the 7i37 and see what happens. (Look in machine-halmeter at the encoder.N.rawcounts pin, you should see it change as you rotate the spindle).
adding extra encoders to a mesa configuration , would involve adding another encoder to the firmware which can be done , either by recompiling the hostmot2 firmware , or possibly picking a larger configuration that you need any unused pins revert to gpio
I don't know of any Mesa firmwares with fewer than 4 encoders (other than those with none). So adding an extra is just a case of changing a number in the config string (which is probably in the INI file).
I have just wired my encoders direct to FPGA card pins, and that appears to work fine for 5V TTL signals.
However, there is no reason that you can't use the 7i37TA, it makes wiring easier, and protects the FPGA.
Edit the INI file (look for a num_encoders parameter) then start and stop EMC2. Then type 'dmesg' at the command prompt and somewhere in all that text will be the pin-out of your FPGA card. Just hook up the encoder wires via the 7i37 and see what happens. (Look in machine-halmeter at the encoder.N.rawcounts pin, you should see it change as you rotate the spindle).
Please Log in or Create an account to join the conversation.
12 Sep 2011 17:16 #13129
by cmorley
Replied by cmorley on topic Re:How To Hookup Spindle Encoder to EMC via Mesa?
On a side note :
sorry of course the 7i29 has only 2 encoder inputs - I was thinking the more common 7i33. Mesa makes so many cards!
Peter reminded me the other day that the 7i29 requires PWM (not PDM) at a base frequency of 20 khz.
please make sure the config sets that up. ( if thats a little too Greek to you set us know)
sorry of course the 7i29 has only 2 encoder inputs - I was thinking the more common 7i33. Mesa makes so many cards!
Peter reminded me the other day that the 7i29 requires PWM (not PDM) at a base frequency of 20 khz.
please make sure the config sets that up. ( if thats a little too Greek to you set us know)
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.085 seconds