7i96 software encoder problem

More
15 Jan 2021 18:07 #195472 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
Attachments:

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

More
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.
Last edit: 15 Jan 2021 19:01 by PCW.

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

More
16 Jan 2021 17:38 #195553 by trisa25
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.

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

More
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)
Last edit: 16 Jan 2021 22:21 by PCW.

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

More
17 Jan 2021 18:42 #195694 by trisa25
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.

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

More
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:

File Attachment:

File Name: 7i96_1pwm_inmdp1.zip
File Size:113 KB
Attachments:

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

More
18 Jan 2021 11:25 #195768 by trisa25
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

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

More
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)
Last edit: 18 Jan 2021 16:01 by PCW.

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

Moderators: PCWjmelson
Time to create page: 0.194 seconds
Powered by Kunena Forum