Você está na página 1de 92

PTC04 - PSF - MLX90251

Product Specific Function description

M L X 9 0 2 5 1 P RO D U C T
SPECIFIC FUNCTIONS
S OFTWARE L IBRARY

MLX90251 PSF Library Object Model Page 1 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

1 Contents
1 CONTENTS..........................................................................................................................................................2

2 INTRODUCTION................................................................................................................................................5

3 SOFTWARE STRUCTURE ...............................................................................................................................5


3.1 Object Model..................................................................................................................................................5
3.2 Object Structure and Hierarchy ......................................................................................................................5
3.3 Objects with Interfaces...................................................................................................................................6
4 MLX90251PSFMANAGER OBJECT................................................................................................................7
4.1 Background ....................................................................................................................................................7
5 MLX90251PSFDEVICE OBJECT .....................................................................................................................8
5.1 Background ....................................................................................................................................................8
5.2 Scope of the MLX90251PSFDevice object....................................................................................................9
5.3 RAM and ROM registers ...............................................................................................................................9
5.4 Advanced Property.......................................................................................................................................10
5.5 ChipVersion Property...................................................................................................................................10
5.6 CurrentDevice Property................................................................................................................................11
5.7 PTC04 Property............................................................................................................................................12
5.8 Solver Property.............................................................................................................................................13
5.9 UseDoubleDies Property..............................................................................................................................14
5.10 CopyRom2Ram Method...............................................................................................................................14
5.11 FastProgramEEpromFull Method ................................................................................................................15
5.12 MeasureByRam Method...............................................................................................................................16
5.13 MeasureByRom Method ..............................................................................................................................16
5.14 ProgramEEpromCustomArea Method .........................................................................................................17
5.15 ProgramEEpromMelexisArea Method .........................................................................................................18
5.16 ProgramEEpromMemLock Method.............................................................................................................18
5.17 ReadbackFullEeprom Method......................................................................................................................19
5.18 SetRelaisVDD Method.................................................................................................................................20
5.19 SetRelaisVOUT Method ..............................................................................................................................20
5.20 VerifyRomWithRam Method.......................................................................................................................21
6 MLX90251SOLVER OBJECT .........................................................................................................................22
6.1 Background ..................................................................................................................................................22
6.2 Scope ............................................................................................................................................................22
6.3 Status Property .............................................................................................................................................22
6.4 TCSelector Method ......................................................................................................................................23
6.5 GetTC Method..............................................................................................................................................23
6.6 The Standard Solver .....................................................................................................................................24
6.7 SolverStep1 Method.....................................................................................................................................32
6.8 SolverStep2 Method.....................................................................................................................................32
6.9 SolverStep3 Method.....................................................................................................................................33
6.10 SolverStep4 Method.....................................................................................................................................34
6.11 SolverStep5 Method.....................................................................................................................................34
6.12 SolverStep6 Method.....................................................................................................................................35
6.13 The Fast Solver.............................................................................................................................................36
6.14 FastSolverStep1 Method ..............................................................................................................................39
6.15 FastSolverStep2 Method ..............................................................................................................................40
6.16 FastSolverStep3 Method ..............................................................................................................................40
6.17 FastSolverStep4 Method ..............................................................................................................................41
6.18 FastSolverStep5 Method ..............................................................................................................................42
6.19 FastSolverStep6 Method ..............................................................................................................................42
6.20 FastSolverStep7 Method ..............................................................................................................................43

MLX90251 PSF Library Object Model Page 2 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.21 FastSolverStep8 Method ..............................................................................................................................44


6.22 The Min/Max Solver ....................................................................................................................................45
6.23 MinMaxSolverStep1 Method .......................................................................................................................48
6.24 MinMaxSolverStep2 Method .......................................................................................................................49
6.25 MinMaxSolverStep2b Method .....................................................................................................................49
6.26 MinMaxSolverStep3 Method .......................................................................................................................51
6.27 MinMaxSolverStep4 Method .......................................................................................................................51
6.28 MinMaxSolverStep5 Method .......................................................................................................................52
6.29 MinMaxSolverStep6 Method .......................................................................................................................53
6.30 MIN MAX Solver Sequence with external measurements...........................................................................54
6.31 MIN MAX Solver with external supply.......................................................................................................55
6.32 MeasureVDDSolver Method........................................................................................................................55
6.33 OverwriteVDDSolver Method .....................................................................................................................56
6.34 StartInitialMoveCalculations Method ..........................................................................................................56
6.35 StartInitialMoveMeasurements Method .......................................................................................................57
6.36 StopMove Method........................................................................................................................................58
6.37 Start2ndMoveCalculations Method..............................................................................................................58
6.38 Start2ndMoveMeasurements Method ..........................................................................................................59
6.39 Clamping Method.........................................................................................................................................60
6.40 InputMeasMINMAXsolver Method.............................................................................................................60
7 MLX90251ADVANCED OBJECT...................................................................................................................62
7.1 Background ..................................................................................................................................................62
7.2 Scope of the MLX90251Advanced object ...................................................................................................62
7.3 FastProgram Method ....................................................................................................................................62
7.4 FastProgram90277 Method ..........................................................................................................................63
7.5 GetIdd Method .............................................................................................................................................64
7.6 GetMlxID Method........................................................................................................................................64
7.7 GetParameter Method...................................................................................................................................65
7.8 GetSetting Method .......................................................................................................................................66
7.9 GetSolverParameter Method ........................................................................................................................66
7.10 GetSolverSetting Method .............................................................................................................................67
7.11 GetVdd Method............................................................................................................................................68
7.12 GetVout Method...........................................................................................................................................68
7.13 MakeMeasurement Method..........................................................................................................................69
7.14 MeasureByRam Method...............................................................................................................................70
7.15 MeasureByRam90277 Method.....................................................................................................................71
7.16 MeasureByRamChB Method .......................................................................................................................72
7.17 Program Method...........................................................................................................................................73
7.18 Program90277 Method.................................................................................................................................74
7.19 ReadBack Method ........................................................................................................................................75
7.20 ReadBack90277 Method ..............................................................................................................................76
7.21 ReadBack90277FA Method .........................................................................................................................77
7.22 OpenProfile Method .....................................................................................................................................78
7.23 SaveProfile Method......................................................................................................................................78
7.24 SaveProfileAs Method .................................................................................................................................79
7.25 Example INI file...........................................................................................................................................80
7.26 SetParameter Method ...................................................................................................................................80
7.27 SetSetting Method ........................................................................................................................................81
7.28 SetSolverParameter Method.........................................................................................................................81
7.29 SetSolverSetting Method..............................................................................................................................82
7.30 SetVdd Method ............................................................................................................................................83
7.31 Temperature measurement [Volt] Method ...................................................................................................84
8 ENUMERATION CONSTANTS......................................................................................................................85
8.1 ParameterCodes enumeration.......................................................................................................................85
8.2 ReadBackModes enumeration......................................................................................................................86
8.3 ChipVersionCodes enumeration...................................................................................................................87
8.4 SettingCodes enumeration............................................................................................................................87

