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

Controller module
Table of Contents

Advertisement

CCPU_EntryTimerEvent
This function registers a timer event.
Format
short CCPU_EntryTimerEvent (long* plEvent)
Argument
Argument
Name
plEvent
Registered event
The specification method for the registered event (plEvent) is as follows:
plEvent
Description
plEvent[0]
Number of timer event settings (1 to 16)
plEvent[1]
First timer event number (1 to 16)
plEvent[2]
Cycle of the first timer event (0: Clear, 1 to 60,000: Cycle [ms])
plEvent[3]
Synchronization type of the first timer event (0: Batch synchronization, 1: Individual
synchronization)
plEvent[4]
Second timer event number (1 to 16)
plEvent[5]
Cycle of the second timer event (0: Clear, 1 to 60,000: Cycle [ms])
plEvent[6]
Synchronization type of the second timer event (0: Batch synchronization, 1: Individual
synchronization)
plEvent[7]
Third timer event number (1 to 16)
plEvent[8]
Cycle of the third timer event (0: Clear, 1 to 60,000: Cycle [ms])
plEvent[9]
Synchronization type of the third timer event (0: Batch synchronization, 1: Individual
synchronization)
When setting the timer event cycle, only the following specification method is applicable.
• For 1 to 1000: Specify multiples of 5 (by 5 milliseconds)
• For 1000 to 60,000: Specify multiples of 1000 (1 s units)
Description
• This function sets the cycle and synchronization type for the timer event registration.
• When '0' is specified for the cycle of the registered event (plEvent), the timer event is deregistered (the occurrence is
cleared). Deregistration will clear the events that have occurred before that.
• Up to 16 timer events can be set. The cycle (1 to 60,000 [ms]) and synchronization type (batch synchronization or individual
synchronization) can be specified for each timer event. For the synchronization type, refer to the description of the
CCPU_WaitTimerEvent function.
• Specify the timer event number without duplication. Otherwise, an error will be returned.
• To change the cycle of a timer event number that the cycle is already set, clear it (specify '0' to the cycle), and then register
the cycle (specify the cycle) again. Otherwise, an error will be returned.
• The registered timer event can be placed into the wait state with the CCPU_WaitTimerEvent function.
• All the timer events are cleared at the initial status.
Description
Specify a timer event to be registered.
First timer event setting
Second timer event setting
Third timer event setting
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
91

Advertisement

Table of Contents
loading

Table of Contents