3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
107
3
CCPU_SysClkRateSet
This function saves the specified system clock rate in the backup RAM.
■
Format
short CCPU_SysClkRateSet(short sTicks, short* psRestart)
■
Argument
■
Description
• This function saves the system clock rate specified to the clock rate (sTicks) in the backup RAM.
The specified system clock rate will be enabled after restarting a C Controller module.
• When the output to the restart necessity flag (psRestart) is '0' (restart is not required), continue the application processing.
• When the output to the restart necessity flag (psRestart) is '1' (restart is required), stop the application processing, and
reset the C Controller module or turn the power OFF and ON.
• For more details on system clock rate, refer to the manual for VxWorks.
Precautions
• Execute this function only once after a C Controller module is started.
If this function is executed by specifying the same clock rate value as the first time, the restart necessity flag (psRestart) will
be '0' (restart is not required) regardless of the system clock rate value in operation.
• Use this function to change the system clock rate.
If the sysClkRateSet function of VxWorks is used, the operation of VxWorks will be unstable.
■
Return value
■
Relevant function
Argument
Name
Description
IN/OUT
sTicks
Clock rate
Specify the system clock rate in the unit of clock frequency (Hz) per one second.
• 0: Default value (60 Hz)
• 60 to 1000: Specified clock rate value
IN
psRestart
Restart necessity flag
Stores the necessity to restart a C Controller module after the execution of this function.
(When 'NULL' is specified, the restart necessity flag is not stored.)
• 0: Restart is not required. (C Controller module has already been running at the
specified clock rate.)
• 1: Restart is required. (C Controller module operates at the specified clock rate after
restarting it.)
OUT
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......