MLX90251 PSF Library Object Model Page 3 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

8.5 SolverParamCodes enumeration ..................................................................................................................88


8.6 SolverSettingCodes enumeration .................................................................................................................89
8.7 SolverResultCodes enumeration ..................................................................................................................90
8.8 SolverStatusCodes enumeration...................................................................................................................91
9 DISCLAIMER....................................................................................................................................................92

MLX90251 PSF Library Object Model Page 4 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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

3.1 Object Model


MPT object model specifies that a PSF module must expose two COM objects which implement certain
COM interfaces. MLX90251 PSF implements these two objects and two additional objects for advanced
operations.

• MLX90251PSFManager object – implements IPSFManager standard MPT interface. This is a


standard PSFManager object. MPT Framework and other client applications create a temporary
instance of that object, just for device scanning procedure. After that this instance is released.
This is the first required object. Refer to MPT Developer Reference document for more information
about PSFManager object and IPSFManager interface.
• MLX90251PSFDevice object – implements IMLX90251PSFDevice specific interface. However, this
interface derives from IMPTDevice standard MPT interface and therefore MLX90251PSFDevice also
implements the functionality of MPTDevice standard MPT object. In addition to standard
IMPTDevice methods, IMLX90251PSFDevice interface exposes methods, which are specific to this
library. They are described in this document.
This is the second required COM object. Refer to MPT Developer Reference document for more
information about MPTDevice object and IMPTDevice interface.
• MLX90251Advanced object – implements IMLX90251Advanced library specific interface. This
object implements advanced functions that would be rarely used in order to perform specific
operations not available with the standard device functions. In general, most of the methods of that
object provide direct access to MLX90251 firmware commands implemented in PTC04 programmer.

• MLX90251Solver object - implements IMLX90251Solver library specific interface. This object


provides methods to easy tune your product in your application.

3.2 Object Structure and Hierarchy


MLX90251PSFManager
MLX90251PSFDevice

Solver MLX90251Solver

Advanced MLX90251Advanced

PTC04 PTC04PSFDevice

MLX90251 PSF Library Object Model Page 5 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

3.3 Objects with Interfaces

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

MLX90251 PSF Library Object Model Page 6 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

MLX90251 PSF Library Object Model Page 7 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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

Set PSFMan = CreateObject("MPT.MLX90251PSFManager")


Set DevicesCol = PSFMan.ScanStandalone(dtSerial)
If DevicesCol.Count <= 0 Then
MsgBox ("No PTC-04 programmers found!")
Exit Sub
End If

' Dev is a global variable of type MLX90251PSFDevice


‘ Select first device from the collection
Set Dev = DevicesCol(0)
MsgBox (Dev.Name & " device found on " & Dev.Channel.Name)
If DevicesCol.Count > 1 Then
For I = 1 To DevicesCol.Count - 1
' We are responsible to call Destroy(True) on the device objects we do not need
Call DevicesCol(I).Destroy(True)
Next I
End If

‘ States that we’ll work with MLX90251 device; setting this value to True configures the PSF for work with
MLX90277
Dev.UseDoubleDies = False

‘ States that we’ll work with MLX90251CC device


Dev.ChipVersion = ChipVerCC

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

MLX90251 PSF Library Object Model Page 8 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Set PSFMan = CreateObject("MPT.MLX90251PSFManager")


Set DevicesCol = PSFMan.ScanStandalone(dtSerial)
If DevicesCol.Count <= 0 Then
MsgBox ("No PTC-04 programmers found!")
Exit Sub
End If

If DevicesCol.Count > 1 Then


For I = 1 To DevicesCol.Count - 1
'We are responsible to call Destroy(True) on device objects we do not need
Call DevicesCol(I).Destroy(True)
Next I
End If
Set MyDev = DevicesCol(0)
Else
' Manual connection begins here
Set CommMan = CreateObject("MPT.CommManager")
Set MyDev = CreateObject("MPT.MLX90251PSFDevice")
I = ActiveWorkbook.Names("SerialPort").RefersToRange.Value2
Set Chan = CommMan.Channels.CreateChannel(CVar(I), ctSerial)
MyDev.Channel = Chan
' Check if a PTC04 programmer is connected to this channel
Call MyDev.CheckSetup(False)
End If

‘ States that we’ll work with MLX90251 device; setting this value to True configures the PSF for work with
MLX90277
Dev.UseDoubleDies = False

‘ States that we’ll work with MLX90251CC device


