Scaling an analog value

More
13 Jun 2020 19:23 - 13 Jun 2020 19:27 #171470 by jroddds
After a lot of searching without success, I could use some help.
My VFD will output an analog signal 0-10v that coincides with the current it is drawing. I wanted to use this with the 7i76e board to make a pyVCP meter that displays the spindle load.

I have it working for the most part, but I can't figure how to scale the 0-10v signal to create a 0-100% spindle load. The meter on my panel sees the 2v. I just can't figure out how to scale it up 10x.

As a last resort, I can just set the meter from 0-10 in volts rather than 0-100 percent.

net mymeter <= hm2_7i76e.0.7i76.0.0.analogin0

Thanks
Last edit: 13 Jun 2020 19:27 by jroddds.

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

More
13 Jun 2020 19:48 #171474 by PCW
Replied by PCW on topic Scaling an analog value
setp hm2_7i76e.0.7i76.0.0.analogin0-scalemax 363

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

More
14 Jun 2020 19:29 #171632 by jroddds
Replied by jroddds on topic Scaling an analog value
That works. Thank you. In my searches, I never saw the scalemax term used. Would you mind explaining how you arrived at the 363 value?

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

More
14 Jun 2020 19:35 #171633 by PCW
Replied by PCW on topic Scaling an analog value
I took the default scaling (in volts = 36.3v full scale) and multiplied by 10

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

Time to create page: 0.073 seconds
Powered by Kunena Forum