Mpeg Pendant 6 axis. Axis A,B,C no move. Please help! CNC ver. 2.3.0

More
27 Jan 2017 23:52 #86811 by Banda68
Hi, Linuxcnc forum !

I have this problem:
On my homemade mpeg pendant I have a rotative switch for select axis X,Y,Z,A,B,C

I checked several times my connections from the pendant to the DB25 male connector to the LPT2 port and all wires are well connected. For sure i respect each pin like the CUSTOM.hal file!! like below

I have this trouble:
If I select the position "X" axis i can see the moviment of "Y+Z" axis togheter contemporanely....
If I select the position "Y" axis i can see the moviment of "X+Z" axis togheter contemporanely....
If I select the position "Z" axis i can see the moviment of "Y+X" axis togheter contemporanely....
I can't see each axis move alone... always this trouble

The problem is too about axis "A, B, C," Those no move anytime moving the encoder whell.
I tested too the "Show Hal Configuration" menu > Pins> Parport.
Each input is well working and moving the 6 positions rotative switch i can see the led yellow led go to red color when i select the requested axis. So the input is well working. Never i have 2 or more input contemporanely now!!

net mpg-x axis.0.jog-enable <= parport.2.pin-04-in # AXIS X
net mpg-y axis.1.jog-enable <= parport.2.pin-05-in # AXIS Y
net mpg-z axis.2.jog-enable <= parport.2.pin-06-in # AXIS Z
net mpg-4 axis.3.jog-enable <= parport.2.pin-07-in # AXIS A
net mpg-5 axis.4.jog-enable <= parport.2.pin-12-in # AXIS B
net mpg-6 axis.5.jog-enable <= parport.2.pin-13-in #AXIS C

The strange is about the input X,Y,Z,A are well working in the test input "Watch" . Those going ON or OFF one by one separatly but the axis move togheter like i described above.
Please can You check my Custom.hal file if have any error or errors or you suggest to write in different files or sometings?
I think the mistake can be there because I try to set it for 6 axis starting from the MPEG Pendant sample on the user manual myself . So for sure i make some mistakes.... Please apologize me !!

This is my Custom.hal file at the last revision:
# START OF MY Custom.hal file

# Jog Pendant
loadrt encoder num_chan=1
loadrt mux4 count=1
loadrt mult2 count=1

addf encoder.capture-position servo-thread
addf encoder.update-counters base-thread
addf mux4.0 servo-thread
addf mult2.0 servo-thread

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

# For velocity mode, set n to 1
# In velocity mode the axis stops when dial is stopped even if that means
# the commanded motion is not completed,
# For position mode (the default), set n to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
# This must be set for each axis you want to behave other than default

setp axis.0.jog-vel-mode 0
setp axis.1.jog-vel-mode 0
setp axis.2.jog-vel-mode 0
setp axis.3.jog-vel-mode 0
setp axis.4.jog-vel-mode 0
setp axis.5.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


#setp mult2.0.in3 1.00

# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= parport.2.pin-09-in
net scale2 mux4.0.sel1 <= parport.2.pin-08-in
#net scale2 mux4.0.sel2 <= parport.2.pin-10-in BL
#net scale2 mux4.0.sel3 <= parport.2.pin-11-in BL

# The output from the mux4 is sent to each axis jog scale
net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale
#net pend-scale mult2.0.in1 BL
net rot-scale axis.3.jog-scale <= mult2.0.out #BL Asse rotativo A
net rot-scale axis.4.jog-scale <= mult2.0.out #BL Asse rotativo B
net rot-scale axis.5.jog-scale <= mult2.0.out #BL Asse rotativo C

# The MPG inputs
net mpg-a encoder.0.phase-A <= parport.2.pin-02-in
net mpg-b encoder.0.phase-B <= parport.2.pin-03-in

# The Axis select inputs
net mpg-x axis.0.jog-enable <= parport.2.pin-04-in
net mpg-y axis.1.jog-enable <= parport.2.pin-05-in
net mpg-z axis.2.jog-enable <= parport.2.pin-06-in
net mpg-4 axis.3.jog-enable <= parport.2.pin-07-in
net mpg-5 axis.4.jog-enable <= parport.2.pin-12-in
net mpg-6 axis.5.jog-enable <= parport.2.pin-13-in


net pend-counts axis.0.jog-counts <= encoder.0.counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts
net pend-counts axis.3.jog-counts
net pend-counts axis.4.jog-counts
net pend-counts axis.5.jog-counts

End of Custom.hal FILE

Please apologize me for the english no so perfect..
Many Thanks to You for your Courtesy!!


Kind Regards
Luciano

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

More
28 Jan 2017 00:08 - 28 Jan 2017 00:09 #86813 by andypugh

Each input is well working and moving the 6 positions rotative switch i can see the led yellow led go to red color when i select the requested axis. So the input is well working. Never i have 2 or more input contemporanely now!!


I am fairly sure that Bright Yellow is ="true" and Dark Red = False. (This makes no sense, and confuses me). Check with a pin where you can be sure of the sense, like spindle-on,

Try:
net mpg-x axis.0.jog-enable <= parport.2.pin-04-in-not # AXIS X
net mpg-y axis.1.jog-enable <= parport.2.pin-05-in-not # AXIS Y
net mpg-z axis.2.jog-enable <= parport.2.pin-06-in-not # AXIS Z
net mpg-4 axis.3.jog-enable <= parport.2.pin-07-in-not # AXIS A
net mpg-5 axis.4.jog-enable <= parport.2.pin-12-in-not # AXIS B
net mpg-6 axis.5.jog-enable <= parport.2.pin-13-in-not #AXIS C

Every parport pin has a companion pin called "...-not" with the opposite sense, for convenience. Note that this is a special alternate HAL pin, it isn't the case that -not is a generic HAL modifier function.
Last edit: 28 Jan 2017 00:09 by andypugh.

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

More
28 Jan 2017 00:19 #86814 by Banda68
Dear Andypugh Many Thanks for your quick answer !!
I understand perfectly your suggestions.
I think just now i understand after your suggestion my mistake.
Just on monday morning i will check my machine just because now I'm not at home for the weekend.
So I will advise you soon is possible about the result of the test.

Many Thanks for your Courtesy!!
Luciano

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

More
31 Jan 2017 21:59 #87100 by Banda68
Dear Andypugh,
I have tested my machine following your suggestions.
Finally now all is ok and mine 6 axis moving one for time just selecting the 6 position selector.
My error was the Ground well no refered on mpeg pendant.
Many Thanks for your great support.
Kind Regards
Luciano!!!

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

Time to create page: 0.069 seconds
Powered by Kunena Forum