Dev.ChipVersion = ChipVerCC

MsgBox (MyDev.Name & " programmer found on " & MyDev.Channel.Name)


Exit Sub

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.

5.2 Scope of the MLX90251PSFDevice object


This object supports all needs for a standard user.
With these basic functions, you’re able to discover this Melexis Product.

5.3 RAM and ROM registers


Internally in every virtual device, there are two main registers that stores every parameter.
• The ROM register keeps in mind what has been read form the device (during Read Back).
• The RAM register keeps the changed parameters to use during a MeasureByRam or temporary
register. It’s also used to tell the programmer what to program.
Particular parameters can be accesses by GetParameter and SetParameter methods of
MLX90251Advanced object.

MLX90251 PSF Library Object Model Page 9 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

5.4 Advanced Property


This is a read-only property which returns a reference to MLX90251Advanced co-object.

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.

5.5 ChipVersion Property


Specifies version of the Hall sensor. Possible versions have corresponding constant in ChipVersionCodes
enumerarion.

DEFAULT: when never called, CC version (ChipVerCC) is active.

Syntax
Visual Basic:
Property ChipVersion as ChipVersionCodes

C++:
HRESULT get_ChipVersion(/*[out,retval]*/ ChipVersionCodes * pValue);
HRESULT set_ChipVersion(/*[in]*/ ChipVersionCodes Value);

MLX90251 PSF Library Object Model Page 10 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

5.6 CurrentDevice Property


Specifies which device to be used by subsequent operations: It’s a soft switch, meaning that there is not an
immediate action visible on hardware.
All functions implemented in the library use the CurrentDevice property to determine which device you are
working with. It also concerns EEPROM parameters cache, Solver settings and SolverParameters as for
example SetParameter.
There are 16 virtual devices available. Every virtual device corresponds to a single die with separate cache for
the EEPROM, independent Solver settings and Solver parameters. If UseDoubleDies parameter is True two
sequential virtual devices corresponds to one real 90277 device.

CurrentDevice MLX90251 MLX90277


( UseDoubleDies = False ) ( UseDoubleDies = True )
0 (default) Device 1 Device 1 Die A
1 Device 2 Device 1 Die B
2 Device 3 Device 2 Die A
3 Device 4 Device 2 Die B
4 Device 5 Device 3 Die A
5 Device 6 Device 3 Die B
6 Device 7 Device 4 Die A
7 Device 8 Device 4 Die B
8 Device 9 Device 5 Die A
9 Device 10 Device 5 Die B
10 Device 11 Device 6 Die A
11 Device 12 Device 6 Die B
12 Device 13 Device 7 Die A
13 Device 14 Device 7 Die B
14 Device 15 Device 8 Die A
15 Device 16 Device 8 Die B

DEFAULT: when never called, the device 0 is selected.

MLX90251 PSF Library Object Model Page 11 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

5.7 PTC04 Property


This is a read-only property which returns reference to PTC04PSFDevice co-object.

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.

MLX90251 PSF Library Object Model Page 12 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

5.8 Solver Property


This is a read-only property which returns a reference to MLX90251Solver co-object.

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.

MLX90251 PSF Library Object Model Page 13 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

5.9 UseDoubleDies Property


Specifies if the sensor has one or two dies. In fact this by property the user of the library states what kind of
IC uses – MLX90251 or MLX90277. Preferred place for setting this property, as well as for ChipVersion
property, is immediate after obtaining a reference to the MLX90251PSFDevice object. It’s a soft switch,
meaning that there is not an immediate action visible on hardware.

DEFAULT: until changed, the value of the property is False.

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.

5.10 CopyRom2Ram Method


Copies all EEPROM parameters from internal ROM to internal RAM cache. This is done in software level.
There is not an immediate action visible on hardware.

Syntax
Visual Basic:
Sub CopyRom2Ram ()
C++:
HRESULT CopyRom2Ram ();

MLX90251 PSF Library Object Model Page 14 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

5.11 FastProgramEEpromFull Method


Writes the whole EEPROM of MLX90251, taking the data from the internal RAM register.
Only the variables that are modified will be programmed.

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.

MLX90251 PSF Library Object Model Page 15 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

5.12 MeasureByRam Method


Measures the voltage of the selected device using RAM parameters. The selected device is firstly reset to
normal mode and then the contents of the RAM-register will be copied to the RAM of the device and the
output voltage is measured. After programming the RAM, the device goes back to normal mode and stays
there as programmed.

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.

5.13 MeasureByRom Method


Measures the voltage of the selected device. The selected device is firstly reset to normal mode, this means
the contents of the sensor’s EEPROM is loaded into its RAM and then the output voltage of the device is
measured. The device stays in normal mode.

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.

MLX90251 PSF Library Object Model Page 16 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

5.14 ProgramEEpromCustomArea Method


Copies the customer area of the RAM-register to the EEPROM of the sensor if the MemLock of the device is
not set.

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.

MLX90251 PSF Library Object Model Page 17 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

5.15 ProgramEEpromMelexisArea Method


Copies the Melexis area of the RAM-register to the EEPROM of the sensor if the MlxLock of the device is
not set.

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.

5.16 ProgramEEpromMemLock Method


Writes contents of MemLock parameter from RAM register to the sensor’s EEPROM.

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.

MLX90251 PSF Library Object Model Page 18 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

5.17 ReadbackFullEeprom Method


Reads EEPROM from the Hall sensor and put it in the ROM-registers of the current device. The data read
back is performed by IDD or Vout2. The register can be evaluated by using the GetParameter function.

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.

MLX90251 PSF Library Object Model Page 19 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

5.18 SetRelaisVDD Method


Sets the relays to connect the VDD pin with the VDD supply.

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.

5.19 SetRelaisVOUT Method


Sets the relays to connect the output pin with the output supply.

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.

MLX90251 PSF Library Object Model Page 20 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.

5.20 VerifyRomWithRam Method


Compares internal ROM and RAM registers of the current device. This is done on software level. There is not
an immediate action visible on hardware.

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.

MLX90251 PSF Library Object Model Page 21 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.3 Status Property


This is a read-only property which returns current status of the Solver. The value is a combination of
SolverStatusCodes constants and indicates which functions are allowed to be executed.

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.

MLX90251 PSF Library Object Model Page 22 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.4 TCSelector Method


Calculates the temperature compensation settings based on the target. The result is the real temperature
compensation of the device. This function is automatically executed in SolverStep1 and FastSolverStep1.

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.

6.5 GetTC Method


This function calculates the real temperature compensation of the device (ppm/C).

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

MLX90251 PSF Library Object Model Page 23 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.6 The Standard Solver


The Standard solver is a 2 point solver. P1 and P2 represent the min and max field.

Output vs Linear Field

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.

MLX90251 PSF Library Object Model Page 24 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

MLX90251 PSF Library Object Model Page 25 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

MLX90251 PSF Library Object Model Page 26 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

MLX90251 PSF Library Object Model Page 27 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

MLX90251 PSF Library Object Model Page 28 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

MLX90251 PSF Library Object Model Page 29 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Standard Solver Flow: Performing functions in between Solver Steps


Standard Solver Flow Basic Functions performed in the solver 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

Standard Solver: Solver Step Time 90251 vs. 90277


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.

Solver step time for Standard Solver


FA 90251 90277
Step 1 1250 1250 mSec
Step 2 715 1525 mSec
Step 3 950 2060 mSec
Step 4 580 1170 mSec
Step 5 3800 3800 mSec
Step 6 200 200 mSec
Total Time 7220 10005 mSec
% 100 138.57

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.

Solver step time for Standard Solver


FA 90251 90277
Step 1 1250 1250 mSec
Step 2 550 1100 mSec
Step 3 650 1300 mSec
Step 4 475 950 mSec
Step 5 2550 2550 mSec
Step 6 200 200 mSec
Total Time 5675 7350 mSec
% 100 129.5

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.

MLX90251 PSF Library Object Model Page 31 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.7 SolverStep1 Method


Executes the first step of the solver program. The fist step is the initialization phase. Don’t forget to initialize
the solver settings and solver parameters (by SetSolverSetting and SetSolverParameter methods of Advanced
object) before using this function.

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.

6.8 SolverStep2 Method


Execute the second step of the solver program, which is the evaluation of the first position.

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

MLX90251 PSF Library Object Model Page 32 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.9 SolverStep3 Method


The third solver step will evaluate the second position.

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.

MLX90251 PSF Library Object Model Page 33 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.10 SolverStep4 Method


The fourth solver step will recheck the first position and calibrate the clamping.

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.

6.11 SolverStep5 Method


The fifth solver step will program the sensor with the results of the solver.

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.

MLX90251 PSF Library Object Model Page 34 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.12 SolverStep6 Method


The sixth solver step will set the MemLock bit of the device.

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.

MLX90251 PSF Library Object Model Page 35 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.13 The Fast Solver


This solver is the fast
version of the standard Out put vs Linear Field
solver and is also equipped
to work with 3 positions.
5
This solver uses the code of P3
the last programmed device, 4.5
Offset, RG, FG and INV 4
which are stored in the INI- 3.5
File, as starting point for its 3
Output(V)
search. This approach limits P1
2.5
the search area which results
in fewer measurements and 2
shorter solving time. 1.5
1
P2
0.5
0
0 50 100
Field

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.

Solving to Target Curve


Function of a solver is tune Gain and Offset in order to fit the curve with the targets of the user.
Measurements for a two point solver
In the case of a two point solver, we have two measurements (P1, P2) that will give us a span (and a gain
error) and an Offset (and Offset error).
These errors are used to tune/modify the gain and offset.
Measurements for a three point solver
When a three point solver is used, a linear expression will be calculated out of the three points.
This linear expression will be used to compare the targets. By regenerating two points, a span, a gain error
and an offset error can be calculated.

MLX90251 PSF Library Object Model Page 36 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

MLX90251 PSF Library Object Model Page 37 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Fast Solver Flow: Performing functions in between Solver Steps


Fast Solver Flow Basic Functions performed in the solver step.

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

MLX90251 PSF Library Object Model Page 38 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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_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

6.14 FastSolverStep1 Method


Executes the first step of the solver program. The fist step is the initialization phase. Don’t forget to initialize
the solver settings and solver parameters (by SetSolverSetting and SetSolverParameter methods of Advanced
object) before using this function.

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

MLX90251 PSF Library Object Model Page 39 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.15 FastSolverStep2 Method


Executes the second step of the solver program, which is the evaluation of the first position.

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.

6.16 FastSolverStep3 Method


The third solver step will evaluate the second position.

MLX90251 PSF Library Object Model Page 40 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.17 FastSolverStep4 Method


The fourth solver step will evaluate the third position.

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.

MLX90251 PSF Library Object Model Page 41 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.18 FastSolverStep5 Method


The fifth solver step will check the second position.

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.

6.19 FastSolverStep6 Method


The sixth solver step will check the first position and calibrate the clamping.

Syntax

MLX90251 PSF Library Object Model Page 42 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.20 FastSolverStep7 Method


The seventh solver step will program the sensor with the results of the solver.

Syntax
Visual Basic:
Function FastSolverStep7() As Long

C++:
HRESULT FastSolverStep7(/*[out, retval]*/ long * plStatus);

MLX90251 PSF Library Object Model Page 43 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.21 FastSolverStep8 Method


