Escolar Documentos
Profissional Documentos
Cultura Documentos
M L X 9 0 2 5 1 P RO D U C T
SPECIFIC FUNCTIONS
S OFTWARE L IBRARY
1 Contents
1 CONTENTS..........................................................................................................................................................2
2 INTRODUCTION................................................................................................................................................5
2 Introduction
MLX90251 PSF is MS Windows software library, which meets the requirements for a Product Specific
Functions (PSF) module, defined in Melexis Programmable Toolbox (MPT) object model. The library
implements in-process COM objects for interaction with MLX90251 firmware for Melexis PTC04
programmers. It is designed primarily to be used by MPT Framework application, but also can be loaded as a
standalone in-process COM server by other applications that need to communicate with the above-mentioned
Melexis products.
3 Software Structure
Solver MLX90251Solver
Advanced MLX90251Advanced
PTC04 PTC04PSFDevice
IMLX90251PSFDevice IMPTDevice
IPSFManager
IDispatch
IDispatch ISupportErrorInfo
MLX90251PSF MLX90251PSF
Manager Device ISpecifyPropertyPages
ISupportErrorInfo IPersist
IMLX90251Solver IMLX90251Advanced
MLX90251 ISupportErrorInfo MLX90251 ISupportErrorInfo
Solver Advanced
IDispatch IDispatch
IPTC04PSFDevice IMPTDevice
IDispatch
ISupportErrorInfo
PTC04PSF
Device ISpecifyPropertyPages
IPersist
4 MLX90251PSFManager Object
4.1 Background
This object is created only once and is destroyed when the library is unmapped from process address space.
Each subsequent request for this object returns the same instance.
MLX90251PSFManager object implements standard MPT category CATID_MLXMPTPSFSerialModule,
which is required for automatic device scanning. C++ standalone client applications can create an instance of
this object by using the standard COM API CoCreateInstance with class ID
CLSID_MLX90251PSFManager, or ProgID “MPT. MLX90251PSFManager”:
hRes = ::CoCreateInstance(CLSID_MLX90251PSFManager, NULL, CLSCTX_INPROC,
IID_IPSFManager, (void**) &pPSFMan);
Visual Basic applications should call CreateObject function to instantiate MLX90251PSFManager:
Set PSFMan = CreateObject(“MPT. MLX90251PSFManager”)
The primary objective of this instantiation is to call ScanStandalone method. C++:
hRes = pPSFMan->ScanStandalone(dtSerial, varDevices, &pDevArray);
Or in Visual Basic:
Set DevArray = PSFMan.ScanStandalone(dtSerial)
Refer to MPT Developer Reference for more information about ScanStandalone method.
5 MLX90251PSFDevice Object
5.1 Background
This object implements standard MPT category CATID_MLXMPTPSFSerialDevice as well as library
specific CATID_MLXMPT90251Device category. It also declares required specific category
CATID_MLXMPT90251UIModule for identification of required user interface modules.
Because of the fact that the hardware and the firmware are designed for both MLX90251 and MLX90277 the
device object can also represents either of them. Some of the methods of the object behave the same way for
both devices while others don’t. That’s why there is a property, named UseDoubleDies, which specifies the
type of the device. It’s obligatory to set the proper value to this property before any other method call.
Besides, there is a property, named ChipVersion, which specifies particular version of the sensor – for
example CC or FA. For more information see the documentation of the mentioned properties.
Although this object can be created directly, the preferred way to get an instance is to perform device
scanning procedure by calling ScanStandalone method of MLX90251PSFManager object and extract a
reference to a device object from the returned object collection. The following Visual Basic subroutine shows
the preferred way to instantiate an MLX90251PSFDevice object:
Sub CreateDevice()
Dim PSFMan As MLX90251PSFManager, DevicesCol As ObjectCollection, I As Long
On Error GoTo lError
‘ States that we’ll work with MLX90251 device; setting this value to True configures the PSF for work with
MLX90277
Dev.UseDoubleDies = False
Exit Sub
lError:
MsgBox Err.Description
Err.Clear
End Sub
Developers can also manually connect the device object to a serial channel object thus bypassing standard
device scanning procedure. The following Visual Basic subroutine allows manual connection along with
standard device scanning depending on input parameter bAutomatic:
Sub CreateDevice(bAutomatic As Boolean)
Dim PSFMan As MLX90251PSFManager, DevicesCol As ObjectCollection, I As Long
Dim CommMan As CommManager, Chan As MPTChannel
On Error GoTo lError
If bAutomatic Then
' Automatic device scanning begins here
‘ States that we’ll work with MLX90251 device; setting this value to True configures the PSF for work with
MLX90277
Dev.UseDoubleDies = False
lError:
MsgBox Err.Description
Err.Clear
End Sub
MLX90251PSFDevice object implements IMPTDevice standard MPT interface. Please refer to MPT
Developer reference document for description of the properties and methods of this interface.
In addition MLX90251PSFDevice object implements IMLX90251PSFDevice library specific interface,
which derives from IMPTDevice. The following is a description of its properties and methods.
Syntax
Visual Basic:
Property Advanced as Object
Read only
C++:
HRESULT get_Advanced(/*[out, retval]*/ IDispatch ** pValue);
Parameters
pValue
An address of IDispatch* pointer variable that receives the interface pointer to the Advanced object. If
the invocation succeeds, the caller is responsible for calling IUnknown::Release() on the pointer
when it is no longer needed.
Return value
Visual Basic:
A reference to the Advanced co-object.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains a valid
pointer.
Any other error code The operation failed. *pValue contains NULL.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Property ChipVersion as ChipVersionCodes
C++:
HRESULT get_ChipVersion(/*[out,retval]*/ ChipVersionCodes * pValue);
HRESULT set_ChipVersion(/*[in]*/ ChipVersionCodes Value);
Parameters
Value
A ChipVersionCodes constant specifying new value for the property.
pValue
An address of ChipVersionCodes variable that receives current value of the property.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Property CurrentDevice as Byte
C++:
HRESULT get_CurrentDevice(/*[out,retval]*/ unsigned char * pValue);
HRESULT set_CurrentDevice(/*[in]*/ unsigned char Value);
Parameters
Value
A Byte specifying new value for the property.
pValue
An address of Byte variable that receives current value of the property.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Property PTC04 as Object
Read only
C++:
HRESULT get_PTC04(/*[out, retval]*/ IDispatch ** pValue);
Parameters
pValue
Address of IDispatch* pointer variable that receives the interface pointer to the PTC04 device object.
If the invocation succeeds, the caller is responsible for calling IUnknown::Release() on the pointer
when it is no longer needed.
Return value
Visual Basic:
A reference to the PTC04 co-object.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid pointer.
Any other error code The operation failed. *pValue contains NULL.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.
Syntax
Visual Basic:
Property Solver as Object
Read only
C++:
HRESULT get_Solver(/*[out, retval]*/ IDispatch** pValue);
Parameters
pValue
Address of IDispatch* pointer variable that receives the interface pointer to the Solver object. If the
invocation succeeds, the caller is responsible for calling IUnknown::Release() on the pointer when it
is no longer needed.
Return value
Visual Basic:
A reference to the Solver co-object.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains a valid
pointer.
Any other error code The operation failed. *pValue contains NULL.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Property UseDoubleDies as Boolean
C++:
HRESULT get_UseDoubleDies (/*[out,retval]*/ VARIANT_BOOL * pValue);
HRESULT set_UseDoubleDies (/*[in]*/ VARIANT_BOOL Value);
Parameters
Value
A Boolean specifying new value for the property.
pValue
An address of Boolean variable that receives current value of the property.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub CopyRom2Ram ()
C++:
HRESULT CopyRom2Ram ();
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastProgramEEpromFull () As Long
C++:
HRESULT FastProgramEEpromFull (/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the programming. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device. This status is a combination of
SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MeasureByRam() As Single
C++:
HRESULT MeasureByRam(/*[out, retval]*/ float* pfValue);
Parameters
pfValue
An address of float variable that will receive the voltage of the hall sensor in % of the Vdd.
Return value
Visual Basic:
A Single containing the output voltage of the hall sensor in % of the Vdd.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains a valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MeasureByRom() As Single
C++:
HRESULT MeasureByRom(/*[out,retval]*/ float* pfValue);
Parameters
pfValue
An address of float variable that will receive the voltage of the hall sensor in % of the Vdd.
Return value
Visual Basic:
A Single containing the output voltage of the hall sensor in % of the Vdd.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains a valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function ProgramEEpromCustomArea () As Long
C++:
HRESULT ProgramEEpromCustomArea (/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the programming. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device. This status is a combination of
SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function ProgramEEpromMelexisArea () As Long
C++:
HRESULT ProgramEEpromMelexisArea (/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the programming. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device. This status is a combination of
SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function ProgramEEpromMemLock () As Long
C++:
HRESULT ProgramEEpromMemLock (/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the programming. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device. This status is a combination of
SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function ReadbackFullEeprom(lMode As Long) As Long
C++:
HRESULT ReadbackFullEeprom(/*[in]*/ long lMode, /*[out, retval]*/ long * plStatus );
Parameters
lMode
A Long value, which is one of ReadBackModes constants, specifying the mode of the reading.
Important note: Currently only reading by IDD (rbmIdd) is implemented.
plStatus
Address of long variable that receives the status of the device after the reading. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the reading. This status is a combination of
SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SetRelaisVDD(Value As Boolean)
C++:
HRESULT SetRelaisVDD(/*[in]*/ VARIANT_BOOL Value );
Parameters
Value
A Boolean value specifying the requested status of the relays: True – ON, False – OFF.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SetRelaisVOUT(Value As Boolean)
C++:
HRESULT SetRelaisVOUT(/*[in]*/ VARIANT_BOOL Value );
Parameters
Value
A Boolean value showing the requested status of the relays: True – ON, False – OFF.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Note: To fill the EEPROM register of the DLL with the correct latest programmed data you need to
call ReadBackFullEEprom before you call VerifyRomWithRAM.
Do not perform a CopyRom2Ram before you call VerifyRomWithRAM.
Syntax
Visual Basic:
Function VerifyRomWithRam() As Long
C++:
HRESULT VerifyRomWithRam(/*[out, retval]*/ long * plFailedPos );
Parameters
plFailedPos
An address of long variable that receives the first failed address. In case of identity of the RAM and
ROM the value is -1.
Return value
Visual Basic:
A Long value containing the first failed address. In case of identity of the RAM and ROM the
method returns -1.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plFailedPos contains valid
data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
6 MLX90251Solver Object
6.1 Background
This object cannot be created directly; it is only accessible as Solver property of MLX90251PSFDevice
object.
MLX90251Solver object implements IMLX90251Solver library specific interface. The following is a
description of its methods.
6.2 Scope
This object provides services to easily tune your product in your application.
When these functions are not fully serving your needs, you can check with your application contact into
Melexis how to get support.
There are three different solver sequences, which refer to different methods of the Solver object. Next three
topics describe general functions of the solvers, followed by a description of each kind of calibration
sequences.
Syntax
Visual Basic:
Property Status As Long
Read-only
C++:
HRESULT get_Status(/*[out, retval]*/ long * pValue );
Parameters
pValue
An address of long variable that receives current value of the property. It is a combination of
SolverStatusCodes constants and indicates which functions are allowed to be executed.
Return value
Visual Basic:
A Long variable containing current status of the Solver object. It is a combination of
SolverStatusCodes constants and indicates which functions are allowed to be executed.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function TCSelector(lTarget As Long) As Long
C++:
HRESULT TCSelector(/*[in]*/ long lTarget, /*[out, retval]*/ long * plResult);
Parameters
lTarget
A Long value specifying target temperature compensation (ppm/C).
plResult
An address of long variable that receives the real temperature compensation of the device (ppm/C).
Return value
Visual Basic:
A Long value containing real temperature compensation of the device (ppm/C).
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plResult contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetTC() As Single
C++:
HRESULT GetTC(/*[out, retval]*/ float * pfValue);
Parameters
pfValue
An address of float variable that receives the real temperature compensation of the device (ppm/C).
Return value
Visual Basic:
A Single value containing real temperature compensation of the device (ppm/C).
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pfValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
5
4.5
V2
4
3.5
Output (V)
3
2.5
2
1.5
V1
1
0.5
0
-40 -20 0 20 40 60 80 100
P1 Field
P2
In the main flowchart, an overview is given of the major function performed in each step.
Solverstep1
Function Basic Functions
int SolverStep1(void); int ReadBackFullEeprom (int Mode);
void Copy_Rom2Ram (void);
int TCSelector (int Target);
↓
Function “void SetParameter(int device, int name, float value);” to set the customer ID or the MODE.
Allowed Actions:
Optional: He may perform a Program EEPROM but it is not needed.
↓
Solverstep2
Function Basic Functions
int SolverStep2(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float value);” OR
void Copy_Rom2Ram (void);
↓
Solverstep3
Function Basic Functions
int SolverStep3(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float value);” OR
void Copy_Rom2Ram (void);
↓
Solverstep4
Function Basic Functions
int SolverStep4(void); None
↓
Allowed Actions: Function “void SetParameter(int device, int name, float value);” to set the customer ID or the MODE.
Use the function void Copy_Rom2Ram (void); OR “void SetParameter(int device, int name, float value);” to set
NOT allowed Actions:
the parameters that have been trimmed by the solver (OFFSET, Clamp Low / High, RG, RG, ...)
↓
Solverstep5
Function Basic Functions
int SolverStep5(void); Int Program_EEprom_Melexis_Area(void);
OR int Fast_Program_EEprom_Full(void);
Int Program_EEprom_Custom_Area(void);
int ReadBackFullEeprom (int Mode);
int Verify_Rom_with_Ram(void);
↓
MLX90251 PSF Library Object Model Page 30 of 92 25 August 2009
PTC04 - PSF - MLX90251
Product Specific Function description
Allowed Actions: Perform additional measurements to verify the programmed device functionality.
Use the function void Copy_Rom2Ram (void); OR “void SetParameter(int device, int name, float value);” to set
NOT allowed Actions:
the parameters of the device because we only program the MemLock and Parity of the device in step 6.
↓
Solverstep6
Function Basic Functions
int SolverStep6(void); void SetParameter(int device, int name, float value);
Program_EEprom_MemLock
The table below lists the time needed for each solver step. The Solver step time is valid for the default
settings (Tpor, Tprog ...) of the 90251 PSF but with a measure delay of 5000 uSec instead of 8000 uSec.
Note: The number of measurements performed by the solver in step 2, 3, 4 is not fixed. If needed, extra
measurements are performed in these steps by the solver. Therefore the timings are not constant. The
solver step time can vary with 20 to 100mSec.
Syntax
Visual Basic:
Function SolverStep1() As Long
C++:
HRESULT SolverStep1(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function SolverStep2() As Long
C++:
HRESULT SolverStep2(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function SolverStep3() As Long
C++:
HRESULT SolverStep3(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function SolverStep4() As Long
C++:
HRESULT SolverStep4(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function SolverStep5() As Long
C++:
HRESULT SolverStep5(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function SolverStep6() As Long
C++:
HRESULT SolverStep6(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Fundamentals
Importance of the Field
In theory, the field is not important. We are only interested to get a value Y on Position X.
The Solver will not use fields but positions.
What means a position
When we talk about a standard two point solver, Position =0 for Position 1 and =1 for Position 2.
However, when we talk about three points, we need to describe the mechanical (physical) relation between
the three points and this is done with Position. Position has no unit! It’s relative. It only explains how the
distance P1-P2 is in relation with the distance P1-P3. This mean of you might fill in for P1, 2, 3 = [2.5, 1, 4]
and it is the same as [50, 0, 100] or [45deg, 0deg, 90deg], they all mean the same.
Also [0, -100, 100] is the same. It depends of the interpretation of the user. A check is performed in order to
be sure that P1 is not equal to P2 or P3.
Converting the measurements to a line
Due the fact our device is pure linear (offset and gain), we have to convert all our measured points to a line.
The three points are put in a linear regression. The regression comes up with a converted line. This line can be
used as input for the solver.
Fast_Solverstep1
Function Basic Functions
int Fast_SolverStep1(void); int ReadBackFullEeprom (int Mode);
void Copy_Rom2Ram (void);
int TCSelector (int Target);
↓
Function “void SetParameter(int device, int name, float value);” to set the customer ID or the MODE.
Allowed Actions:
Optional: He may perform a Program EEPROM but it is not needed.
↓
Fast_Solverstep2
Function Basic Functions
int Fast_SolverStep2(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float value);”
OR void Copy_Rom2Ram (void);
↓
Fast_Solverstep3
Function Basic Functions
int Fast_SolverStep3(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float value);”
OR void Copy_Rom2Ram (void);
↓
Fast_Solverstep4
Function Basic Functions
int Fast_SolverStep4(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float value);”
OR void Copy_Rom2Ram (void);
↓
Fast_Solverstep5
Function Basic Functions
int Fast_SolverStep5(void); None
↓
Fast_Solverstep6
Function Basic Functions
int Fast_SolverStep6(void); None
↓
Allowed Actions: Function “void SetParameter(int device, int name, float value);” to set the customer ID or the MODE.
Use the function void Copy_Rom2Ram (void); OR “void SetParameter(int device, int name, float value);”
NOT allowed Actions:
to set the parameters that have been trimmed by the solver (OFFSET, Clamp Low / High, RG, RG, ...)
↓
Fast_Solverstep7
Function Basic Functions
int Fast_SolverStep7(void); Int Program_EEprom_Melexis_Area(void);
OR int Fast_Program_EEprom_Full(void);
Int Program_EEprom_Custom_Area(void);
int ReadBackFullEeprom (int Mode);
int Verify_Rom_with_Ram(void);
↓
Allowed Actions: Perform additional measurements to verify the programmed device functionality.
Use the function void Copy_Rom2Ram (void); OR “void SetParameter(int device, int name, float value);”
NOT allowed Actions:
to set the parameters of the device because we only program the MemLock and Parity of the device in step 6.
↓
Fast_Solverstep8
Function Basic Functions
int Fast_SolverStep8(void); void SetParameter(int device, int name, float value);
Program_EEprom_MemLock
Syntax
Visual Basic:
Function FastSolverStep1() As Long
C++:
HRESULT FastSolverStep1 (/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastSolverStep2(bSkipPos2 As Boolean) As Long
C++:
HRESULT FastSolverStep2 (/*[in]*/ VARIANT_BOOL bSkipPos2, /*[out, retval]*/ long *
plStatus);
Parameters
bSkipPos2
Must be True for 2 point solving procedure or False for 3 point solving procedure.
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastSolverStep3() As Long
C++:
HRESULT FastSolverStep3(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastSolverStep4(lCriticalPos As Long, bSkipPos2 As Boolean) As Long
C++:
HRESULT FastSolverStep4(/*[in]*/ long lCriticalPos, /*[in]*/ VARIANT_BOOL bSkipPos2,
/*[out, retval]*/ long * plStatus);
Parameters
lCriticalPos
Specifies which position (0 for the first, 1 for the second or 2 for the third) should be most accurate. It
is possible to give a negative number (for example -1) to get a characteristic without critical position.
bSkipPos2
Must be True for 2 point solving procedure or False for 3 point solving procedure.
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastSolverStep5() As Long
C++:
HRESULT FastSolverStep5(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastSolverStep6(lCriticalPos As Long, bSkipPos2 As Boolean) As Long
C++:
HRESULT FastSolverStep6(/*[in]*/ long lCriticalPos, /*[in]*/ VARIANT_BOOL bSkipPos2,
/*[out, retval]*/ long * plStatus);
Parameters
lCriticalPos
Specifies which position (0 for the first, 1 for the second or 2 for the third) should be most accurate. It
is possible to give a negative number (for example -1) to get a characteristic without critical position.
bSkipPos2
Must be True for 2 point solving procedure or False for 3 point solving procedure.
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastSolverStep7() As Long
C++:
HRESULT FastSolverStep7(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function FastSolverStep8() As Long
C++:
HRESULT FastSolverStep8(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
V2 4.5 150
4
100
3.5
3 50
Output (V)
2.5
Field
0
2
1.5 -50
1
-100
V1 0.5
0 -150
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
Time
P1 Output Field P2
The Min/Max solver can be used for applications with a, for example, rotating field (sine wave), gear (block wave)...
For the Min/Max solver, Position 1 and 2 do not necessarily represent the minimum and maximum field. For
example: The graph above represents a rotating field. During the solving routines, the application is moved from P1
to P2. During that move the solver searches for the min and max output voltage, V1 and V2 (min and max field).
2.5
2
1.5
1
0.5
V1
0
-150
-100
-50
50
100
150
Field
Note: The MIN MAX solver is not optimal designed for multiple devices but it is possible. During the move the
solver searches for the min and max output voltage. The “Start Move” starts the sampling of the output. The
sampling continues until the “Stop Move” is performed. Therefore the start and stop of one move always have to be
performed in a pair. This is important when working with multiple devices. One move has to be performed for each
device.
↓
Function “void SetParameter(int device, int name, float value);” to set the customer ID or the MODE.
Allowed Actions:
Optional: He may perform a Program EEPROM but it is not needed.
↓
Min Max Solverstep2
Function Basic Functions
int MM_SolverStep2(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float
value);” OR void Copy_Rom2Ram (void);
↓
Min Max Solverstep2b
Function Basic Functions
int MM_SolverStep2b(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float
value);” OR void Copy_Rom2Ram (void);
↓
Min Max Solverstep3
Function Basic Functions
int MM_SolverStep3(void); None
↓
Any modification of the RAM / ROM.
NOT allowed Actions:
Modify the RAM parameters by using functions like “void SetParameter(int device, int name, float
value);” OR void Copy_Rom2Ram (void);
↓
Min Max Solverstep4
Function Basic Functions
int MM_SolverStep4(void); None
↓
Allowed Actions: Function “void SetParameter(int device, int name, float value);” to set the customer ID or the MODE.
Use the function void Copy_Rom2Ram (void); OR “void SetParameter(int device, int name, float
NOT allowed Actions: value);” to set the parameters that have been trimmed by the solver (OFFSET, Clamp Low / High, RG,
RG, ...)
↓
Min Max Solverstep5
Function Basic Functions
int MM_SolverStep5(void); Int Program_EEprom_Melexis_Area(void);
OR int Fast_Program_EEprom_Full(void);
Int Program_EEprom_Custom_Area(void);
int ReadBackFullEeprom (int Mode);
int Verify_Rom_with_Ram(void);
↓
Allowed Actions: Perform additional measurements to verify the programmed device functionality.
Use the function void Copy_Rom2Ram (void); OR “void SetParameter(int device, int name, float
NOT allowed Actions: value);” to set the parameters of the device because we only program the MemLock and Parity of the
device in step 6.
↓
Min Max Solverstep6
Function Basic Functions
int MM_SolverStep6(void); void SetParameter(int device, int name, float value);
Program_EEprom_MemLock
Syntax
Visual Basic:
Function MinMaxSolverStep1() As Long
C++:
HRESULT MinMaxSolverStep1(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MinMaxSolverStep2() As Long
C++:
HRESULT MinMaxSolverStep2(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MinMaxSolverStep2b() As Long
C++:
HRESULT MinMaxSolverStep2b(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
During a move the PTC04 starts a continuing measurement for his search for the Min and Max output voltage.
This continuing measurement has a number of settings that one can change to fit the needs of the application.
• Nr_of_Samples_MM_Solver: default = 60000 Measuring frequency of the MIN / MAX solver with
samples. default settings
These are the number of measurements Measure Filter PTC04 Frequency (Hz)
performed during one move. 1 188.7
• Filter Vout: default = 100 sample. 2 185.2
These are the number of samples taken for one 10 175.4
measurement of the move. 20 163.9
64 125
• Sample Delay: default = 5 us.
100 106.4 Standard filter setting
Delay between to samples taken for one 200 73.53
measurement. 300 56.18
• Measure Delay: default = 5000 us. 400 45.87
This delay is the time the PTC04 waits before Measure Delay = 5000us
he starts the measurement. Sample Delay = 5us
Sampling frequency = 24390Hz
The tables on the left list the measuring frequency
solver vs. the measure filters of the MIN / MAX Measuring frequency of the MIN / MAX solver with
minimum settings
Measure Filter PTC04 Frequency (Hz)
1 3333
2 2632
10 1429
20 935
64 362
100 242 Standard filter setting
200 125
300 84.75
400 63.94
Measure Delay = 1us
Sample Delay = 1us
Sampling frequency = 26320Hz
Syntax
Visual Basic:
Function MinMaxSolverStep3() As Long
C++:
HRESULT MinMaxSolverStep3(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MinMaxSolverStep4() As Long
C++:
HRESULT MinMaxSolverStep4(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MinMaxSolverStep5() As Long
C++:
HRESULT MinMaxSolverStep5(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MinMaxSolverStep6() As Long
C++:
HRESULT MinMaxSolverStep6(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
The MIN MAX solver sequence with external measurements allows the user to create a solver sequence for
alternating fields with a higher frequency. The measurements are done with external equipment of the user. The
values are passed to the solver with an input function.
STEP 3: In step 3 the gain and offset codes are modified to fit
the targets and loaded in the device.
Stop move
MM_Solverstep2b
Switch to internal supply (Optional)
Start_2nd_move_Calculations
MM_Solverstep3 Switch to external supply (Optional)
Start_2nd_move_Measurements
Stop move
MM_Solverstep4 Clamping
Switch to internal supply (Optional)
Program EEPROM
MM_Solverstep5 Read Back
Verify
Syntax
Visual Basic:
Sub MeasureVDDSolver()
C++:
HRESULT MeasureVDDSolver();
Parameters
None
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub OverwriteVDDSolver()
C++:
HRESULT OverwriteVDDSolver();
Parameters
None
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function StartInitialMoveCalculations() As Long
C++:
HRESULT StartInitialMoveCalculations(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function StartInitialMoveMeasurements() As Long
C++:
HRESULT StartInitialMoveMeasurements(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function StopMove() As Long
C++:
HRESULT StopMove(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function Start2ndMoveCalculations() As Long
C++:
HRESULT Start2ndMoveCalculations(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function Start2ndMoveMeasurements() As Long
C++:
HRESULT Start2ndMoveMeasurements(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function Clamping() As Long
C++:
HRESULT Clamping(/*[out, retval]*/ long * plStatus);
Parameters
plStatus
Address of long variable that receives the status of the device after the execution. This status is a
combination of SolverResultCodes constants.
Return value
Visual Basic:
A Long value containing the status of the device after the execution. This status is a combination
of SolverResultCodes constants.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub Input_Meas_MMSolver(fVmax as Single, fVmin as Single)
C++:
HRESULT Input_Meas_MMSolver(/*[in]*/float fVmax, /*[in]*/float fVmin);
Parameters
fVmax
A Single value containing the maximum voltage value of the output.
fVmin
A Single value containing the minimum voltage value of the output.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plStatus contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Available in: Version 1.26 or higher.
7 MLX90251Advanced Object
7.1 Background
This object cannot be created directly; it is only accessible as “Advanced” property of MLX90251PSFDevice
object.
MLX90251Advanced object implements IMLX90251Advanced library specific interface. The following is a
description of its methods.
Syntax
Visual Basic:
Sub FastProgram(StartAddr As Byte, StopAddr As Byte, varBitInfo, Format As Long)
C++:
HRESULT FastProgram(/*[in]*/ unsigned_char StartAddr, /*[in]*/ unsigned_char
StopAddr, /*[in]*/ VARIANT varBitInfo, /*[in]*/ long Format );
Parameters
StartAddr
A Byte value specifying the starter address + 32.
StopAddr
A Byte value specifying the stop address + 32.
varBitInfo
A VARIANT containing the data to be written.
Format
A Long specifying the format of the data in varBitInfo. Possible values are:
Value Format
1 varBitInfo is an array of bytes in the following format:
D7 D6 D5 D4 D3 D2 D1 D0
1 0 Voted N ID N Voted N+1 ID N+1 Voted N+2 ID N+2
2 varBitInfo is an ANSI string packed in bstrVal member. This is the preferred format
for C++ applications because of the best performance. It is a binary data so the string
can contain zeroes and may not be zero terminated.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub FastProgram90277(StartAddr As Byte, StopAddr As Byte, varBitInfo, Format As Long)
C++:
HRESULT FastProgram90277(/*[in]*/ unsigned_char StartAddr, /*[in]*/ unsigned_char
StopAddr, /*[in]*/ VARIANT varBitInfo, /*[in]*/ long Format );
Parameters
StartAddr
A Byte value specifying the starter address + 32.
StopAddr
A Byte value specifying the stop address + 32.
varBitInfo
A VARIANT containing the data to be written.
Format
A Long specifying the format of the data in varBitInfo. Possible values are:
Value Format
1 varBitInfo is an array of bytes in the following format:
Bit info 0 Bit info 1 ... Bit info N Bit info 0 Bit info 1 ... Bit info N
D7 D6 D5 D4 D3 D2 D1 D0
1 0 Voted N ID N Voted N+1 ID N+1 Voted N+2 ID N+2
2 varBitInfo is an ANSI string packed in bstrVal member. This is the preferred format
for C++ applications because of the best performance. It is a binary data so the string
can contain zeroes and may not be zero terminated.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetIdd() As Single
C++:
HRESULT GetIdd(/*[out, retval]*/ float * pfValue);
Parameters
pfValue
An address of float variable that receives IDD value (A).
Return value
Visual Basic:
A Single value containing IDD current (A).
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pfValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetMlxID() As Long
C++:
HRESULT GetMlxID(/*[out, retval]*/ long * plValue);
Parameters
plValue
An address of long variable that receives Melexis ID of the sensor.
Return value
Visual Basic:
A Long value containing Melexis ID of the sensor.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetParameter(Index, FromRom As Boolean) As Long
C++:
HRESULT GetParameter(/*[in]*/ VARIANT Index, /*[in, defaultvalue(0)]*/
VARIANT_BOOL FromRom, /*[out, retval]*/ long * plValue );
Parameters
Index
A VARIANT specifying the code of the parameter. It must contain a constant from ParameterCodes.
FromRom
A Boolean that must be True to get the data from ROM or False to get the data from RAM.
plValue
An address of long variable that receives the value of the parameter.
Return value
Visual Basic:
A Long value containing the data of the parameter.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *plValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetSetting(Code As SettingCodes)
C++:
HRESULT GetSetting(/*[in]*/ SettingCodes Code, /*[out, retval]*/ VARIANT * pValue );
Parameters
Code
A SettingCodes constant specifying requested setting.
pValue
An address of VARIANT variable that receives the setting’s value. The caller is responsible to call
VariantClear on that variable when it is no longer needed.
Return value
Visual Basic:
A VARIANT containing requested setting’s value.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid data.
Any other error code The operation failed. *pValue is Empty.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetSolverParameter(Index As SolverParamCodes)
C++:
HRESULT GetSolverParameter (/*[in]*/ SolverParamCodes Index, /*[out, retval]*/
VARIANT * pValue );
Parameters
Index
A SolverParamCodes constant specifying requested Solver parameter.
pValue
An address of VARIANT variable that receives Solver parameter’s value. The caller is responsible to
call VariantClear on that variable when it is no longer needed.
Return value
Visual Basic:
A VARIANT containing requested Solver parameter’s value.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid data.
Any other error code The operation failed. *pValue is Empty.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetSolverSetting(Index As SolverSettingCodes)
C++:
HRESULT GetSolverSetting (/*[in]*/ SolverSettingCodes Index, /*[out, retval]*/ VARIANT
* pValue );
Parameters
Index
A SolverSettingCodes constant specifying requested Solver setting.
pValue
An address of VARIANT variable that receives Solver setting’s value. The caller is responsible to call
VariantClear on that variable when it is no longer needed.
Return value
Visual Basic:
A VARIANT containing requested Solver setting’s value.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pValue contains valid data.
Any other error code The operation failed. *pValue is Empty.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetVdd() As Single
C++:
HRESULT GetVdd(/*[out, retval]*/ float * pfValue);
Parameters
pfValue
An address of float variable that receives VDD voltage.
Return value
Visual Basic:
A Single containing VDD voltage.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pfValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function GetVout() As Single
C++:
HRESULT GetVout(/*[out, retval]*/ float * pfValue);
Parameters
pfValue
An address of float variable that receives Vout voltage.
Return value
Visual Basic:
A Single containing Vout voltage.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pfValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MakeMeasurement(INV As Integer, RG As Integer, FG As Integer, Offset As
Integer) As Single
C++:
HRESULT MakeMeasurement(/*[in]*/ short INV, /*[in]*/ short RG, /*[in]*/ short FG,
/*[in]*/ short Offset, /*[out, retval]*/ float * pfValue );
Parameters
INV
An Integer specifying if the slope is inverted (1) or not (0).
RG
An Integer specifying desired rough gain (4 bits).
FG
An Integer specifying desired fine gain (10 bits).
Offset
An Integer specifying Voq offset (10 bits).
pfValue
An address of float variable that receives the output voltage of the hall sensor in Volt.
Return value
Visual Basic:
A Single containing the output voltage of the hall sensor in Volt.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pfValue contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MeasureByRam(NPuls As Long, varPuls, Format As Long) As Single
C++:
HRESULT MeasureByRam(/*[in]*/ long NPuls, /*[in]*/ VARIANT varPuls, /*[in]*/ long
Format, /*[out, retval]*/ float * pfVout );
Parameters
NPuls
A Long specifying the number of pulses + 32. Typically this value is 167.
varPuls
A VARIANT containing the data to be sent.
Format
A Long specifying the format of the data in varPuls. Possible values are:
Value Format
1 varPuls is an array of bytes in the following format:
2 varPuls is an ANSI string packed in bstrVal member. This is the preferred format for
C++ applications because of the best performance. It is a binary data so the string
can contain zeroes and may not be zero terminated.
pfVout
An address of float variable that receives the output voltage of the hall sensor in Volt.
Return value
Visual Basic:
A Single containing the output voltage of the hall sensor in Volt.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pfVout contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub MeasureByRam90277(NPuls As Long, varPuls, Format As Long, ByRef pfVoutA As
Single, ByRef pfVoutB As Single)
C++:
HRESULT MeasureByRam90277(/*[in]*/ long NPuls, /*[in]*/ VARIANT varPuls, /*[in]*/
long Format, /*[out]*/ float * pfVoutA, /*[out]*/ float * pfVoutB );
Parameters
NPuls
A Long specifying the number of pulses + 32. Typically this value is 167.
varPuls
A VARIANT containing the data to be sent.
Format
A Long specifying the format of the data in varPuls. Possible values are:
Value Format
1 varPuls is an array of bytes in the following format:
Puls 7 bit Puls 7 bit ... Puls 7 bit Puls 7 bit Puls 7 bit ... Puls 7 bit
2 varPuls is an ANSI string packed in bstrVal member. This is the preferred format for
C++ applications because of the best performance. It is a binary data so the string
can contain zeroes and may not be zero terminated.
pfVoutA
An address of float (Single) variable that receives the output voltage of dieA of the hall sensor in Volt.
pfVoutB
An address of float (Single) variable that receives the output voltage of dieB of the hall sensor in Volt.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function MeasureByRamChB(NPuls As Long, varPuls, Format As Long) As Single
C++:
HRESULT MeasureByRamChB(/*[in]*/ long NPuls, /*[in]*/ VARIANT varPuls, /*[in]*/ long
Format, /*[out, retval]*/ float * pfVout );
Parameters
NPuls
A Long specifying the number of pulses + 32. Typically this value is 167.
varPuls
A VARIANT containing the data to be sent.
Format
A Long specifying the format of the data in varPuls. Possible values are:
Value Format
1 varPuls is an array of bytes in the following format:
2 varPuls is an ANSI string packed in bstrVal member. This is the preferred format for
C++ applications because of the best performance. It is a binary data so the string
can contain zeroes and may not be zero terminated.
pfVout
An address of float variable that receives the output voltage of dieB of the hall sensor in Volt.
Return value
Visual Basic:
A Single containing the output voltage of dieB of the hall sensor in Volt.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pfVout contains valid data.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub Program(NPuls As Long, varPuls, Format As Long)
C++:
HRESULT Program (/*[in]*/ long NPuls, /*[in]*/ VARIANT varPuls, /*[in]*/ long Format);
Parameters
NPuls
A Long specifying the number of pulses + 32.
varPuls
A VARIANT containing the data to be sent.
Format
A Long specifying the format of the data in varPuls. Possible values are:
Value Format
1 varPuls is an array of bytes in the following format:
2 varPuls is an ANSI string packed in bstrVal member. This is the preferred format for
C++ applications because of the best performance. It is a binary data so the string
can contain zeroes and may not be zero terminated.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Syntax
Visual Basic:
Sub Program90277(NPuls As Long, varPuls, Format As Long)
C++:
HRESULT Program 90277(/*[in]*/ long NPuls, /*[in]*/ VARIANT varPuls, /*[in]*/ long
Format);
Parameters
NPuls
A Long specifying the number of pulses + 32.
varPuls
A VARIANT containing the data to be sent.
Format
A Long specifying the format of the data in varPuls. Possible values are:
Value Format
1 varPuls is an array of bytes in the following format:
Puls 7 bit Puls 7 bit ... Puls 7 bit Puls 7 bit Puls 7 bit ... Puls 7 bit
2 varPuls is an ANSI string packed in bstrVal member. This is the preferred format for
C++ applications because of the best performance. It is a binary data so the string
can contain zeroes and may not be zero terminated.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function ReadBack(StartAddr As Byte, StopAddr As Byte, RBFilter As Long, Format As
Long)
C++:
HRESULT ReadBack(/*[in]*/ unsigned char StartAddr, /*[in]*/ unsigned char StopAddr,
/*[in]*/ long RBFilter, /*[in]*/ long Format, /*[out, retval]*/ VARIANT *
pvarEEData );
Parameters
StartAddr
A Byte specifying starter address. Typically it is 0.
StopAddr
A Byte specifying stop address. Typically it is 127.
RBFilter
A Long specifying ReadBack filter. Typically it is 10.
Format
A Long specifying the format of the returned data in pvarEEData. Possible values are:
Value Format
1 Return value is an array of bytes. This is the preferred format for Visual Basic
applications.
2 Return value is an ANSI string packed in bstrVal member of *pvarEEData. This is
the preferred format for C++ applications because of the best performance. It is a
binary data so the string can contain zeroes and may not be zero terminated. Callers
can get its real length by calling SysStringByteLen API on bstrVal member
pvarEEData
An address of VARIANT variable that receives the return value of the method. The caller is
responsible to call VariantClear on that variable when it is no longer needed.
Return value
Visual Basic:
A VARIANT containing the return value of the method.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pvarEEData contains valid
data.
Any other error code The operation failed. *pvarEEData is Empty.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function ReadBack90277(StartAddr As Byte, StopAddr As Byte, RBFilter As Long, Format
As Long)
C++:
HRESULT ReadBack90277(/*[in]*/ unsigned char StartAddr, /*[in]*/ unsigned char
StopAddr, /*[in]*/ long RBFilter, /*[in]*/ long Format, /*[out, retval]*/
VARIANT * pvarEEData );
Parameters
StartAddr
A Byte specifying starter address. Typically it is 0.
StopAddr
A Byte specifying stop address. Typically it is 127.
RBFilter
A Long specifying ReadBack filter. Typically it is 10.
Format
A Long specifying the format of the returned data in pvarEEData. Possible values are:
Value Format
1 Return value is an array of bytes. This is the preferred format for Visual Basic
applications.
2 Return value is an ANSI string packed in bstrVal member of *pvarEEData. This is
the preferred format for C++ applications because of the best performance. It is a
binary data so the string can contain zeroes and may not be zero terminated. Callers
can get its real length by calling SysStringByteLen API on bstrVal member
pvarEEData
An address of VARIANT variable that receives the return value of the method. In the beginning is all
the data of dieA and then all the data of dieB. The caller is responsible to call VariantClear on that
variable when it is no longer needed.
Return value
Visual Basic:
A VARIANT containing the return value of the method. In the beginning is all the data of dieA
and then all the data of dieB.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pvarEEData contains valid
data.
Any other error code The operation failed. *pvarEEData is Empty.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Function ReadBack90277FA(StartAddr As Byte, StopAddr As Byte, RBFilter As Long,
Format As Long)
C++:
HRESULT ReadBack90277FA(/*[in]*/ unsigned char StartAddr, /*[in]*/ unsigned char
StopAddr, /*[in]*/ long RBFilter, /*[in]*/ long Format, /*[out, retval]*/
VARIANT * pvarEEData );
Parameters
StartAddr
A Byte specifying starter address. Typically it is 0.
StopAddr
A Byte specifying stop address. Typically it is 127.
RBFilter
A Long specifying ReadBack filter. Typically it is 10.
Format
A Long specifying the format of the returned data in pvarEEData. Possible values are:
Value Format
1 Return value is an array of bytes. This is the preferred format for Visual Basic
applications.
2 Return value is an ANSI string packed in bstrVal member of *pvarEEData. This is
the preferred format for C++ applications because of the best performance. It is a
binary data so the string can contain zeroes and may not be zero terminated. Callers
can get its real length by calling SysStringByteLen API on bstrVal member
pvarEEData
An address of VARIANT variable that receives the return value of the method. In the beginning is all
the data of dieA and then all the data of dieB. The caller is responsible to call VariantClear on that
variable when it is no longer needed.
Return value
Visual Basic:
A VARIANT containing the return value of the method. In the beginning is all the data of dieA
and then all the data of dieB.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully. *pvarEEData contains valid
data.
Any other error code The operation failed. *pvarEEData is Empty.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub OpenProfile(Filename As String, lDevice As Long)
C++:
HRESULT OpenProfile(/*[in]*/ BSTR Filename, /*[in, defaultvalue(-1)]*/ long lDevice );
Parameters
Filename
A String value specifying the location and the name of INI file to be opened.
lDevice
A Long specifying the number of virtual device that gets Solver settings and Solver parameters from
INI file. If not specified or is -1 all virtual devices are reconfigured from INI.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SaveProfile(lDevice As Long)
C++:
HRESULT SaveProfile(/*[in, defaultvalue(-1)]*/ long lDevice );
Parameters
lDevice
A Long specifying the number of virtual device which Solver settings and Solver parameters will be
saved to INI file. If not specified or is -1 all virtual devices will be saved to INI.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SaveProfileAs(Filename As String, lDevice As Long)
C++:
HRESULT SaveProfileAs(/*[in]*/ BSTR Filename, /*[in, defaultvalue(-1)]*/ long lDevice );
Parameters
Filename
A String value specifying the location and the name of INI file to be written.
lDevice
A Long specifying the number of virtual device which Solver settings and Solver parameters will be
saved to INI file. If not specified or is -1 all virtual devices will be saved to INI.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
[SolverSettings]
0_TARGET_POS1=50
0_TARGET_POS2=90
0_TARGET_POS3=90
0_RELATIVE_POS1=0
0_RELATIVE_POS2=100
0_RELATIVE_POS3=100
0_TARGET_CLAMPHIGH=95
0_TARGET_CLAMPLOW=5
0_TARGET_TC=0
0_LastOffset=526
0_LastRG=12
0_LastFG=855
0_LastINV=1
0_LastRatio=0.5
0_MINRG=0
0_MAXRG=15
0_Tolerance=1
0_Critical_Tolerance=0.5
0_Disable_TCTable=0
0_Enable_AGND_Calculation=0
0_Disable_Clamping_Search_Solver=0
0_Enable_change_of_Filter=0
0_Filter_RAM_Solver=15
Syntax
Visual Basic:
Sub SetParameter(Index, Value As Long)
C++:
HRESULT SetParameter(/*[in]*/ VARIANT Index, /*[in]*/ long Value );
Parameters
Index
A VARIANT specifying the code of the parameter. It must contain a constant from ParameterCodes.
Value
A Long containing the new value of the parameter.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SetSetting(Code As SettingCodes, Value)
C++:
HRESULT SetSetting (/*[in]*/ SettingCodes Code, /*[in]*/ long Value );
Parameters
Code
A SettingCodes constant specifying the setting to be updated.
Value
A VARIANT containing the new value of the setting.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SetSolverParameter(Index As SolverParamCodes, varValue)
C++:
HRESULT SetSolverParameter (/*[in]*/ SolverParamCodes Index, /*[in]*/ VARIANT Value
);
Parameters
Index
A SolverParamCodes constant specifying the Solver parameter to be set.
Value
A VARIANT containing the new value for the Solver parameter.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SetSolverSetting(Index As SolverSettingCodes, varValue)
C++:
HRESULT SetSolverSetting (/*[in]*/ SolverSettingCodes Index, /*[in]*/ VARIANT Value );
Parameters
Index
A SolverSettingCodes constant specifying the Solver setting to be updated.
Value
A VARIANT containing the new value for the Solver setting.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Syntax
Visual Basic:
Sub SetVdd(fVdd As Single)
C++:
HRESULT SetVdd (/*[in]*/ float fVdd );
Parameters
fVdd
A Single (float) containing the voltage to be set in Volts.
Return value
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Value[V ] − Cte
T=
Gain
Cte can vary from device to device.
Syntax
Visual Basic:
Function TemperatureMeasVolt(pfValue As Single)
C++:
HRESULT TemperatureMeasVolt(float* pfValue/*[out,retval]*/) ;
Parameters
pfValue
Is an address of float variable that will receive the voltage of the temperature sensor in Volt.
Return value
Visual Basic:
Is a Single containing the output voltage of the temperature sensor in Volt.
C++:
The return value obtained from the returned HRESULT is one of the following:
Return value Meaning
S_OK The operation completed successfully.
Any other error code The operation failed.
Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.
Available in: Version 1.27 or higher.
8 Enumeration constants
Value
Bits
Constant Description
ParAGND 1 10
ParDrift 2 4
ParTCW2TC0 3 6 Signed
ParTCW3TC0 4 10 Signed
ParTCW4TC15 5 6 Signed
ParTCW4TC31 6 6 Signed
ParTCW5TC31 7 6 Signed
ParTC 8 5
ParTCW 9 3
ParTC2nd 10 6
ParXcor 11 7
ParYcor 12 7
ParWafer 13 5
ParLotNmbr 14 16
ParCKAna 17 2
ParCKDac 18 2
ParFreqAdj 19 4
ParMlxLock 21 1
ParMlxCRC 22 6
ParMlxParity 23 3
ParTCW1TC31 24 6 Signed
ParTCW2TC31 25 6 Signed
ParTCW3TC31 26 6 Signed
ParTCW4TC0 27 6 Signed
ParTCW5TC0 28 6 Signed
ParTCW6TC0 29 6 Signed
ParTChandling 30 3
ParOffset 31 10
ParInvert 32 1
ParRG 33 4
ParFG 34 10
ParClampHigh 35 10
ParClampLow 36 10
ParFilter 37 4
ParFaultlev 38 1
ParMode 39 2
ParMemLock 41 1
ParParity 42 3
Value
Bits
Constant Description
ParCustCRC 43 6
ParCustID 44 24
ParSlow 45 1
ParDEVICE 46 5
ParISDIEB 47 1
ParUNUSED 48 1
ParTCHOT00 49 8
ParTCHOT70 50 8
ParTCHOT016 51 8
ParTCHOT716 52 8
ParTCHOT031 53 8
ParTCHOT731 54 8
ParTC2ND00 55 6
ParTC2ND30 56 6
ParTC2ND70 57 6
ParTC2ND031 58 6
ParTC2ND331 59 6
ParTC2ND731 60 6
ParMlx90251 61 2
ParUnlock 62 1
ParINFCRC 63 4
ParTCCRC 64 5
Constant Description
Value
Constant Description
Type
Constant Description
Value
Type
Constant Description
Value
Constant Type Description
Value
Constant Description
Value
Constant Description
SolvCodeBadDevice 512 When one performs a Read Back the software will
determine the type of device (Old TC Table, New TC
Table…). If the type of device can’t be recognized, the
software returns an error:
These Devices are not usable; these devices are rather
exceptional as a result of specific samples preparation by
Melexis.
Ö Bad read back: This can be the result of an instable
read back cause by a bad connection with the
device...
Constant Description
SolverStatRB 1
SolverStatEP1 2
SolverStatEP2 4
SolverStatCP1 8
SolverStatPrg 16
SolverStatLck 32
SolverStatEP3 64
SolverStatCP2 128
9 Disclaimer
Devices sold by Melexis are covered by the warranty and patent indemnification provisions appearing in its Term of
Sale. Melexis makes no warranty, express, statutory, implied, or by description regarding the information set forth
herein or regarding the freedom of the described devices from patent infringement. Melexis reserves the right to
change specifications and prices at any time and without notice. Therefore, prior to designing this product into a
system, it is necessary to check with Melexis for current information. This product is intended for use in normal
commercial applications. Applications requiring extended temperature range, unusual environmental requirements,
or high reliability applications, such as military, medical life-support or life-sustaining equipment are specifically not
recommended without additional processing by Melexis for each application.
The information furnished by Melexis is believed to be correct and accurate. However, Melexis shall not be liable to
recipient or any third party for any damages, including but not limited to personal injury, property damage, loss of
profits, loss of use, interrupt of business or indirect, special incidental or consequential damages, of any kind, in
connection with or arising out of the furnishing, performance or use of the technical data herein. No obligation or
liability to recipient or any third party shall arise or flow out of Melexis’ rendering of technical or other services.
© 2009 Melexis NV. All rights reserved.
Our website:
www.melexis.com