Controlling feed with potentiometer

More
21 Apr 2016 20:53 #73698 by manuel2
Hi,

i have the same problem. A+B are changing in HAL but no counting :( How did you fix it?

My custom_postgui.hal:
net poti-a encoder.1.phase-A <= parport.0.pin-13-in-not

net poti-b encoder.1.phase-B <= parport.0.pin-15-in-not




setp halui.feed-override.scale 0.1

net poti-zaehler  encoder.1.counts halui.feed-override.counts



Greets from Germany
Manuel

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

More
21 Apr 2016 20:58 #73700 by andypugh
Is the encoder update-counters function added to a realtime thread?
There are two functions, one for the base thread and one for the servo thread.
linuxcnc.org/docs/2.7/html/man/man9/encoder.9.html

Is the reset pin set to 1 by any chance?

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

More
22 Apr 2016 14:17 #73715 by manuel2
Hi Andy,

i think i haven't added the update-counters function to a realtime thread... Because i don't know how to do :S

The only thing I addet to my machine.hal is:
loadrt encoder num_chan=2

and to my machine.ini
[DISPLAY]
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 2


[HAL]
HALUI=halui

I have read the encoder-help you linked 3 times but my english is to bad to understand what I have to do that my encoder counts.

All these things I have changed are from here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Spindleoverride. Not less and not more :whistle:

Greets Manuel

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

More
22 Apr 2016 14:26 #73716 by andypugh

I have read the encoder-help you linked 3 times but my english is to bad to understand what I have to do that my encoder counts.


The "manpages" such as that linked contain the information about a HAL component in a standard format. If you are lucky the author of the component also gives some explanation of what the component does and how to use it.

"Synopsis" tells you how to load the component in to HAL. In your case this would be
loadrt encoder num_chan=1
"Functions" tells you which functions need to be added to real-time threads. In your case this would be
addf encoder.update-counters base-thread
addf  encoder.capture-position servo-thread
"Pins" lists all the HAL pins created by the component and what they do.
"Parameters" are setting which can be altered by the HAL file but can not be linked to HAL pins.
The following user(s) said Thank You: manuel2

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

More
22 Apr 2016 14:49 #73719 by manuel2
You are my man!! Thank you for the explanation, it works perfect! :silly: :silly:

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

Time to create page: 0.101 seconds
Powered by Kunena Forum