The eighth solver step will set the MemLock bit of the device.

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.

MLX90251 PSF Library Object Model Page 44 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.22 The Min/Max Solver

Output & Sinuswave Field vs Time

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

This min and max output voltage represent our


Output vs s ine w ave Fie ld
measured curve. The solver will adjust the Gain and
offset so that the measured curve correspond with the
target curve given by the user. 4.5
4 V2
3.5
3
Output (V)

2.5
2
1.5
1
0.5
V1
0
-150

-100

-50

50

100

150

Field

MLX90251 PSF Library Object Model Page 45 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

MLX90251 PSF Library Object Model Page 46 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

MIN/MAX Solver Flow: Performing functions in between Solver Steps


MIN/MAX Solver Flow Basic Functions performed in the solver step.

Min Max Solverstep1


Function Basic Functions
int MM_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.


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, ...)

MLX90251 PSF Library Object Model Page 47 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description


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

6.23 MinMaxSolverStep1 Method


Executes the first step of the MIN MAX solver program. The fist step is the initialization phase. Don’t forget
to initialize the solver settings and solver parameters (by SetSolverSetting and SetSolverParameter methods
of Advanced object) before using this function.

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.

MLX90251 PSF Library Object Model Page 48 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.24 MinMaxSolverStep2 Method


Execute the second step of the MIN MAX solver program, which is the start of the initial move
measurements.

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.

6.25 MinMaxSolverStep2b Method


Execute the step 2b of the MIN MAX solver program, which is the end of the initial move measurements.

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:

MLX90251 PSF Library Object Model Page 49 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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

MLX90251 PSF Library Object Model Page 50 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.26 MinMaxSolverStep3 Method


The third step of the MIN MAX solver will start second move measurements.

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.

6.27 MinMaxSolverStep4 Method


Execute the fourth step of the MIN MAX solver program, which is the end of the second move
measurements.

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.

MLX90251 PSF Library Object Model Page 51 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.28 MinMaxSolverStep5 Method


The fifth step of the MIN MAX solver will program the sensor with the results of the solver.

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.

MLX90251 PSF Library Object Model Page 52 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.29 MinMaxSolverStep6 Method


The sixth MIN MAX solver step will set the MemLock bit of the device.

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.

MLX90251 PSF Library Object Model Page 53 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.30 MIN MAX Solver Sequence with external measurements.


The main MINMAX solver sequence is designed for a slow alternating field (1 or 2Hz).

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.

In the flow chart you’ll find an overview of the solver


sequence.

Before performing STEP 1 switch on the field and measure the


actual field. Set the targets for Position 1 and 2, Clamp Low
and High. If needed the targets have to be corrected in function
of the actual field.

STEP 1: Read Back Full EEPROM, Copy Rom to RAM. The


TC target has to be set after “Copy ROM to RAM” with the
function “TC selector”. Otherwise the selected TC codes are
overwritten.

STEP 2: In step 2 the gain and offset of the previous


PROGRAMMED device are taken and used as initial setting.
The gain is recalculated (Gain x 0.8).

STEP 2b: Input Meas. MIN/MAX Solver. This function allows


the user to input measurements from external measuring
equipment. The function requests the minimum and maximum
voltage level of the output signal.
V max = Vdc + Veff 2
V min = Vdc − Veff 2

STEP 3: In step 3 the gain and offset codes are modified to fit
the targets and loaded in the device.

STEP 3b: Input Meas. MIN/MAX Solver to verify the result. If


the result is Not OK, Return to STEP 3 (iteration).
The gain and offset modification in STEP 3 are done based on
the measurements given by STEP 3b.

STEP 4: In step 4 clamping levels are calibrated. At this stage


the magnetic field is no longer required.

STEP 5: in step 5 the EEPROM is programmed and verified.


Verify ROM with RAM compares the ROM and RAM register
of the software.
Before performing the Verify ROM with RAM you have to
perform the Read Back to get the actual content of the devices
EEPROM in the ROM register of the software.

STEP 6: If the calibration of the device is successful, the device


can be MEMLOCKED.

MLX90251 PSF Library Object Model Page 54 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.31 MIN MAX Solver with external supply

Flow MIN MAX Solver with external supply

Read Back EEPROM


CopyRom2Ram
MM_Solverstep1
TC Selector
Set Parameter Mode and Invert Slope (optionel)

Start Initial move Calculations


Switch to external supply (Optional)
MM_Solverstep2
Measure VDD Solver Overwrite VDD Solver
Start Initial move Measurements

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

Set Parameter MemLock


MM_Solverstep6
Program EEPROM MEMLOCK

Main Solver Step.


Mandatory steps (functions performed by the solver steps.)
Step is NOT performed if the device is MLX LOCKED
Optional. Preformed externally by the user. Not by the DLL.

6.32 MeasureVDDSolver Method


This low level function is a part of the MinMaxSolverStep2.

Syntax
Visual Basic:
Sub MeasureVDDSolver()

C++:
HRESULT MeasureVDDSolver();

Parameters
None

MLX90251 PSF Library Object Model Page 55 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.33 OverwriteVDDSolver Method


This low level function can be a part of the MinMaxSolverStep2.

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.

6.34 StartInitialMoveCalculations Method


This low level function is a part of the MinMaxSolverStep2.

Syntax
Visual Basic:
Function StartInitialMoveCalculations() As Long

C++:
HRESULT StartInitialMoveCalculations(/*[out, retval]*/ long * plStatus);

MLX90251 PSF Library Object Model Page 56 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.35 StartInitialMoveMeasurements Method


This low level function is a part of the MinMaxSolverStep2.

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.

MLX90251 PSF Library Object Model Page 57 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.36 StopMove Method


This low level function is a part of the MinMaxSolverStep2b and MinMaxSolverStep4.

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.

