HealthCtrlInfo Function
Returns the remaining months before the recommended replacement time for the specified Controller parts.
Syntax
HealthCtrlInfo(partType)
Parameters
- partType
- Specify the part that returns the number of months remaining until the recommended replacement time, either as an integer (1) or as one of the constants listed below.
Constant Value Mode HEALTH_CONTROLLER_TYPE_BATTERY 1 Specifies the batteries.
Return Values
Real number representing the remaining months before the recommended replacement time. (Unit: month)
Description
The remaining months are calculated based on the parts consumption rate from the past usage and the amount of change in the consumption rate obtained every operation of a period which is set in HealthCalcPeriod of the Controller.
Notes
Since the remaining months are calculated based on the amount of change in the consumption rate obtained every operation of a period which is set in HealthCalcPeriod of the Controller, they cannot be calculated properly in the following cases:
- If this command is executed when the operating time is less than every operation of a period which is set in HealthCalcPeriod.
- If this command is executed after the long-term operation stop period of the robot.
- If this command is executed after the parts consumption alarm is reset after the parts replacement.
- If the time and date on the Controller is changed.
In above cases, execute the command after operating the Controller more than twice of setting period in HealthCalcPeriod to display the accurate value.
See Also
HealthCtrlAlarmOn, HealthRateCtrlInfo
HealthCtrlInfo Function Example
The example below outputs the alarm when the recommended replacement time is in less than one month.
Function AlarmCheck
Real month
month = HealthCtrlInfo(HEALTH_CONTROLLER_TYPE_BATTERY)
If month < 1 Then
Print "Alarm ON"
EndIf
Fend