Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 143

Controller module
Table of Contents

Advertisement

CCPU_SysClkRateSet
This function saves the specified system clock rate in the backup RAM.
Format
short CCPU_SysClkRateSet(short sTicks, short* psRestart)
Argument
Argument
Name
sTicks
Clock rate
psRestart
Restart necessity flag
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 details on the system clock rate, refer to the manual for VxWorks.
• When a C Controller module is initialized, the system clock rate is set to the default value (60 Hz).
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
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following:
Page 225 ERROR CODE LIST
Relevant function
• Page 140 CCPU_SysClkRateGet
Description
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
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.)
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
OUT
141

Advertisement

Table of Contents
loading

Table of Contents