Chapter 3
Adjustment
3-24
ni.com
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
—
25
c.
Measure the new duty cycle (
currentDutyCycle
).
4.
Set a 75% duty cycle by calling the function
ni54xx_SetDutyCycle
.
Set the following parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
dutyCycle
—
75
5.
Measure the duty cycle (
currentDutyCycle
).
6.
While the |measured duty cycle – 75| is larger than the tolerance:
a.
Call
ni54xx_CalAdjust
for D1_75. 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, 75).
Call the function
ni54xx_CalAdjust
using the following
parameters:
•
sessionHandle
—The handle of the calibration session for the
device
•
measurementMode
—
NI54XX_SET_D1_75
•
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
—
75
c.
Measure the new duty cycle (
currentDutyCycle
).
7.
After you have determined D1_25 and D1_75, you must call
ni54xx_CalAdjust
one last time. The measurement mode parameter
should be
NI54XX_SET_D1
and both the
actualData
and
measuredData
should be NULL. Call the function
ni54xx_CalAdjust
using the following parameters: