7i76e: MPG and Analog inputs with pncconf?

More
7 years 9 months ago #123997 by cmorley

trilobyte wrote: >pncconf can configure 7i76e in mode 2 which allows two MPGs and analog inputs.
>Select mode 2 on the I/O connector 1.

if i select this mode 2 pncconf crashes when i try to safe and quit:


I tried this in the latest version of pncconf in the 2.7 branch - what version of linuxcnc are you using?
it has to do with the selection of external MPG, on the external controls page. What option did you select and what di you select for the MPG encoder in the mesa page?

Chris M

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

More
7 years 9 months ago - 7 years 9 months ago #124017 by trilobyte
i'm using the latest master 2.8xxx
i tryed different options in the external controls page. if i set the mode 2 in the I/O connector 1will crash if i try to finish the pnccconf.


i get 3 potentiometers running. i found some code from a 2.7 installation. the first 3 blocks are running after smal changes.
but for the jog speed this looks different. can someone help me with the fourth block of code? the one vor the jog speed.

#----Analog-In
#

loadrt conv_float_s32 names=conv_float_s32.feed,conv_float_s32.spindel,conv_float_s32.maxvel,conv_float_s32.maxjog
addf conv_float_s32.feed servo-thread
addf conv_float_s32.spindel servo-thread
addf conv_float_s32.maxvel servo-thread
addf conv_float_s32.maxjog servo-thread


setp halui.feed-override.scale 0.01277777777777
setp halui.feed-override.direct-value true
setp hm2_7i76e.0.7i76.0.0.analogin0-scalemax 200
net halui.feedanalog <= hm2_7i76e.0.7i76.0.0.analogin0 => conv_float_s32.feed.in
net feedanalog conv_float_s32.feed.out => halui.feed-override.counts

setp halui.spindle.0.override.scale 0.01277777777777
setp halui.spindle.0.override.direct-value true
setp hm2_7i76e.0.7i76.0.0.analogin1-scalemax 180
net halui.spindelanalog <= hm2_7i76e.0.7i76.0.0.analogin1 => conv_float_s32.spindel.in
net spindelanalog conv_float_s32.spindel.out => halui.spindle.0.override.counts

setp halui.max-velocity.scale 1
setp halui.max-velocity.direct-value true
setp hm2_7i76e.0.7i76.0.0.analogin2-scalemax 100
net halui.maxvelanalog <= hm2_7i76e.0.7i76.0.0.analogin2 => conv_float_s32.maxvel.in
net maxvelanalog conv_float_s32.maxvel.out => halui.max-velocity.counts

#setp halui.jog-vel.scale 1
#setp halui.jog-speed.direct-value true
setp hm2_7i76e.0.7i76.0.0.analogin3-scalemax 100
net halui.maxjoganalog <= hm2_7i76e.0.7i76.0.0.analogin3 => conv_float_s32.maxjog.in
#net maxjoganalog conv_float_s32.maxjog.out => jog-speed
Last edit: 7 years 9 months ago by trilobyte.

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

More
7 years 9 months ago #124020 by rodw
This assumes that you use 1 MPG for all axes and you use a binary coded selection switch so you only use two inputs to set 4 sale settings one of them is 0 or OFF. The order of the mux4.in's is dependent on my hardware but it is a metric machine so in mm.
Code:
loadrt mux4 count=1 addf mux4.0 servo-thread # Scale Select setp mux4.0.in0 0.0 setp mux4.0.in1 1.0 setp mux4.0.in2 0.01 setp mux4.0.in3 0.1 net mux4-sel1 <= hm2_7i76e.0.7i76.0.0.input-22 net mux4-sel0 <= hm2_7i76e.0.7i76.0.0.input-21 net mux4-sel1 => mux4.0.sel1 net mux4-sel0 => mux4.0.sel0 net jog-scale <= mux4.0.out net jog-scale => axis.x.jog-scale net jog-scale => axis.y.jog-scale net jog-scale => axis.z.jog-scale

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

More
7 years 9 months ago - 7 years 9 months ago #124021 by rodw
For completeness, I will add my axis selct code here. Normally you would use another mux4 component but in my case I have a 6 axis selection knob on my pendant so I've used a mux8 paired with a select8. This lets me add another 3 controls. eg. I could use the Axis 4 selection setting to control reverse run to step back and forth in the g code. (maybe....).

Also note you need to convert the data type to keep select8 happy.
Code:
loadrt mux8 count=1 loadrt select8 count=1 loadrt conv_float_s32 count=1 addf mux8.0 servo-thread addf select8.0 servo-thread addf conv-float-s32.0 servo-thread #Axis Select (0=off, 1=x, 2=z, 3=y, na, 5=6, 6=4, 7=5) setp mux8.0.in0 0 setp mux8.0.in1 1 setp mux8.0.in2 2 setp mux8.0.in3 3 setp mux8.0.in4 4 setp mux8.0.in5 5 setp mux8.0.in6 6 setp mux8.0.in7 7 net mux8-sel0 <= hm2_7i76e.0.7i76.0.0.input-23 net mux8-sel1 <= hm2_7i76e.0.7i76.0.0.input-24 net mux8-sel2 <= hm2_7i76e.0.7i76.0.0.input-25 net mux8-sel0 => mux8.0.sel0 net mux8-sel1 => mux8.0.sel1 net mux8-sel2 => mux8.0.sel2 net mux-float conv-float-s32.0.in <= mux8.0.out net mux-s32 <= conv-float-s32.0.out net mux-s32 => select8.0.sel net axis-select-x <= select8.0.out1 net axis-select-y <= select8.0.out3 net axis-select-z <= select8.0.out2 net axis-select-4 <= select8.0.out6 net axis-select-5 <= select8.0.out7 net axis-select-6 <= select8.0.out5 net axis-select-x => axis.x.jog-enable net axis-select-y => axis.y.jog-enable net axis-select-z => axis.z.jog-enable # Encoder counts net jog-counter <= hm2_7i76e.0.7i76.0.0.enc0.count net jog-counter => axis.x.jog-counts net jog-counter => axis.y.jog-counts net jog-counter => axis.z.jog-counts

Hope I've copied accross everything you need....
Last edit: 7 years 9 months ago by rodw.

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

More
7 years 9 months ago #124022 by cmorley
I confirmed the error in pncconf and just pushed a fix - it will take a bit of time for it to cycle through - unless you are compiling source code.
Thanks for the information.

Chris M
The following user(s) said Thank You: trilobyte

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

More
7 years 9 months ago - 7 years 9 months ago #124024 by trilobyte
@cmorley: Tnx! I'll try it tomorrow.

@rodw: tnx for the code. i use two mpg and 4 potentiometers and a joystick with 4 tact switches.

at the moment im searching for a solution to connect the potentiometer to the jog speed.

this is my control panel:
image missing http://www.trilobyte.ch/pix/gal/werkstatt/schaublin125/DSC04707.JPG

peter

ps: a picture of the machine (schaublin 125cnc)
image missing http://www.trilobyte.ch/pix/gal/werkstatt/schaublin125/DSC04710.JPG
Last edit: 7 years 9 months ago by trilobyte.

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

Moderators: cmorley
Time to create page: 2.531 seconds
Powered by Kunena Forum