OPC Studio User's Guide and Reference
LinearConverter Class
Members 



OpcLabs.BaseLibComponents Assembly > OpcLabs.BaseLib.Components Namespace : LinearConverter Class
Converts values using a linear function.
Syntax
'Declaration
 
<CLSCompliantAttribute(True)>
<ComVisibleAttribute(False)>
<TypeConverterAttribute(System.ComponentModel.ExpandableObjectConverter)>
<DesignerCategoryAttribute("Component")>
<SerializableAttribute()>
Public NotInheritable Class LinearConverter 
   Inherits OpcLabs.BaseLib.Widgets.Widget
   Implements OpcLabs.BaseLib.Data.IDataConverter, OpcLabs.BaseLib.IValueEquatable, OpcLabs.BaseLib.Licensing.ILicensingContextHolder, OpcLabs.BaseLib.Widgets.ComTypes._Widget, OpcLabs.BaseLib.Widgets.IWidget, System.ComponentModel.IComponent, System.ICloneable, System.IDisposable, System.IServiceProvider, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable 
'Usage
 
Dim instance As LinearConverter
[CLSCompliant(true)]
[ComVisible(false)]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[DesignerCategory("Component")]
[Serializable()]
public sealed class LinearConverter : OpcLabs.BaseLib.Widgets.Widget, OpcLabs.BaseLib.Data.IDataConverter, OpcLabs.BaseLib.IValueEquatable, OpcLabs.BaseLib.Licensing.ILicensingContextHolder, OpcLabs.BaseLib.Widgets.ComTypes._Widget, OpcLabs.BaseLib.Widgets.IWidget, System.ComponentModel.IComponent, System.ICloneable, System.IDisposable, System.IServiceProvider, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
[CLSCompliant(true)]
[ComVisible(false)]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[DesignerCategory("Component")]
[Serializable()]
public ref class LinearConverter sealed : public OpcLabs.BaseLib.Widgets.Widget, OpcLabs.BaseLib.Data.IDataConverter, OpcLabs.BaseLib.IValueEquatable, OpcLabs.BaseLib.Licensing.ILicensingContextHolder, OpcLabs.BaseLib.Widgets.ComTypes._Widget, OpcLabs.BaseLib.Widgets.IWidget, System.ComponentModel.IComponent, System.ICloneable, System.IDisposable, System.IServiceProvider, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
Remarks

The LinearConverter component provide a linear conversion and its inverse, and also (optionally) allows output value clamping. The linear conversion is useful for proper scaling of values when the underlying value source does not directly have the desired value.

You configure the parameters of the linear conversion so that the X1 value converts to Y1, and the X2 value converts to Y2. Other values are interpolated or extrapolated according to these settings.

For values that fall outside the given limits, you can choose one of the following behaviors:

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         OpcLabs.BaseLib.Widgets.Widget
            OpcLabs.BaseLib.Components.LinearConverter

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also