7i96 software encoder problem
- trisa25
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 9
15 Jan 2021 18:07 #195472
by trisa25
7i96 software encoder problem was created by trisa25
Hello,
I have been converting my Emco F1 from Mach3 to Linuxcnc 2.8 and recently made myself a jog pendant.
For configuration i have been mostly copying .hal configuration from RotarySMP and have the switches and selectors working but have a problem with software encoder for the wheel. I get inconsistently lower counts than the numbers on the encoder (i have tried connecting it to P1 and TB3 inputs). If I spin it a revolution clockwise and back to zero the encoder count is higher than zero.
I tried connecting it to the spindle encoder input and it was working perfectly.
i have attached my hal files bellow if that helps.
Thank you,
Jan
I have been converting my Emco F1 from Mach3 to Linuxcnc 2.8 and recently made myself a jog pendant.
For configuration i have been mostly copying .hal configuration from RotarySMP and have the switches and selectors working but have a problem with software encoder for the wheel. I get inconsistently lower counts than the numbers on the encoder (i have tried connecting it to P1 and TB3 inputs). If I spin it a revolution clockwise and back to zero the encoder count is higher than zero.
I tried connecting it to the spindle encoder input and it was working perfectly.
i have attached my hal files bellow if that helps.
Thank you,
Jan
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18476
- Thank you received: 5047
15 Jan 2021 19:00 - 15 Jan 2021 19:01 #195476
by PCW
Replied by PCW on topic 7i96 software encoder problem
It may be a level issue, the 7I96 isolated inputs need > 4V to register a high
level. One option if you have TTL level signals is to run the 7i96 isolated
inputs in sourcing mode (connect the input common to +5V) Though this will
will require changing the common connection for limit switches etc.
Another option is to add external pullup resistors to 5V (say 470 Ohm) to
guarantee a 5V high signal to the 7I96.
level. One option if you have TTL level signals is to run the 7i96 isolated
inputs in sourcing mode (connect the input common to +5V) Though this will
will require changing the common connection for limit switches etc.
Another option is to add external pullup resistors to 5V (say 470 Ohm) to
guarantee a 5V high signal to the 7I96.
Last edit: 15 Jan 2021 19:01 by PCW.
Please Log in or Create an account to join the conversation.
- trisa25
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 9
16 Jan 2021 17:38 #195553
by trisa25
Replied by trisa25 on topic 7i96 software encoder problem
I already have the input common connected to +5V, the wheel is ttl output with connections for differential signal but I am only using positive outputs.I can see the leds on input changing states when using the wheel, it also works fine if i spin it very slowly, however if i turn it faster, it doesnt register all the counts.
I tried 1k pulldowns but with no success.
I tried 1k pulldowns but with no success.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18476
- Thank you received: 5047
16 Jan 2021 22:01 - 16 Jan 2021 22:21 #195584
by PCW
Replied by PCW on topic 7i96 software encoder problem
Well, at a 1 KHz servo thread there is a limit to how fast you can spin the MPG
Is this a standard 100 PPR MPG?
Also if the servo thread rate is the limitation, you could use the 7i96_inmd.bit
firmware that supports up to 4 MPGs on isolated I/O bits 0..7. This will
work up to the input optocoupler bandwidth (about 5KHz)
Is this a standard 100 PPR MPG?
Also if the servo thread rate is the limitation, you could use the 7i96_inmd.bit
firmware that supports up to 4 MPGs on isolated I/O bits 0..7. This will
work up to the input optocoupler bandwidth (about 5KHz)
Last edit: 16 Jan 2021 22:21 by PCW.
Please Log in or Create an account to join the conversation.
- trisa25
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 9
17 Jan 2021 18:42 #195694
by trisa25
Replied by trisa25 on topic 7i96 software encoder problem
Yes I am using a 100 PPR encoder.
I also have really bad latency on my computer (core2duo, 945g motherboard) could this be the problem?
How could I make a custom firmware if that is possible, right now i am using 7i96_1pwm.
I need 1 PWM output for spindle, would like to keep hardware encoder connection if i decide for riggid tapping in the future, and all MPG switches and encoder are connected to P1 GPIO.
I also have really bad latency on my computer (core2duo, 945g motherboard) could this be the problem?
How could I make a custom firmware if that is possible, right now i am using 7i96_1pwm.
I need 1 PWM output for spindle, would like to keep hardware encoder connection if i decide for riggid tapping in the future, and all MPG switches and encoder are connected to P1 GPIO.
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18476
- Thank you received: 5047
17 Jan 2021 22:15 #195714
by PCW
Replied by PCW on topic 7i96 software encoder problem
Here is a bitfile that has a INM and 4 MPG inputs A/B pairs on P1:
Attachments:
Please Log in or Create an account to join the conversation.
- trisa25
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 9
18 Jan 2021 11:25 #195768
by trisa25
Replied by trisa25 on topic 7i96 software encoder problem
This one didnt work (gave me an error that that there is only 1 encoder), but i tried 7i96_7i78 firmware and it works flawlessly now.
Thank you very much,
Jan
Thank you very much,
Jan
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18476
- Thank you received: 5047
18 Jan 2021 16:01 - 18 Jan 2021 16:01 #195810
by PCW
Replied by PCW on topic 7i96 software encoder problem
There is only one standard encoder in that configuration,
the MPG encoders have a different name (but support
1X mode for MPGs which is not supported by the high
speed encoder)
the MPG encoders have a different name (but support
1X mode for MPGs which is not supported by the high
speed encoder)
Last edit: 18 Jan 2021 16:01 by PCW.
Please Log in or Create an account to join the conversation.
- ollied1981
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 1
09 Nov 2021 14:20 #225829
by ollied1981
Replied by ollied1981 on topic 7i96 software encoder problem
Hi,
I'm about to try and add an MPG to my 7i96 and I found this post. I'd like to put the encoder on the P1 expansion port if possible, and also need 1 PWM channel for VFD speed control so the bitfile you posted above looks like it could work?
Is it possible to use just one of the encoders on P1 and use the pins that the other encoders would use for the XYZ and scale switches from the MPG? Also what's the different name of the encoders on P1 you mention above?
Hoping you can help me....
Oliver
I'm about to try and add an MPG to my 7i96 and I found this post. I'd like to put the encoder on the P1 expansion port if possible, and also need 1 PWM channel for VFD speed control so the bitfile you posted above looks like it could work?
Is it possible to use just one of the encoders on P1 and use the pins that the other encoders would use for the XYZ and scale switches from the MPG? Also what's the different name of the encoders on P1 you mention above?
Hoping you can help me....
Oliver
Please Log in or Create an account to join the conversation.
- PCW
-
- Offline
- Moderator
-
Less
More
- Posts: 18476
- Thank you received: 5047
09 Nov 2021 15:14 #225840
by PCW
Replied by PCW on topic 7i96 software encoder problem
Note that the P1 connector is intended to work with external breakout
boards and if you connect it directly to a very noisy device like a VFD
you will likely damage the 7I96.
It would be better to use either a breakout board for the PWM, or a
configuration that replaces one of the one board step/dir outputs with PWM
boards and if you connect it directly to a very noisy device like a VFD
you will likely damage the 7I96.
It would be better to use either a breakout board for the PWM, or a
configuration that replaces one of the one board step/dir outputs with PWM
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.344 seconds