lLoggerGetScaleConversion


Function

Gets scale transformation information.

Format

Ret = LoggerGetScaleConversion ( AppId , SequenceNo , ScaleEnable , MinData , MaxData , MinScale , MaxScale )

Parameters

AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ] 

Specify Application ID retrieved by LoggerOpenApplication.

SequenceNo [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ]

Specify Sequence No used for analog input.

The configurable range depends on the device.
For more information, see "The specification for each device" item in Supported Devices topic.

ScaleEnable [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ]

Specify the address for storing whether scale conversion is enabled or disabled.

MinData [ VB.NET: Single ] [ C++: float * ] [ C#: out float ]

Specify the address to store the value of RawData0.

MaxData [ VB.NET: Single ] [ C++: float * ] [ C#: out float ]

Specify the address to store the value of RawData1.

MinScale [ VB.NET: Single ] [ C++: float * ] [ C#: out float ]

Specify the address to store the value of ScaleData0.

MaxScale [ VB.NET: Single ] [ C++: float * ] [ C#: out float ]

Specify the address to store the value of ScaleData1.

Return Value

Ret [ VB.NET: Integer ] [ C++: long ] [ C#: int ]

Definition

Return code

[Dec]

Description

LOGGER_ERR_SUCCESS

0

Normal completed

LOGGER_ERR_INVALID_ID

10010

Invalid AppId was specified.

LOGGER_ERR_SEQUENCE_NO

20006

The sequence number is out of the configurable range.

The others (See also: Error Code List)

Initial Value

Nothing in particular.

Remarks

Gets the scale transformation information for each channel.

The total number of sequences can be obtained from the third(3) argument(SequenceNum) of the LoggerGetChannelSetting function.

If ScaleEnable is disabled, the fourth(4) and subsequent arguments are disabled.

Example

Gets the scale transformation information for sequence 0.

VB.NET

Dim Ret As Integer
Dim ScaleEnable As UShort
Dim MinData As Single
Dim MaxData As Single
Dim MinScale As Single
Dim MaxSCale As Single

Ret = LoggerGetScaleConversion(AppId, 0, ScaleEnable, MinData, MaxData, MinScale, MaxScale)

 

C++

long Ret;
unsigned short ScaleEnable;
float MinData;
float MaxData;
float MinScale;
float MaxSCale;

Ret = LoggerGetScaleConversion(AppId, 0, &ScaleEnable, &MinData, &MaxData, &MinScale, &MaxScale);

 

C#

int Ret;
ushort ScaleEnable;
float MinData;
float MaxData;
float MinScale;
float MaxSCale;

Ret = logger.GetScaleConversion(AppId, 0, out ScaleEnable, out MinData, out MaxData, out MinScale, out MaxScale);

 

See Also

LoggerSetScaleConversion LoggerGetChannelSetting