Chapter 3
Adjustment
©
National Instruments Corporation
3-23
•
actualData
—
&desiredDutyCycle
•
measuredData
—
¤tDutyCycle
b.
Try the new “best-guess” by calling the function
ni54xx_SetDutyCycle
. Set the following parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
dutyCycle
—
50
c.
Measure the new duty cycle (
currentDutyCycle
).
If the measurement is outside your desired tolerance, repeat this loop. If you
have exited the loop, D0 must have the correct value, so there is no need to
call
ni54xx_CalAdjust
for D0 again.
You have completed adjusting the constant D0.
D1 Constant
1.
Set a 25% duty cycle by calling the function
ni54xx_SetDutyCycle
.
Set the following parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
dutyCycle
—
25
2.
Measure the duty cycle (
currentDutyCycle
).
3.
While the |measured duty cycle – 25| is larger than the tolerance:
a.
Call
ni54xx_CalAdjust
for D1_25. This calculates the next
“best-guess” based on the previous results. The
measuredData
should be a pointer to the measured duty cycle. The
actualData
should be a pointer to the desired duty cycle (in this case, 25).
Call
ni54xx_CalAdjust
using the following parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
measurementMode
—
NI54XX_SET_D1_25
•
actualData
—
&desiredDutyCycle
•
measuredData
—
¤tDutyCycle