VFD Analog Scaling

More
10 Sep 2017 19:35 - 10 Sep 2017 19:42 #98794 by dm
VFD Analog Scaling was created by dm
I am mentally exhausted, and finally ready to ask for help.

In a nut shell, I have installed a VFD on my in-progress retrofit Bridgeport R2E4. In high gear 30hz (lowest I've allowed) spins the spindle at 1260 rpm. 100hz spins the spindle 4200 rpm (max I've allowed). High gear works great, low gear does not.

When I change to low gear, I cannot change the speed via the VFD. Low gear should be 30hz -> 141rpm 100hz -> 470rpm. Obviously this is because I have set the minimum analogout speed in my ini file to 1260.

So I thought to myself; SELF! Just add a few mux components, and then dump the output into the analogout5-minlim, analogout5-maxlim, and analogout5-scalemax. Brilliant!

No. Parameters cannot be linked to Pins.:angry:

I have a 5i25, 7i77, and a Hitachi WJ200 vfd. The attached HAL and INI file is the one that does not work because I've tried linking a parameter to a pin. I need another solution.

So here I am, asking for advice. How should I handle this situation?


EDIT: By manually setting hm2_5i25.0.7i77.0.1.analogout5- minlim, maxlim, and scalemax to the lower gear settings, like I intended with the mux2 command. It worked perfect. How could I automate this change to occur? Can I somehow make these parameters a Pin instead of a parameter?
Attachments:
Last edit: 10 Sep 2017 19:42 by dm.

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

More
10 Sep 2017 19:42 #98795 by PCW
Replied by PCW on topic VFD Analog Scaling
I think this is a application for the "gearchange" component
(man gearchange)

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

More
10 Sep 2017 19:51 - 10 Sep 2017 20:13 #98796 by dm
Replied by dm on topic VFD Analog Scaling
I already have the gearchange component implemented around line 256 to 271. What am I doing wrong with it?



EDIT: The gear change component seems to be working just fine. It scales the commanded RPMs correctly. From what I can see, the issue is that the analog output doesn't scale. I need to use 0-10v to go from 141 rpm to 470 rpm, and then the same 0-10 needs to go from 1260 rpm to 4200 rpm. When I change speed in high gear, it works as expected; it starts at 1260 (30hz on vfd). It goes up from there. In low gear, it starts at 141rpm, as expected. When a speed increase is called for, analogout5 is increased, but there is no output change on the VFD.
Last edit: 10 Sep 2017 20:13 by dm.

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

More
10 Sep 2017 20:12 #98797 by PCW
Replied by PCW on topic VFD Analog Scaling
Not sure but you dont need the mux comp with gearchange

Also the gearchange man page says:

gearchange.N.scale2 float rw (default: 1.0)
Relative scale of gear 2 vs. gear 1 Since it is assumed that
gear 2 is "high gear", scale2 must be greater than 1, and will
be reset to 1 if set lower.

and you have:

setp gearchange.0.scale2 0.112108

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

More
10 Sep 2017 22:27 #98802 by dm
Replied by dm on topic VFD Analog Scaling
For those interested, I have solved the problem. My solution is probably not the most elegant - or correct for that matter.

I ended up using 2 mux commands and 3 scales. 2 of the scales and one of the muxes are for encoder scaling. My encoder is mounted before the gear box, so i must scale to get the actual low rpms.

I'll be honest, I'm having a hard time defining what my problem is, exactly. Basically the output of the gear change wasn't making a large enough change for analogout5 to change speeds. So by using a mux and a scale (mux2.0, and scale.1), I scale my commanded RPMs to what they should be in high gear. Essentially I'm making the VFD spin the motor the same for high gear or low gear, and then using the gear ratio to get a lower speed. As far as the rest of the program is concerned, low rpms are still low rpms, but the analogout5 is outputting as if it were always in high gear.

I've attached my hal and ini files. These seem to be working for me as of now. I get full range in low gear, and full range in high gear. RPMs are displaying correctly.
Attachments:

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

More
10 Sep 2017 22:37 #98803 by PCW
Replied by PCW on topic VFD Analog Scaling
The gearchange component will do the scaling and limiting for you
but you cannot use a scale2 value less than 1

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

Time to create page: 0.330 seconds
Powered by Kunena Forum