Figure 4-15 Rotation Speed Control - Fujitsu FR Family FR60 Lite User Manual

32-bit microcontroller bits pot red can motor board
Hide thumbs Also See for FR Family FR60 Lite:
Table of Contents

Advertisement

The rotation speed routine is written around Line 166 in the MAIN.C main function as shown in "Figure
4-15 Rotation speed control".
When the temperature sensor is used, the rotation speed is determined in the range of 0 to 100% by a
conversion according to the A/D value obtained from the temperature sensor and the upper limit. When
the programmed variables are used, the rotation speed is determined in the range of 0 to 100% by a
conversion according to the specified current and upper limit values.
void main(void)
{
omitted
(
)
/* main loop */
while (1)
{
if (!gCanEnableFlag)
{
/* Set motor turn speed */
if (gTempEnableFlag)
{
/* get an A/D channel */
ad = adGetValue();
ad = ad > TEMP_AD_VALUE_00 ? TEMP_AD_VALUE_00 : ad;
ad = ad < TEMP_AD_VALUE_09 ? TEMP_AD_VALUE_09 : ad;
/* calc motor turn speed */
gMtSpeedMax = TEMP_AD_VALUE_00 - TEMP_AD_VALUE_09;
gMtRevSpeed = gMtSpeedMax - (ad - TEMP_AD_VALUE_09);
omitted
(
}
else
{
gMtRevSpeed = 512;
gMtSpeedMax = 1024;
}
omitted
(
mtSetDuty(gMtRevSpeed,gMtSpeedMax);
}
omitted
(
)
}
}
)
←Calculation of the rotation speed according to
the programmed variables
)

Figure 4-15 Rotation speed control

- 79 -
AN07-00180-3E
←Speed setting
←Calculation of the rotation
speed according to the
temperature sensor

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb91f267n

Table of Contents