6.37 Start2ndMoveCalculations Method


This low level function is a part of the MinMaxSolverStep3.

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.

MLX90251 PSF Library Object Model Page 58 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

6.38 Start2ndMoveMeasurements Method


This low level function is a part of the MinMaxSolverStep3.

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.

MLX90251 PSF Library Object Model Page 59 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

6.39 Clamping Method


This low level function is a part of the MinMaxSolverStep4.

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.

6.40 InputMeasMINMAXsolver Method


This low level function is a part of the Min-Max Solver. This function allows you to enter measurements for
the MIN-MAX solver sequence. In stead of performing the needed measurements with the PTC04
programmer, the measurements are performed with the user’s external equipment and returned to the solver
with this function.

Syntax
Visual Basic:
Sub Input_Meas_MMSolver(fVmax as Single, fVmin as Single)

C++:
HRESULT Input_Meas_MMSolver(/*[in]*/float fVmax, /*[in]*/float fVmin);

MLX90251 PSF Library Object Model Page 60 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Parameters
fVmax
A Single value containing the maximum voltage value of the output.

V max = Vdc + Veff 2

fVmin
A Single value containing the minimum voltage value of the output.

V min = Vdc − Veff 2

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.

MLX90251 PSF Library Object Model Page 61 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.2 Scope of the MLX90251Advanced object


This object implements advanced functions that would be rarely used in order to perform specific operations
not available with the standard device functions. In general, most of the methods of that object provide direct
access to MLX90251 firmware commands implemented in PTC04 programmer.

7.3 FastProgram Method


Programs MLX90251 with the supplied information.

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:

Bit info 0 Bit info 1 ... Bit info N

where Bit info bytes have 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.

MLX90251 PSF Library Object Model Page 62 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.4 FastProgram90277 Method


Programs MLX90277 with the supplied information.

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

where Bit info bytes have 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:

MLX90251 PSF Library Object Model Page 63 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Return value Meaning


S_OK The operation completed successfully.
Any other error code The operation failed.

Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.

7.5 GetIdd Method


Measures IDD current.

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.

7.6 GetMlxID Method


Gets the unique Melexis ID of the device.

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.

MLX90251 PSF Library Object Model Page 64 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.7 GetParameter Method


Returns the value of specific EEPROM parameter from RAM or ROM registers of the current device.

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.

MLX90251 PSF Library Object Model Page 65 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.

7.8 GetSetting Method


Returns the value of a specific setting. Settings are common for all 16 devices in a MLX90251PSFDevice
object.

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.

7.9 GetSolverParameter Method


Returns specific Solver parameter.

Syntax
Visual Basic:
Function GetSolverParameter(Index As SolverParamCodes)

C++:
HRESULT GetSolverParameter (/*[in]*/ SolverParamCodes Index, /*[out, retval]*/
VARIANT * pValue );

MLX90251 PSF Library Object Model Page 66 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.10 GetSolverSetting Method


Returns specific Solver setting.

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.

MLX90251 PSF Library Object Model Page 67 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.11 GetVdd Method


Measures the VDD voltage.

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.

7.12 GetVout Method


Measures voltage on the output pin without resetting the sensor.

Syntax
Visual Basic:
Function GetVout() As Single

C++:
HRESULT GetVout(/*[out, retval]*/ float * pfValue);

MLX90251 PSF Library Object Model Page 68 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.13 MakeMeasurement Method


Measures the voltage of the selected device with a predefined slope, rough gain, fine gain and offset. The
selected device is firstly reset to normal mode and then the contents of the RAM-register will be copied to the
RAM of the device, with the modified rough gain/fine gain/offset/inverter. The RAM-register is not modified.
After programming the RAM, the device goes back to normal mode and stays there as programmed. This
function gives the opportunity the quickly check the output with a set of FG/RG/Offset/INV without changing
the RAM-register.

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

MLX90251 PSF Library Object Model Page 69 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.14 MeasureByRam Method


Measures the output voltage of the MLX90251 Hall sensor using the supplied data as RAM content. The
selected device is firstly reset to programming mode and then the contents varPuls is be sent to the RAM of
the device and the output voltage is measured. After programming the RAM, the device goes back to normal
mode and stays there as programmed.

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:

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.

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.

MLX90251 PSF Library Object Model Page 70 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.15 MeasureByRam90277 Method


Measures the output voltage of the MLX90277 Hall sensor using the supplied data as RAM content. The
selected device is firstly reset to programming mode and then the contents varPuls is be sent to the RAM of
the device and the output voltage is measured. After programming the RAM, the device goes back to normal
mode and stays there as programmed.

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:

MLX90251 PSF Library Object Model Page 71 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Return value Meaning


S_OK The operation completed successfully. *pfVoutA and *pfVoutB
contains valid data.
Any other error code The operation failed.

Quick Info
Header: Declared in MLX90251PSFModule_TLB.h.

7.16 MeasureByRamChB Method


Measures the output voltage of dieB of the MLX90277 Hall sensor using the supplied data as RAM content.
The selected device is firstly reset to programming mode and then the contents varPuls is be sent to the RAM
of the device and the output voltage is measured. After programming the RAM, the device goes back to
normal mode and stays there as programmed.

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:

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.

pfVout
An address of float variable that receives the output voltage of dieB of the hall sensor in Volt.

MLX90251 PSF Library Object Model Page 72 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.17 Program Method


Programs EEPROM of MLX90251 Hall sensor with supplied data.

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:

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

MLX90251 PSF Library Object Model Page 73 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

Header: Declared in MLX90251PSFModule_TLB.h.

7.18 Program90277 Method


Programs EEPROM of both dies of MLX90277 Hall sensor with supplied data.

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.

MLX90251 PSF Library Object Model Page 74 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

