Set the scale transformation information.
Ret = LoggerSetScaleConversion ( AppId , SequenceNo , ScaleEnable , MinData , MaxData , MinScale , MaxScale )
AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ]
Specify Application ID retrieved by LoggerOpenApplication.
SequenceNo [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ]
Specify SequenceNo used for analog input.
The configurable range
is from 0 to "SequenceNum -1".
"SequenceNum" is specified by LoggerSetChannelSetting
function.
ScaleEnable [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ]
Specify whether scale conversion is enabled or disabled.
Value [Dec] |
Macro |
Description |
0 |
LOGGER_PARAM_STARTTRIGGER |
Start Trigger |
1 |
LOGGER_PARAM_STOPTRIGGER |
Stop Trigger |
MinData [ VB.NET: Single ] [ C++: float ] [ C#: float ]
Specify the value of RawData0.
MaxData [ VB.NET: Single ] [ C++: float ] [ C#: float ]
Specify the value of RawData1.
MinScale [ VB.NET: Single ] [ C++: float ] [ C#: float ]
Specify the value of ScaleData0.
MaxScale [ VB.NET: Single ] [ C++: float ] [ C#: float ]
Specify the value of ScaleData1.
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. |
LOGGER_ERR_SCALE_ENABLE |
20012 |
Scale enable/disable value is out of the settable range. |
LOGGER_ERR_SCALE_DATA |
20013 |
The same value cannot be set for scale data 1 and 2. |
The others (See also: Error Code List)
Nothing in particular.
You can specify scaling
information for each channel.
Used to convert voltage values (or current value) to industrial units according
to the specifications of the connected sensor.
The total number of sequences can be obtained from the third argument(SequenceNum) of the LoggerGetChannelSetting function.
If ScaleEnable is disabled, the fourth and subsequent arguments are disabled.
Disables scale transformations for sequence 0.
VB.NET |
Dim Ret As Integer Ret = LoggerSetScaleConversion(AppId, 0, LOGGER_PARAM_DISABLE, 0.0, 10.0 , 0.0, 10.0)
|
C++ |
long Ret; Ret = LoggerSetScaleConversion(AppId, 0, LOGGER_PARAM_DISABLE, 0.0, 10.0, 0.0, 10.0);
|
C# |
int Ret; Ret = logger.SetScaleConversion(AppId, 0, LOGGER_PARAM_DISABLE, 0.0F, 10.0F, 0.0F,10.0F);
|
LoggerGetScaleConversion LoggerGetChannelSetting