Adding a Mpg to a 7i85s
01 May 2018 14:22 #109908
by Clive S
Replied by Clive S on topic Adding a Mpg to a 7i85s
What more info do I need to provide as I am going around in circles:( . Any help would be appreciated.
Please Log in or Create an account to join the conversation.
01 May 2018 14:57 #109911
by PCW
Replied by PCW on topic Adding a Mpg to a 7i85s
If you have already set this up on a 7I76 this should be nearly the same except for
specific pin and parameter names.
Where are you stuck?
specific pin and parameter names.
Where are you stuck?
Please Log in or Create an account to join the conversation.
01 May 2018 16:00 #109921
by Clive S
This is what I have in custom hal:
net x-jog-count axis.0.jog-counts
net x-jog-count hm2_5i25.0.encoder.01.count
setp axis.0.jog-enable true
hm2_5i25.0.encoder.01.count counts up and down in blocks of 4
hm2xxxxxxxxxx.input-a goes true and false
hm2xxxxxxxxxxx.position counts up and down
hm2xxxxxxxxxxxxx.vel seems ok up and down
I want to use 3 mpg's one for each axis
Replied by Clive S on topic Adding a Mpg to a 7i85s
If you have already set this up on a 7I76 this should be nearly the same except for
specific pin and parameter names.
Where are you stuck?
This is what I have in custom hal:
net x-jog-count axis.0.jog-counts
net x-jog-count hm2_5i25.0.encoder.01.count
setp axis.0.jog-enable true
hm2_5i25.0.encoder.01.count counts up and down in blocks of 4
hm2xxxxxxxxxx.input-a goes true and false
hm2xxxxxxxxxxx.position counts up and down
hm2xxxxxxxxxxxxx.vel seems ok up and down
I want to use 3 mpg's one for each axis
Attachment not found
Please Log in or Create an account to join the conversation.
01 May 2018 21:37 #109950
by rodw
Replied by rodw on topic Adding a Mpg to a 7i85s
Beecause PCW said its similar. From my build thread for a 7i76e (single axis with scale switch)
forum.linuxcnc.org/show-your-stuff/32029...utter-build?start=20
forum.linuxcnc.org/show-your-stuff/32029...utter-build?start=20
# Metric units used
loadrt hm2_eth board_ip="10.10.10.10" config="firmware=hm2/7i76/7i76e.BIT num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=2xxxx"
loadrt mux4 count=1
addf mux4.0 servo-thread
loadrt or2 count=4
addf or2.3 servo-thread
setp axis.x.jog-vel-mode 0
net x-jog-counter <= hm2_7i76e.0.7i76.0.0.enc0.count
net x-jog-counter => axis.x.jog-counts
net mux-in1 or2.3.in0 <= hm2_7i76e.0.7i76.0.0.input-22 => mux4.0.sel0
net mux-in2 or2.3.in1 <= hm2_7i76e.0.7i76.0.0.input-21 => mux4.0.sel1
net x-jog-enable <= or2.3.out
net x-jog-enable => axis.x.jog-enable
setp mux4.0.in0 0.0
setp mux4.0.in1 1.0
setp mux4.0.in2 0.1
setp mux4.0.in3 0.01
net x-jog-scale mux4.0.out => axis.x.jog-scale
Please Log in or Create an account to join the conversation.
02 May 2018 12:09 #110014
by Clive S
Replied by Clive S on topic Adding a Mpg to a 7i85s
@Rod
Thanks for the help Rod I had seen this from your build.
Would you mind showing me the code without the scale switch as I only require one scale ie about 0.1
I am have trouble sorting what each line does.
Thanks for the help Rod I had seen this from your build.
Would you mind showing me the code without the scale switch as I only require one scale ie about 0.1
I am have trouble sorting what each line does.
Please Log in or Create an account to join the conversation.
02 May 2018 13:08 #110018
by rodw
Its pretty well documented in my thread piece by piece. The mux4 does the selection so the scale you select is set in the very last line based on the switch position. You could probably use setp to set the value on that line to the scale you want.
The or2 enables the jog wheel only when the scale switch is not set to position 0.
Replied by rodw on topic Adding a Mpg to a 7i85s
@Rod
Thanks for the help Rod I had seen this from your build.
Would you mind showing me the code without the scale switch as I only require one scale ie about 0.1
I am have trouble sorting what each line does.
Its pretty well documented in my thread piece by piece. The mux4 does the selection so the scale you select is set in the very last line based on the switch position. You could probably use setp to set the value on that line to the scale you want.
The or2 enables the jog wheel only when the scale switch is not set to position 0.
The following user(s) said Thank You: Clive S
Please Log in or Create an account to join the conversation.
02 May 2018 16:22 - 04 May 2018 07:42 #110034
by Clive S
Replied by Clive S on topic Adding a Mpg to a 7i85s
Almost success Thanks to all for helping.
Just looking at X axis first (I have Y & Z working with the same prob) this in custom hal:-
setp axis.0.jog-vel-mode 0
net x-jog-counter <= hm2_5i25.0.encoder.01.count
net x-jog-counter => axis.0.jog-counts
setp axis.0.jog-vel-mode true
#setp axis.0.jog-enable true
setp axis.0.jog-scale 0.000984
BUT I can't set "setp axis.0.jog-enable true" because this is what is reported "halcmd: setp axis.0.jog-enable true
<stdin>:3: pin 'axis.0.jog-enable' is connected to a signal"
I can see that here:-
1988 s32 IN 0 axis.0.jog-counts <== x-jog-counter
1988 bit IN FALSE axis.0.jog-enable <== sxp.xen-button
1988 float IN 0.000984 axis.0.jog-scale
1988 bit IN TRUE axis.0.jog-vel-mode
I can make "axis.0.jog-enable true" by pressing the shuttle express X button on the pendant.
In this case the MPG and pendant works fine.
So problem is how do I solve this so that I can use the MPG without selecting the axis button on the pendant. So that I can have 3 MPG's to use the mill manually.
Just looking at X axis first (I have Y & Z working with the same prob) this in custom hal:-
setp axis.0.jog-vel-mode 0
net x-jog-counter <= hm2_5i25.0.encoder.01.count
net x-jog-counter => axis.0.jog-counts
setp axis.0.jog-vel-mode true
#setp axis.0.jog-enable true
setp axis.0.jog-scale 0.000984
BUT I can't set "setp axis.0.jog-enable true" because this is what is reported "halcmd: setp axis.0.jog-enable true
<stdin>:3: pin 'axis.0.jog-enable' is connected to a signal"
I can see that here:-
1988 s32 IN 0 axis.0.jog-counts <== x-jog-counter
1988 bit IN FALSE axis.0.jog-enable <== sxp.xen-button
1988 float IN 0.000984 axis.0.jog-scale
1988 bit IN TRUE axis.0.jog-vel-mode
I can make "axis.0.jog-enable true" by pressing the shuttle express X button on the pendant.
In this case the MPG and pendant works fine.
So problem is how do I solve this so that I can use the MPG without selecting the axis button on the pendant. So that I can have 3 MPG's to use the mill manually.
Last edit: 04 May 2018 07:42 by Clive S.
Please Log in or Create an account to join the conversation.
04 May 2018 07:46 #110173
by Clive S
Replied by Clive S on topic Adding a Mpg to a 7i85s
Any help with the above would be appreciated.
Also is it beneficial to set the mpg encoder to "times 4 mode"
Also is it beneficial to set the mpg encoder to "times 4 mode"
Please Log in or Create an account to join the conversation.
04 May 2018 08:35 #110176
by rodw
Replied by rodw on topic Adding a Mpg to a 7i85s
I think you will find that somewhere you have connected axis.0.jog-enable to a pin on your pendant.
Try
If it makes you feel better, my commercial pendant has a safety switch that must be pressed before the jog wheel is enabled.
Try
unlinkp axis.0.jog-enable
setp axis.0.jog-enable true
If it makes you feel better, my commercial pendant has a safety switch that must be pressed before the jog wheel is enabled.
Please Log in or Create an account to join the conversation.
04 May 2018 08:54 - 04 May 2018 08:57 #110179
by Clive S
Replied by Clive S on topic Adding a Mpg to a 7i85s
What I am trying to achieve is to keep the pendant connected all the time but be able to use the 3 mpg's as manual jog wheels for each axis.
The code above lets me only use an mpg when the button on the pendant is activated (ie there is one button for each axis). This means that I cannot use 2 mpg's at the same time.
this is where I think my problem is:
BUT I can't set "setp axis.0.jog-enable true" because this is what is reported "halcmd: setp axis.0.jog-enable true
<stdin>:3: pin 'axis.0.jog-enable' is connected to a signal"
I need to be able to set all the axis.0.jog-enable true, but the button on the pendant is doing that with this ;- 1988 bit IN FALSE axis.0.jog-enable <== sxp.xen-button. Unplugging the pendant does not help either.
I am not sure what info is needed to do this.
The code above lets me only use an mpg when the button on the pendant is activated (ie there is one button for each axis). This means that I cannot use 2 mpg's at the same time.
this is where I think my problem is:
BUT I can't set "setp axis.0.jog-enable true" because this is what is reported "halcmd: setp axis.0.jog-enable true
<stdin>:3: pin 'axis.0.jog-enable' is connected to a signal"
I need to be able to set all the axis.0.jog-enable true, but the button on the pendant is doing that with this ;- 1988 bit IN FALSE axis.0.jog-enable <== sxp.xen-button. Unplugging the pendant does not help either.
I am not sure what info is needed to do this.
Last edit: 04 May 2018 08:57 by Clive S.
Please Log in or Create an account to join the conversation.
Time to create page: 0.113 seconds