7.19 ReadBack Method


Reads EEPROM data from MLX90251 Hall sensor.

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.

MLX90251 PSF Library Object Model Page 75 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

7.20 ReadBack90277 Method


Reads EEPROM data from both dies of MLX90277 Hall sensor.

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.

MLX90251 PSF Library Object Model Page 76 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

7.21 ReadBack90277FA Method


Reads EEPROM data from both dies of MLX90277FA Hall sensor.

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.

MLX90251 PSF Library Object Model Page 77 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

7.22 OpenProfile Method


Reads settings, Solver settings and Solver parameters from INI file. The value of ChipVersion property of the
MLX90251PSFDevice object is also read from the INI file. Unlike this, the important UseDoubleDie
property is not read from INI and must be explicitly set by client software.

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.

7.23 SaveProfile Method


Saves Solver parameters and Solver settings of virtual device(s) as well as common settings to the last
specified INI file. If this is the first INI file oriented function call for this device object a default file name
“MLX90251_PTC04_default.ini” will be used.

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++:

MLX90251 PSF Library Object Model Page 78 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.24 SaveProfileAs Method


Saves Solver parameters and Solver settings of virtual device(s) as well as common settings to a specified INI
file.

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.

MLX90251 PSF Library Object Model Page 79 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

7.25 Example INI file


[Settings]
ChipVersion=FA
VddLow=0
Vdd=5
Vprg=9
VoutLow=0
Vout=5
Tpor=450
Thold=1
Tprg=5000
Tpuls=30
DelayVout=5000
SampleDelay=5
FilterVout=100
FilterRB=16

[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

7.26 SetParameter Method


Sets the value of specific EEPROM parameter to the internal RAM register of the current device.

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

MLX90251 PSF Library Object Model Page 80 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.27 SetSetting Method


Sets the value of a specific setting. Settings are common for all 16 devices in an MLX90251PSFDevice
object.

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.

7.28 SetSolverParameter Method


Sets the value of a specific Solver parameter.

Syntax
Visual Basic:
Sub SetSolverParameter(Index As SolverParamCodes, varValue)

C++:
HRESULT SetSolverParameter (/*[in]*/ SolverParamCodes Index, /*[in]*/ VARIANT Value
);

Parameters

MLX90251 PSF Library Object Model Page 81 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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.

7.29 SetSolverSetting Method


Sets the value of a specific Solver setting.

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.

MLX90251 PSF Library Object Model Page 82 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

7.30 SetVdd Method


Sets the voltage on the VDD pin.

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.

MLX90251 PSF Library Object Model Page 83 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

7.31 Temperature measurement [Volt] Method


This function measures the temperature sensor of the selected device. The selected device is firstly reset to
normal mode, set in the temperature test mode and then the output voltage is measured. After measuring the
temperature, the selected device is switched off.

To get an estimation of the actual temperature:

Value[V ] − Cte
T=
Gain
Cte can vary from device to device.

For the Temperature in ºC:


Cte = 0.73604
Gain = 0.01056

For the Temperature in ºF:


Cte = 0.54833
Gain = 0.00587

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.

MLX90251 PSF Library Object Model Page 84 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

8 Enumeration constants

8.1 ParameterCodes enumeration


The following constants refer to parameters in EEPROM. They are used by GetParameter and
SetParameter methods of MLX90251Advanced object.

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

MLX90251 PSF Library Object Model Page 85 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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

8.2 ReadBackModes enumeration


The following constants specify the ReadBack mode. They are used by ReadbackFullEeprom method
of MLX90251PSFDevice object.
Value

Constant Description

rbmIdd 0 Digital data is analyzed by the IDD measurement.


rbmVout 1 Digital data is analyzed by the Vout2 measurement.
rbmIddLevel 2

MLX90251 PSF Library Object Model Page 86 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

8.3 ChipVersionCodes enumeration


The following constants specify the type of the Hall sensor. They are used in ChipVersion property of
MLX90251PSFDevice object.

Value
Constant Description

ChipVerCC 0 Specifies all versions but FA.


ChipVerFA 1 Specifies FA version

8.4 SettingCodes enumeration


The following constants refer to certain setting. They are used by GetSetting and SetSetting methods
of MLX90251Advanced object.
Value

Type

Constant Description

SettingTpor 0 Long Default value is 450 [us].


(long)
SettingThold 1 Long Default value is 1 [us].
(long)
SettingTprg 2 Long Default value is 5000 [us].
(long)
SettingVdd 3 Single Default value is 5 [Volts].
(float)
SettingVprg 4 Single Default value is 9 [Volts].
(float)
SettingVout 5 Single Default value is 5 [Volts].
(float)
SettingTpuls 6 Long Default value is 30 [us].
(long)
SettingFilterRB 10 Long Default value is 15 [times].
(long)
SettingMeasureFilter 11 Long Default value is 100 [times].
(long)
SettingMeasureDelay 12 Long Default value is 8000 [us].
(long)
SettingSampleDelay 13 Long Default value is 5 [us].
(long)
SettingVddLow 20 Single Default value is 0 [Volts].
(float)
SettingVoutLow 21 Single Default value is 0 [Volts].
(float)

MLX90251 PSF Library Object Model Page 87 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

8.5 SolverParamCodes enumeration


The following constants refer to Solver parameters. They are used by GetSolverParameter and
SetSolverParameter methods of MLX90251Advanced object.

Value

Type
Constant Description

SParOutPos1 1027 Single Default value is 50 [%VDD].


(float)
SParOutPos2 1028 Single Default value is 90 [%VDD]
(float)
SParClampHigh 1029 Single Default value is 100 [%VDD]
(float)
SParClampLow 1030 Single Default value is 0 [%VDD]
(float)
SParTC 1031 Single Default value is 0 [ppm/C]
(float)
SParResultOutPos1 1037 Single [%VDD]
(float)
SParResultOutPos2 1038 Single [%VDD]
(float)
SParResultClampH 1039 Single [%VDD]
(float)
SParResultClampL 1040 Single [%VDD]
(float)
SParResultTC 1041 Single [ppm/C]
(float)
SParLastOffset 1043 Long
(long)
SParLastRG 1044 Long
(long)
SParLastFG 1045 Long
(long)
SParLastINV 1046 Long
(long)
SParLastRatio 1047 Single
(float)
SParOutPos3 1048 Single Default value is 10 [%VDD]
(float)
SParRelPos1 1049 Single Default value is 50 [%]
(float)
SParRelPos2 1050 Single Default value is 90 [%]
(float)
SParRelPos3 1051 Single Default value is 10 [%]
(float)
SParResultOutPos3 1052 Single [%VDD]
(float)

MLX90251 PSF Library Object Model Page 88 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

8.6 SolverSettingCodes enumeration


The following constants refer to Solver parameters. They are used by GetSolverSetting and
SetSolverSetting methods of MLX90251Advanced object.

Value
Constant Type Description

SSetMINRG 1032 Long Minimum allowed rough gain of


(long) solver. Default value is 0.
SSetMAXRG 1033 Long Maximum allowed rough gain of
(long) solver. Default value is 15.
SSetMINRGUI 1058 Long Minimum rough gain used by the
(long) solver. Default value is taken from the
SR. This is a READ ONLY parameter.
SSetMAXRGUI 1059 Long Maximum rough gain used by the
(long) solver. Default value is taken from the
SR. This is a READ ONLY parameter.
SSetTolerance 1034 Single Tolerance on the result of the solver.
(float) Default value is 1 [%].
SSetDisableTCTable 1035 Long When set to non zero the TC selector
(long) is disabled. Default value is 0.
SSetEnableAGNDCalculation 1036 Long When set to non zero enables the
(long) possibility to change the AGND. The
AGND will only be changed by the
solver when it is needed. Default
value is 0.
SSetDisableClampingSearchSolve 1042 Long When set to non zero the solver will
r (long) skip the Clamping search, set the
Clamp High code at 1023 and the
Clamp low code at 0. Default value is
0.
SSetCriticalTolerance 1053 Single Default value is 0.5 [%].
(float)
SSetEnableChangeOfFilter 1054 Long When set to non zero the filter of the
(long) MLX device will be changed at the
end of the solving routine. The value
can be referred by
SSetFilterRAMSolver. Default value is
0.
SSetFilterRAMSolver 1055 Long Set filter parameter of the MLX
(long) device. The filter parameter is
programmed if Solver setting
SSetEnableChangeOfFilter is enabled.
Default value is 15.

MLX90251 PSF Library Object Model Page 89 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

8.7 SolverResultCodes enumeration


A combination of the following constants is returned by many methods of MLX90251PSFDevice and
MLX90251Solver objects.

Value
Constant Description

SolvCodeOK 0 No error messages.

SolvCodeNOHW 1 The PC could not connect with the PTC programmer:


Check the connection between the PC and the PTC
programmer.

SolvCodeBadSequenc 2 This solver step can not be completed because the


e previous solver step failed:
Ö Repeat the previous solver step or restart the
solver sequence.

No targets are set or one or more targets are incorrect:


Ö Make sure that none of the targets are identical.

SolvCodeBadParity 4 The parity calculated by the program doesn’t match the


programmed parity of the device:
Ö This can be the result of an instable read back
cause by a bad connection with the device...
Ö The EEPROM content is really damaged. In this
case you can’t use this device anymore.

SolvCodeBadCRC 8 The CRC calculated by the program doesn’t match the


programmed CRC of the device:
Ö This indicates the TC table is unusable. This device
is not compatible for auto setting the TC: Disable
the TC selector as mentioned above.

SolvCodeMlxLockSet 16 Melexis Lock bit is programmed.

SolvCodeMemLockSet 32 MemLock bit is programmed.

SolvCodeVerifyFailed 64 The function Verify compares the content of the EEPROM


with the RAM content.

Verify Failed means that the EEPROM content (what is


programmed) doesn’t correspond with the RAM content
(what was meant to be programmed).

SolvCodeNoTCTable 128 If no TC table is found, the sequence is stopped. The use


of the TC table can be disabled under solver settings:
Ö This device is not compatible for auto setting the
TC: Disable the TC selector as mentioned above.

SolvCodeSameField 256 In both positions an estimate of the field is done. If the


difference between the two positions is to low, the
sequence is stopped.

MLX90251 PSF Library Object Model Page 90 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function 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...

SolvCodeOldTCTable 1024 If the software recognized an Old TC table, a message is


returned to the user:
Ö This is only a Warning: The device is not
compatible with the new TC-table but they still
could be used.

8.8 SolverStatusCodes enumeration


A combination of the following constants indicates which methods of the MLX90251Solver object
are allowed to be executed.
Value

Constant Description

SolverStatRB 1
SolverStatEP1 2
SolverStatEP2 4
SolverStatCP1 8
SolverStatPrg 16
SolverStatLck 32
SolverStatEP3 64
SolverStatCP2 128

MLX90251 PSF Library Object Model Page 91 of 92 25 August 2009


PTC04 - PSF - MLX90251
Product Specific Function description

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

For additional information contact Melexis Direct:

Europe, Africa, Asia: America:


Phone: +32 13 670 495 Phone: +1 603 223 2362
E-mail: sales_europe@melexis.com E-mail: sales_usa@melexis.com

ISO/TS 16949 and ISO14001 Certified

MLX90251 PSF Library Object Model Page 92 of 92 25 August 2009

Você também pode gostar