Very basic Pnconf questions - daughter boards

More
19 Jul 2014 23:43 #48944 by andypugh

net  floatout.pin =>  halui.feed-override.counts
setp halui.feed-override.count-enable true
setp halui.feed-override.direct-value true
setp halui.feed-override.scale 0.1


I would hazard a guess that you want count-enable false and direct-value true but the docs are not clear, so you might need to try both.

Your analogue input is likely to be a float. halui.feed-override.counts is an s32 (signed 32 bit integer) so you need to use:
www.linuxcnc.org/docs/html/man/man9/conv_float_s32.9.html

And, even though it is only a type conversion, it needs to be loadrt-ed, and addf-ed or it won't do anything.

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

More
02 Aug 2014 22:44 #49441 by scruffythefirst
Well the hardware has arrived, and nothing has let the magic smoke out yet!

I bought 2x 7i48's in the end and have both showing up in allhall.txt -
        12 	float	OUT	0	hm2_5i23.0.7i84.0.0.analogin0
	12	float	OUT	0	hm2_5i23.0.7i84.0.0.analogin1
	12	float	OUT	0	hm2_5i23.0.7i84.0.0.analogin2
	12	float	OUT	0	hm2_5i23.0.7i84.0.0.analogin3
	12	float	OUT	23.92859	hm2_5i23.0.7i84.0.0.fieldvoltagea
	12	float	OUT	24.60213	hm2_5i23.0.7i84.0.0.fieldvoltageb
	12	bit	OUT	FALSE	hm2_5i23.0.7i84.0.0.input-00
	12	bit	OUT	TRUE	hm2_5i23.0.7i84.0.0.input-00-not
	12	bit	OUT	FALSE	hm2_5i23.0.7i84.0.0.input-01
        12   	float	OUT	0	hm2_5i23.0.7i84.0.1.analogin0
	12	float	OUT	0	hm2_5i23.0.7i84.0.1.analogin1
	12	float	OUT	0	hm2_5i23.0.7i84.0.1.analogin2
	12	float	OUT	0	hm2_5i23.0.7i84.0.1.analogin3
	12	float	OUT	23.89314	hm2_5i23.0.7i84.0.1.fieldvoltagea
	12	float	OUT	24.28308	hm2_5i23.0.7i84.0.1.fieldvoltageb
	12	bit	OUT	FALSE	hm2_5i23.0.7i84.0.1.input-00
	12	bit	OUT	TRUE	hm2_5i23.0.7i84.0.1.input-00-not
	12	bit	OUT	FALSE	hm2_5i23.0.7i84.0.1.input-01

I also got the analogue input working with setting a manual value for the analogue input - custom.hal here, but can't seem to get it to update when Linuxcnc loads
# Include your custom HAL commands here
This file will not be overwritten when you run PNCconf again


# ----analogue input signal conditioning - feed overide------

loadrt conv_float_s32 count=1 
addf conv-float-s32.0 servo-thread

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

setp halui.feed-override.count-enable true
setp halui.feed-override.direct-value true
setp halui.feed-override.scale 0.01

#-set gain and offset

	setp scale.0.gain 0.585
	setp scale.0.offset 0

#-create analogue input signal from 7i84

	newsig fro-analogue float
	#net fro-analogue <= 7i84.analogue.input.name

#-send analogue signal to scale function

	net fro-analogue => scale.0.in

#-convert output from scale to s32

	net scale-output <= scale.0.out
	net scale-output => conv-float-s32.0.in
	net conv-output <= conv-float-s32.0.out 
	net conv-output => halui.feed-override.counts


So all I should need to do is change this
#net fro-analogue <= 7i84.analogue.input.name

to

net fro-analogue <= hm2_5i23.0.7i84.0.0.analogin0

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

More
02 Aug 2014 22:56 #49444 by andypugh

#net fro-analogue <= 7i84.analogue.input.name
to
net fro-analogue <= hm2_5i23.0.7i84.0.0.analogin0


I don't know if that was a question, but if it was the answer is "yes"

I am not sure about your scale gain. You probably want to have a significant number of "counts" in the s32 value, then set the fro-scale to suit. The conversion from float to s32 will convert to integer, so you will lose most of the float data unless you scale it up a bit.

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

More
25 Feb 2015 05:31 #56281 by scruffythefirst
It's starting...

And Yes, thats my 79 year old dad standing on the bed.




Attachments:

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

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