AN07-00180-3E
The rotation speed routine is written around Line 166 in the MAIN.C main function as shown in Figure
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 va lues.
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
{
←Calculation of the rotation
speed according to the
temperature sensor
gMtRevSpeed = 512;
gMtSpeedMax = 1024;
}
( omitted )
←Calculation of the rotation speed according to
the programmed variables
mtSetDuty(gMtRevSpeed,gMtSpeedMax);
← Speed setting
}
( omitted )
}
}
Figure 4-15 Rotation speed control
- 79 -
相关PDF资料
CANADAPT28 KIT ADAPTER CANDEMOBOARD 28PLCC
CAT24AA01WI-GT3 IC EEPROM SERIAL 1KB I2C 8SOIC
CAT24AA02WI-G IC EEPROM SERIAL 2KB I2C 8SOIC
CAT24C01ZI-G IC EEPROM SERIAL 1KB I2C 8MSOP
CAT24C03WI-G IC EEPROM SERIAL 2KB I2C 8SOIC
CAT24C04ZI-G IC EEPROM SERIAL 4KB I2C 8MSOP
CAT24C05YI-G IC EEPROM SERIAL 4KB I2C 8TSSOP
CAT24C08TDI-GT3 8KB I2C SER EEPROM TSOT 23
相关代理商/技术参数
CAN1671-15S 制造商:Techspray 功能描述:TECHSPRAY DUSTER 15 OZ FILL
CAN1747-10S 制造商:Techspray 功能描述:
CAN-24 制造商:Mencom 功能描述:
CAN4311111002451K 制造商:Yageo Corporation 功能描述:ANTENNA BLUETOOTH 2.45GHZ 制造商:Yageo / Phycomp 功能描述:ANTENNA, BLUETOOTH, 2.45GHZ
CAN4311111002701K 制造商:Yageo Corporation 功能描述:
CAN4311112001881K 制造商:Yageo Corporation 功能描述:
CAN4311113011582K 制造商:Yageo Corporation 功能描述:6230 Multilayer Ceramic Chip Antenna 制造商:Yageo Corporation 功能描述:6320 Multilayer Ceramic Chip Antenna
CAN4311115002451K 制造商:Yageo Corporation 功能描述: