Analog Overrides? 5i25+7i77 Mode 3

More
9 years 1 month ago #98650 by B.Reilly01
I would like to have analog overrides for spindle, rapid, and feed. I would like to use the Analog inputs connected to potentiometers. I would like to use PNCConf for this so I don't hose something up. Is this possible? My 7i77 is set to Mode3, which should allow 4 analog inputs (0-3) as well as 2 MPGs (only using 1 on 16-17). Under this mode, I don't seem to be able to select analog input in PNCCONF. Any help would be appreciated.

Thank you

Please Log in to join the conversation.

More
9 years 1 month ago #98696 by andypugh
I think that this level of complexity is beyond the capability of PnCConf.
You will have to configure this by hand in the HAL file.

Something like:
Code:
net spindle-override hm2_7i77.0.analog0 => halui.spindle-override.scale setp halui.spindle-override.counts 100 setp halui.spindle-override.direct-value 1

linuxcnc.org/docs/2.7/html/man/man1/halui.1.html

Please Log in to join the conversation.

More
8 years 10 months ago #103805 by Ichzwei
Hi, i have search the forum for help with a potentiometer as spindle override, and find this post.
but it don't work for me.

i have this in my HAL-file:

loadrt scale names=spindle-scale
addf spindle-scale servo-thread

net spindle-analogue hm2_5i25.0.7i77.0.0.analogin0 => spindle-scale.in
net spindle-override spindle-scale.out => halui.spindle-override.value
setp halui.spindle-override.direct-value 1
setp spindle-scale.gain 1
setp spindle-scale.offset -2.5


it shows this error:

Debug file information:
./my_LinuxCNC_machine.hal:318: Signal 'spindle-override' can not add OUT pin 'halui.spindle-override.value', it already has OUT pin 'spindle-scale.out'
16983

what is my mistake?

Please Log in to join the conversation.

More
8 years 10 months ago #103812 by Henk
Hi
It seems that the signal spindle-override exists somewhere else in your hal file and you are trying to connect another out pin which is not allowed.

henk

Please Log in to join the conversation.

More
8 years 10 months ago #103817 by Ichzwei
Thanks henk.

I have chanced the name of the pin, so it definitely only on this position in the HAL-file.
but it shows the same error.

i add the hal file, maybe i overlooking something

thanks for your help
michael


Warning: Spoiler!

Please Log in to join the conversation.

More
8 years 10 months ago #103823 by Henk
HI
I think you are trying to write to a signal that is an "out" pin. not an "in" pin in halui


From the halui man-page

spindle override
halui.spindle-override.count-enable bit in (default: TRUE)

When TRUE, modify spindle override when counts changes.

halui.spindle-override.counts s32 in

counts X scale = spindle override percentage

halui.spindle-override.decrease bit in

pin for decreasing the SO (-=scale)

halui.spindle-override.direct-value bit in

pin to enable direct spindle override value input

halui.spindle-override.increase bit in

pin for increasing the SO (+=scale)

halui.spindle-override.scale float in

pin for setting the scale of counts for SO

halui.spindle-override.value float out

current FO value


You need to connect to halui.spindle-override.counts and set the scale pin so that scale x counts = %override.

eg: net spindle-override spindle-scale.out => halui.spindle-override.counts

But halui.spindle-override.counts is a s32 pin and spindle-scale.out is float, so you will have to convert the out from spindle-scale to s32 using conv_float_s32 component.

in short: analog-in (from pot) => spindle-scale => conv_float_s32 => halui.spindle-override.counts.

You will also have to set the gain of the scale and maybe offset to achieve the desired counts

Hope this helps

Henk

Please Log in to join the conversation.

More
8 years 10 months ago #103825 by Ichzwei
thanks henk,
you helpt me solving the problem.

i add this to the hal file... now i can chance the spindle override from 50%-100% on the potentiometer.
Code:
loadrt conv_float_s32 count=1 loadrt scale names=spindle-scale addf spindle-scale servo-thread addf conv-float-s32.0 servo-thread setp halui.spindle-override.direct-value false setp halui.spindle-override.count-enable true setp spindle-scale.gain 4.16666 setp spindle-scale.offset 0 setp halui.spindle-override.scale 0.005 net spindle-analogue hm2_5i25.0.7i77.0.0.analogin0 => spindle-scale.in net spindle-convert spindle-scale.out conv-float-s32.0.in net spindle-override conv-float-s32.0.out halui.spindle-override.counts

but i notice that on the start of linuxcnc the override is not the absolute value of the poti.
i need to rotate it and then the value in linuxcnc chanced.

greetings
michael

Please Log in to join the conversation.

More
8 years 9 months ago #104341 by andypugh

Ichzwei wrote: setp halui.spindle-override.direct-value false


I think this should be "true"

Please Log in to join the conversation.

More
6 years 1 month ago #181647 by xenon-alien
Can you help me out?
Did the same for feed override and have a halui.feed−override.direct−value not found error

Attachment not found


Attachment not found

Code:
loadrt conv_float_s32 count=2 loadrt scale names=spindle-scale,feed-scale # analog 0 addf spindle-scale servo-thread addf conv-float-s32.0 servo-thread # analog 1 addf feed-scale servo-thread addf conv-float-s32.1 servo-thread setp halui.feed−override.direct−value false setp halui.feed−override.count−enable true setp feed-scale.gain 4.16666 setp feed-scale.offset 0 setp halui.feed−override.scale 0.005 net feed-analogue hm2_7i76e.0.7i76.0.0.analogin0 => feed-scale.in net feed-convert feed-scale.out conv-float-s32.1.in net feed-override conv-float-s32.1.out halui.feed−override.counts
The spindle part working, when I comment out the "Analog in 1 Feed" part.

For now I'm using one input for both.

Please Log in to join the conversation.

More
6 years 1 month ago #181653 by cmorley
hyphen looks different in direct-value

Please Log in to join the conversation.

Time to create page: 0.224 seconds
Powered by Kunena Forum