Scaling an analog value

More
6 years 4 months ago #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

Please Log in to join the conversation.

More
6 years 4 months ago #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 to join the conversation.

More
6 years 4 months ago #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 to join the conversation.

More
6 years 4 months ago #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 to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum