Mesa 7i73 encoder rawcounts

More
30 Jul 2021 14:08 #216347 by gunrak
Hi, 

I have mesa 7i73 connected to 7i76e. 
I have LCD connected to 7i73. 
Next what I want to connect is MPG, I have encoder from Hurco pendant don't have specs, but seams that it works fine from 5v. Encoder is connected to ENC0 IN8 and IN9. My problem is that  it counts 1 rawcount unit on every 4th encoder click, in the same time I can see that input-08 and input-09 goes high and low on every click!!! 
In the same time if I connect the same encoder to one of 7i89 encoder inputs I got 1 rawcout unit in every encoder click. 

I can't figure out why! Wiring issue? Encoder mode issue?
I tried to change encoder mode according to 7i73 manual by changing NVENCMODE0, tried various modes without any changes in encoder/rawcount behavior. I notice that there is parameter ENCMODE0 as well, but could not find any reference in manual. Tried to chnage that as well without success. 

Any suggestion what should I do to get one count on every encoder click?

Best regards,
Guntars

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

More
30 Jul 2021 14:32 #216350 by gunrak
Replied by gunrak on topic Mesa 7i73 encoder rawcounts
It seams I fixed the problem. I needed to set encoder mode (NVENCMODE0) to mode 4, even if I tried it before, I think I did it wrong way, I did not restart the board, I think after I did restart it, it correctly changed the mode and now all works as expected.

Thanks :)

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

More
01 Aug 2021 14:51 #216611 by andypugh
Thanks for reporting back.

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

More
01 Aug 2021 15:09 #216615 by gunrak
Replied by gunrak on topic Mesa 7i73 encoder rawcounts
Now I connected simple rotary encoder, since it has quadrature output I need to change encoder mode from default 0 to mode 4.

I am not sure how I managed to do it previous time for enc0, but now I struggling to do change mode for enc1, this is what I do:

halrun

halcmd: loadrt hostmot2
halcmd: loadrt hm2_eth board_ip="192.168.1.121" config="sserial_port_0=00xxxx"

changing according parameter:
halcmd: setp hm2_7i76e.0.7i73.0.1.nvencmode1 4

visual confirmation that it was changed:
halcmd: show param hm2_7i76e.0.7i73.0.1.nvencmode1
Parameters:
Owner Type Dir Value Name
7 u32 RW 0x00000004 hm2_7i76e.0.7i73.0.1.nvencmode1

exit

power cycle whole system

halrun
halcmd: loadrt hostmot2
halcmd: oadrt hm2_eth board_ip="192.168.1.121" config="sserial_port_0=00xxxx"
halcmd: show param hm2_7i76e.0.7i73.0.1.nvencmode1
halcmd: show param hm2_7i76e.0.7i73.0.1.nvencmode1
Parameters:
Owner Type Dir Value Name
7 u32 RW 0x00000000 hm2_7i76e.0.7i73.0.1.nvencmode1

nvencmode1 are back to default value, am I doing something wrong? Or it is firmware bug?

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

More
01 Aug 2021 15:16 #216616 by gunrak
Replied by gunrak on topic Mesa 7i73 encoder rawcounts
:D the same as last time I found the solution.

I added those two lines to my main hal:

setp hm2_7i76e.0.7i73.0.1.nvencmode1 4
setp hm2_7i76e.0.7i73.0.1.encmode1 4

started linuxcnc gui,
power cycled system, removed both lines that I added, started linuxcnc gui and now parameter nvencmode1 is saved and encmode1 is changed as well.

Not sure what is the difference but at-least it worked.

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

More
01 Aug 2021 15:25 - 01 Aug 2021 16:34 #216618 by PCW
Replied by PCW on topic Mesa 7i73 encoder rawcounts
Sserial parameters can only be changed at system start-up
so must be in a hal file.

You can also just leave

setp hm2_7i76e.0.7i73.0.1.encmode1 4

in the hal file and not bother with the nv parameters
Last edit: 01 Aug 2021 16:34 by PCW.

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

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