Opinion on scale or limit output

g.mccormick

Lifetime Supporting Member
Join Date
Jul 2012
Location
IN
Posts
961
In my project, I have created a UDT for VFD driven motor. The UDT has elements of .SpdCmd, .ManSpdCmd, .MinLim, .MaxLim among others. The idea being that depending on state, the .SpdCmd is either set to the output of a PID loop, or just directly to the value of .ManSpdCmd (manual). The Min and MaxLim elements allow the setting of minimum and maximum outputs (ex. 25%min and 88%max).

The question is should I just limit the .SpdCmd between the min and max. IE.

(Excuse the pseudo code)

If MyMotor.SpdCmd < MyMotor.MinLim then
MyMotor.SpdCmd = MyMotor.MinLim



Or should I instead scale the .SpdCmd. ( I already have an AOI that I built for scaling)..IE:

If MyMotor.Automode then
LAD_SCALE( In=PID.CV,
InMin=0,
InMax=100,
OutMin= MyMotor.MinLim,
OutMax = MyMotor.MaxLim,
Output= MyMotor.SpdCmd)

if NOT MyMotor.Automode then
LAD_SCALE( In=MyMotor.ManSpdCmd,
InMin=0,
InMax=100,
OutMin= MyMotor.MinLim,
OutMax = MyMotor.MaxLim,
Output= MyMotor.SpdCmd)


Honestly the only issue I see with simply scaling the .SpdCmd is that if doing manual manipulation, if someone types in 25%, the spd cmd will not be set to 25% but will instead be scaled.

The 3rd option would be to scale in auto, and write directly (bypass all min and max limits) in manual. This may actually be the best option since manual is only intended to be used in actual manual usage (ie. I'm standing there and typing in a command I want to run for some reason).
 
I agree with the 3rd option, however, why call your AOI depending on if it is manual or Auto, just create an AOI with a manual input tag (or use the not of the auto) so that if in auto it uses the auto set-point & if not it uses the manual.
 

Similar Topics

I'm looking forward Iconics. I had previously extensive experience with Citect and little bit less experience with Wonderware. Pros and cons with...
Replies
0
Views
842
It is rare that I ask for opinions. But here goes. Currently using a low cost NUC for an hmi. Looking for a low cost NUC or similar. thoughts
Replies
1
Views
1,166
We are in a mechatronics class currently learning the beginnings of PLCs. There are a few things I think we are being misinformed on and I'd like...
Replies
56
Views
22,578
What on earth is wrong with them? a) Some in imperial, some in metric b) Some in imperial or metric, undefined, at 1:2 scale c) Have fun with...
Replies
14
Views
4,140
Hi everyone. I'm working on a new simulator to help teach troubleshooting skills. The goal would be to simulate an operational machine and then...
Replies
0
Views
1,488
Back
Top Bottom