Jump to content

Recommended Posts

  • MVP 2023

Seasons greetings to all!

 

One for the creators in particular.

 

Would it be possible to have a minimum and maximum put into the Linearisation function so that I don't have to do extra equations "externally" to achieve this?

 

Nearly all the Linz I do are only active over a certain range, and I have to write compares to set the high or low figure that over-rides the output once the input ranges are exceeded either way.  It would make things vastly easier if it could be done within the Linz function itself.

 

Pls lend support to this idea so that it might get done!  Or let me know if I have been dumb and missed an easy way of doing this!

 

cheers,

 

Aus.

 

Link to comment
Share on other sites

Hello Ausman,

Season gratings and Happy holidays.

 

First of all, what PLC are you using -Vision, Jazz or M90/91-?

 

Can you please give more information on how you use the maximum and minimum value?

 

When you mention that the the linearization is only valid on a certain range -between a maximum and a minimum values- this means that outside this range the values are not linear? Or is still linear but you don't wish to take those values in account?

 

 

If as you mention the linearization is only valid on a certain range -between a maximum and a minimum values-, and you know both the X and Y value of this maximum and minimum, then this are the values you will use on the X1/Y1 and X2/Y2 values of the FB.

 

Remember that the linearization FB uses the line equation to determine the line between two point, you can take any two point inside the line to create the same equation.

 

You could also use the compare function "within range" before the linearization FB so it will only be active between the range you need it to work.

 

Best Regards,
Link to comment
Share on other sites

  • MVP 2023

Hi again, and thanks EduMarg,

 

I am well used to using Linearisation.  My PLCs are usually V130s on this sort of thing, but the problem is generic.  The easiest way of explaining better is a theoretical example using temperature:

 

From 22C to 24C I need to linearise an output to a variable speed motor over a partial amount of its span, say from 6 to 8ma.  Between 24-28C the output stays at 8ma.  From 28-36C the output again gets linearised from 8-13.5ma.  36-52C it stays at 13.5ma.  52-120C it gets linearised from 13.5ma to 20ma.

 

For this to happen I have to do multiple compares and stores related to each linearisation to make the output stay at the desired ma once the input goes through the range that needs the particular lin.

 

A different example is that even if you only have one lin, but don't want the output to vary when your input goes above or below certain levels, you still need 2 compares and stores as the output just proceeds along the path dictated by the lin parameters.

 

I hope this explains it better.  The linearisation function does not have max/min output settings, the output will continue to increase/decrease in the straight line derived from the lin settings. 

 

Cheers,

Aus

Link to comment
Share on other sites

  • MVP 2023

And to perhaps make it clearer again,

 

Write a new program that simply has a Linearisation.  Make X1 1000, Y1 1000, X2 2000, Y2 4000.  Run the program on the plc and manually vary your input. You will find that if you give it an input smaller than X1, or greater than X2, the output will run outside the Y1 & Y2 values.  eg.  Input 1500 and out comes 2500, which is within range.  Input 500 and you get -500, whilst input 3000 and you get 7000.  The output doesn't stop at the Y1 & Y2 values.  That is what I am wanting.  The ability to set a max and min value as part of the function.

 

And perhaps also have a look at my post: /topic/3540-linearization-calculator-for-all/.  My calc imitates the actual plc ops.

 

cheers,

Aus

Link to comment
Share on other sites

  • MVP 2023

Thanks EduMarg, that is great.

 

I also feel compelled to mention that another brand I work with has a linearisation function where you can specify multiple X Y relationships throughout the input range.  It maps out points derived from what would be a sequential set of MIs in Unitronics language.  These give the matching X & Ys for however many points you want to specify, to give you a varying relationship to the rising input.  So it is still straight line based and not really a "curve", but for my needs it is very handy and vastly easier than the existing Unitronics method.  ie one ladder entry as against a vast number of them!

 

The ladder entry would look something like  [LINZEXTENDED  --  Input  --  Curve Specs start location --  Specs length --  Output]

 

cheers,

Aus

Link to comment
Share on other sites

  • 1 year later...

Hello VisiLogic creators!

I see that this function is still not implemented in the program.

I have made a program that use several linearization blocks and for each one, I must use two compares and two store direct to prevent the output from getting false values when the input goes outside the X1-X2 range.

It would be great if you could implement an option so that the Y value only stay within the Y1-Y2 range, even if the X input is larger or smaller than the X1-X2 range.

Any plans of doing so in a future update?

Best regards

Peter

 image.png.51333c825ec11dc23ef59727cf68195d.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...