quelque questions, some question

More
03 Feb 2014 21:32 - 03 Feb 2014 21:32 #43494 by andypugh

move just one incremant
i must reboot axis for move other increment


I am surprised it does that much. Looking at the code
( git.linuxcnc.org/gitweb?p=linuxcnc.git;a...65f96d6fdc3ba0#l1769 )
It seems like you need to set some parameters and possibly an enable.
You may need
setp halui.max-velocity.count-enable 1
and maybe also
setp halui.max-velocity.direct-value 1
Last edit: 03 Feb 2014 21:32 by andypugh.

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

More
04 Feb 2014 01:21 #43503 by akex
thanks andy for your help
for spindle no problem i understand it
my problem i this halfile for max velocity

i try your solution but not work
for the first is a same and second one count=max>0 i can do anythink

and for your link
i don't understand all
is a halfile ? were is "net" "setp"

i don t know where i must go ... i try all ( my solution)

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

More
04 Feb 2014 01:29 #43504 by andypugh

and for your link
i don't understand all
is a halfile ? were is "net" "setp"


No, that was the source code of halui, I was looking there to try to figure out what was meant to happen.

The first thing I think you need to try is to check that the encoder is correctly driving halui.max-velocity.counts.

Go to machine-> Halmeter and set the halmeter to watch the halui pin (or the encoder-counts signal). Make sure that the encoder is actually counting properly.

I think you might see what you are seeing if the encoder is only working on one channel, so it will count up one then down one all the time.

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

More
04 Feb 2014 03:52 #43516 by akex
Hi andy
I already do this
The encoder counts good 2 chanel
And acts on max.velocity.count (i can see the number increase) 1.2.3.4......45........ Etc but never decrease
Strangely only one way ... (+) No -
I thought a bad adjustment
The conections are good
I can see the scrolling LED output 2 (chanel AB)

Is not this way :(

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

More
12 Aug 2014 19:05 #49757 by akex
ok is good
sorry for the long time
this is my hal file

# Inclure vos commandes HAL personnalisées ici
# Ce fichier ne sera pas écrasé si vous relancez Stepconf
# Jog Pendant
loadrt encoder num_chan=5
addf encoder.capture-position servo-thread
addf encoder.update-counters base-thread

setp encoder.0.counter-mode false
setp encoder.0.x4-mode false
setp encoder.1.counter-mode false
setp encoder.1.x4-mode false


setp halui.feed-override.count-enable 1

net potar-a encoder.0.phase-A <= parport.1.pin-08-in
net potar-b encoder.0.phase-B <= parport.1.pin-09-in

# The encoder output.

setp halui.feed-override.direct-value false
setp halui.feed-override.scale .01
net encoder-counts <= encoder.0.counts
net encoder-counts => halui.feed-override.counts

net potar-c encoder.1.phase-A <= parport.1.pin-10-in
net potar-d encoder.1.phase-B <= parport.1.pin-11-in

net so-count <= encoder.1.counts


# connect spindle overide increments - MPG

setp halui.spindle-override.direct-value false
setp halui.spindle-override.scale .01
setp halui.spindle-override.count-enable 1
net so-count => halui.spindle-override.counts

########## Jog Pendant##########

loadrt mux4 count=1
addf mux4.0 servo-thread

# If your MPG outputs a quadrature signal per click set x4 to 1
# If your MPG puts out 1 pulse per click set x4 to 0
setp encoder.2.x4-mode 0
setp encoder.3.x4-mode 0
setp encoder.4.x4-mode 0

# For velocity mode, set to 1
# In velocity mode the axis stops when the dial is stopped
# even if that means the commanded motion is not completed,
# For position mode (the default), set to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
setp axis.0.jog-vel-mode 0
setp axis.1.jog-vel-mode 0
setp axis.2.jog-vel-mode 0

# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001

# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= parport.1.pin-12-in
net scale2 mux4.0.sel1 <= parport.1.pin-13-in-not

# The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => axis.0.jog-scale
net mpg-scale => axis.1.jog-scale
net mpg-scale => axis.2.jog-scale

# The MPG inputs
net mpg-a encoder.2.phase-A <= parport.1.pin-02-in
net mpg-b encoder.2.phase-B <= parport.1.pin-03-in
net mpg-c encoder.3.phase-A <= parport.1.pin-05-in
net mpg-d encoder.3.phase-B <= parport.1.pin-04-in
net mpg-e encoder.4.phase-A <= parport.1.pin-06-in
net mpg-f encoder.4.phase-B <= parport.1.pin-07-in

setp axis.0.jog-enable true
setp axis.1.jog-enable true
setp axis.2.jog-enable true



# The encoder output counts to the axis. Only the selected axis will move.
net xaxe <= encoder.2.counts
net yaxe <= encoder.3.counts
net zaxe <= encoder.4.counts
net xaxe => axis.0.jog-counts
net yaxe => axis.1.jog-counts
net zaxe => axis.2.jog-counts

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

Moderators: darty367
Time to create page: 0.214 seconds
Powered by Kunena Forum