Signametrics
80
DMMPol
SMX2040
;
SMX2042
;
SMX2044
eading.
#include "sm2
nt
DMMPolle
Remarks
olledR
not ready it will return
. If the
, and the reading
laced a
pointed to by
lpdResult
. See
DMMPolledReadCmd
for
ails. D
MReady
to check for readiness since it will cause
ledRead
;
Description
Tests the DMM for ready status, and returns the next floating-point r
04032.h"
i
dRead(int
nDmm, double FAR *lpdResult)
DMMP
FALSE
ead
polls the DMM for readiness. If the DMM is
DMM is ready with a new reading it will return
TRUE
will be p
more det
t the location
o not use
DM
communication failure.
Parameter Type/Description
entifies the DMM. DMMs are numbered starting with zero.
lpdResul
Return Value
the following constants.
nDmm
int
Id
t
double FAR *
Points to the location to hold the next reading.
The return value is one of
Value Meaning
FALSE
TRUE
DMM is ready, and reading is placed at
lpdResult
Negative Value
Error code
Example
DMMPoll
Description
Send DMM
mand.
#include "sm204032.h"
int
DMMP
(
)
emarks
y with a prior Polled read process, this function will trigger the
read command. The DMM must be set to a specific range and
, IAC,
e,
operation. Measurement rate
must be 10 rps or higher. If FALSE is returned, the DMM is busy processing a prior
M_OKAY indicates the DMM accepted the read command and
ate. The DMM remains busy until it is ready with the next reading.
This function is useful where it is necessary to conserve CPU time and make the DMM a
polled device. Use
DMMPolledRead
or
DMMPolledReadStr
to test for readiness and
read measurement. Do not use
DMMReady
to check for readiness since it will cause
communication failure.
DMM is not ready
double read;
if(
edRead(0, &d)) fprintf(“%9.4f\n”,d);
DMMPolledReadCmd
SMX2040
;
SMX2042
;
SMX2044
;
Polled Read com
olledReadCmd int nDmm
R
If the DMM is not bus
DMM to execute a single
one of the following functions to use the polled read command: VDC, VAC, IDC
2-wire, 4-wire, 6-wire, or RTD function. Composite functions such as Capacitanc
Inductance, Peak-to-Peak etc. are not capable of polled read
polled read. A DM
entered the busy st
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com