3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
65
3
CCPU_EntryTimerEvent
This function registers a timer event.
■
Format
short CCPU_EntryTimerEvent (long* plEvent)
■
Argument
The specification method of the registered event (plEvent) is as follows:
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 to 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.
■
Return value
■
Relevant function
• Page 114 CCPU_WaitTimerEvent
Argument
Name
Description
IN/OUT
plEvent
Registered event
Specify a timer event to be registered.
IN
plEvent
Description
plEvent[0]
Number of timer event settings (1 to 16)
plEvent[1]
First timer event number (1 to 16)
First timer event setting
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)
Second timer event setting
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)
Third timer event setting
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)
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: ......