TableScale Class
- Updated2023-02-21
- 5 minute(s) read
TableScale Class
Encapsulates a custom scale that maps an array of prescaled values to an array of corresponding scaled values, with all other values scaled proportionally.
Inheritance Hierarchy
SystemObject
SystemMarshalByRefObject
NationalInstruments.DAQmxScale
NationalInstruments.DAQmxTableScale
SystemMarshalByRefObject
NationalInstruments.DAQmxScale
NationalInstruments.DAQmxTableScale
Namespace: NationalInstruments.DAQmx
Assembly: NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302
Syntax
public class TableScale : Scale
Public Class TableScale Inherits Scale
The TableScale type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | TableScale | Creates a new instance of the TableScale class with the specified scaled and prescaled values. |
Properties
Name | Description | |
---|---|---|
![]() | Description | Specifies a description for the scale. (Inherited from Scale.) |
![]() | Name | Gets the name of the scale. (Inherited from Scale.) |
![]() | PreScaledUnits | Specifies the units of the values that you want to scale. (Inherited from Scale.) |
![]() | PreScaledValues | Specifies an array of pre-scaled values. These values map directly to the values in ScaledValues. |
![]() | ScaledUnits | Specifies the units to use for scaled values. You can use an arbitrary string. (Inherited from Scale.) |
![]() | ScaledValues | Specifies an array of scaled values. These values map directly to the values in PreScaledValues. |
![]() | Type | Gets the type of scale. (Inherited from Scale.) |
Methods
Name | Description | |
---|---|---|
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() | Dispose | Releases all resources used by Scale. (Inherited from Scale.) |
![]() | Dispose(Boolean) |
Releases the managed and unmanaged resources used by Scale or optionally releases only the unmanaged resources.
(Inherited from Scale.) |
![]() | Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() | ToString | Returns a string representation of the object. (Inherited from Scale.) |
Remarks
![]() |
---|
Example applications are located in the Public Documents\National Instruments\NI-DAQ\Examples\DotNET4.x directory or in the Start menu at National InstrumentsNI-DAQmxNI-DAQmx Examples. |
Examples
The following example explains how to update the PreScaledValues property that returns an array:
Dim preScaledValues As Double() = New Double() {0.11, 0.12, 0.13} Dim scaledValues As Double() = New Double() {1.1, 1.2, 1.3} Dim tablescale As New TableScale("DAQmxTableScale", preScaledValues, scaledValues) ' To update the value at specific index in tablescale.PreScaledValues ' change the source array and assign it back to the property. preScaledValues(0) = 0.1 tablescale.PreScaledValues = preScaledValues
Examples
double[] preScaledValues = new double[] { .11, .12, .13 }; double[] scaledValues = new double[] { 1.1, 1.2, 1.3 }; TableScale tablescale = new TableScale("DAQmxTableScale", preScaledValues, scaledValues); // To update the value at specific index in tablescale.PreScaledValues // change the source array and assign it back to the property. preScaledValues[0] = 0.1; tablescale.PreScaledValues = preScaledValues;
Examples
The following example explains how to update the ScaledValues property that returns an array:
double[] preScaledValues = new double[] { .11, .12, .13 }; double[] scaledValues = new double[] { 1.1, 1.2, 1.3 }; TableScale tablescale = new TableScale("DAQmxTableScale", preScaledValues, scaledValues); // To update the value at specific index in tablescale.ScaledValues // change the source array and assign it back to the property. scaledValues[0] = 1.12; tablescale.ScaledValues = scaledValues;
Dim preScaledValues As Double() = New Double() {0.11, 0.12, 0.13} Dim scaledValues As Double() = New Double() {1.1, 1.2, 1.3} Dim tablescale As New TableScale("DAQmxTableScale", preScaledValues, scaledValues) ' To update the value at specific index in tablescale.ScaledValues ' change the source array and assign it back to the property. scaledValues(0) = 1.12 tablescale.ScaledValues = scaledValues
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.