How do you get 'scale' to work

More
06 Sep 2023 18:31 #280136 by echristley
How do you get 'scale' to work was created 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 or Create an account to join the conversation.

  • Aciera
  • Aciera's Avatar
  • Away
  • Administrator
  • Administrator
More
06 Sep 2023 18:52 - 06 Sep 2023 18:52 #280139 by Aciera
Replied by Aciera on topic How do you get 'scale' to work
Try creating a net for this line instead of a setp:
#setp scale_power.in mb2hal.power.power.float
Last edit: 06 Sep 2023 18:52 by Aciera.
The following user(s) said Thank You: echristley

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

More
06 Sep 2023 21:19 #280152 by echristley
Replied by echristley on topic How do you get 'scale' to work
That was it. Got it on one.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum