How do you get 'scale' to work

More
3 years 1 month ago #280136 by echristley
I don't understand why I can't scale the response I get from my vfd.  The HAL code below works, and the value from the VFD shows up and modifies the meter I have in my PyVCP panel.  But, if I enable the two commented lines, and comment out the very last one, LinuxCNC errors out on startup with a comment about it not being a float.  Isn't everything involved with 'scale' a float?


loadrt scale names=scale_torque,scale_power,scale_current,scale_freq
addf scale_power servo-thread
setp scale_power.gain 10
#setp scale_power.in mb2hal.power.power.float
#net power scale_power.out => pyvcp.power
net power mb2hal.power.power.float => pyvcp.power
 

Please Log in to join the conversation.

More
3 years 1 month ago #280139 by Aciera
Try creating a net for this line instead of a setp:
#setp scale_power.in mb2hal.power.power.float

Please Log in to join the conversation.

More
3 years 1 month ago #280152 by echristley
That was it. Got it on one.

Please Log in to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum