Signametrics
46
Return Value
The return value is one of the following constants.
Value
Meaning
DMM_OKAY
Function succeeded.
Negative Value
Error code
Example
status = DMMSetAutoRange(0, TRUE); /* enable autoranging */
DMMSetFunction
Description
Set the DMM function.
#include "SM2060.h"
#include "DMMUser.h"
int
DMMSetFunction
(
int
nDmm, int nFunc
)
Remarks
This function selects the DMM’s measurement function. The DMMUser.h file contains a
table of values defined as
VDC
,
VAC
,
IAC
,
IDC
,
OHMS4W
,
OHMS2W etc..
. Not all
functions are available for all DMM types.
Parameter
Type/Description
nDmm
int
Identifies the DMM. DMMs are numbered starting with zero.
nFunc
int
A pre-defined constant corresponding to the desired function.
Return Value
The return value is one of the following constants.
Value
Meaning
DMM_OKAY
DMM initialized successfully.
Negative Value
Error code
DMM_E_FUNC
Invalid DMM function.
Example
status = DMMSetFunction(0, IDC); // Set for DC current
DMMSetRange
Description
Set the DMM range for the present function.
#include "SM2060.h"
int DMMSetRange
(
int
nDmm, int nRange
)
Remarks
This function sets the range used by the DMM for the present function. The table of
values is defined by the
_240mV, _2400uA, etc.
In general, the lowest range is 0, next is
1 etc. Each function has a pre defined number of ranges as specified in the specification
section of this manual. Not all ranges are available for all DMM types. For instance the
SM2064 has a 24 Ohms and 240Meg range, while the SM2060 and SMX2055 do not.