NI-DAQmx .NET Framework 4.0 API Reference

Content Type
Programming Language
Current manual
Table of Contents

TableScale Class

TableScale Class

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

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

  NameDescription
Public methodTableScale
Creates a new instance of the TableScale class with the specified scaled and prescaled values.
Top

Properties

  NameDescription
Public propertyDescription
Specifies a description for the scale.
(Inherited from Scale.)
Public propertyName
Gets the name of the scale.
(Inherited from Scale.)
Public propertyPreScaledUnits
Specifies the units of the values that you want to scale.
(Inherited from Scale.)
Public propertyPreScaledValues
Specifies an array of pre-scaled values. These values map directly to the values in ScaledValues.
Public propertyScaledUnits
Specifies the units to use for scaled values. You can use an arbitrary string.
(Inherited from Scale.)
Public propertyScaledValues
Specifies an array of scaled values. These values map directly to the values in PreScaledValues.
Public propertyType
Gets the type of scale.
(Inherited from Scale.)
Top

Methods

  NameDescription
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose
Releases all resources used by Scale.
(Inherited from Scale.)
Protected methodDispose(Boolean)
Releases the managed and unmanaged resources used by Scale or optionally releases only the unmanaged resources.
(Inherited from Scale.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodToString
Returns a string representation of the object.
(Inherited from Scale.)
Top

Remarks

Tip Tip
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.

See Also

Was this information helpful?