Download Print this page

Mitsubishi Electric MELIPC MI5000 Series User Manual page 151

Hide thumbs Also See for MELIPC MI5000 Series:

Advertisement

14
TIMER EVENT FUNCTION
This function reports events to user programs at a specified cycle.
This function can be used to create timer tasks to be run periodically.
Timer
Specify the following items, and then the timer is run.
Up to 16 timers can be run, and each value can be specified individually.
Item
cycle
Synchronization type
A time of this function operates after registering a timer in a user program.
The event is reported when the timer reaches the specified cycle, and the waiting status of the user program waiting for the
notification of the event is cleared.
The events of all timers enter a non-occurrence status when the power supply of this product is turned from OFF to ON or the
product is reset.
■Timer cycle
The timer cycle unit that can be specified differs by the value.
• 1 to 10: specify in 1 ms units.
• 10 to 1,000: specify in 5 ms units. (Specify in multiples of 5)
• 1,000 to 60,000: specify in 1,000 ms units. (Specify in multiples of 1,000)
The timer does not run when other values are specified.
Timers to be run once can be stopped by specifying "0" for the cycle. Stop the timer once to change the cycle.
■Timer synchronization type
The operation of the user program (task) to receive notification of an event of a timer changes by the synchronization type.
Item
Batch synchronization
Individual synchronization
Timer event settings
Configure timer events by a C Controller module dedicated function.
■Function list
Function name
CCPU_EntryTimerEvent
CCPU_WaitTimerEvent
For details on the C Controller module dedicated functions, refer to the following manual.
MELIPC MI5000 Series Programming Manual (VxWorks)
Description
Specify the cycle for the timer to report an event.
Specify the type of event to be reported by the timer.
Description
Clears the waiting status of all user programs waiting for events when a timer event was reported. All tasks running
user programs waiting for events are run.
If there is no task waiting for an event or a task enters a wait status by a user program later when timer event is
reported, the waiting status is not cleared until the timer event is reported again, even when a user program is in a
timer event waiting status.
Clears the waiting status of one user program waiting for an event when a timer event was reported. When multiple
user programs are waiting for the same event report, waiting status is cleared in priority order of the tasks run by the
user program. (If the priority order is the same, clearing is done in the execution order of waiting processing. )
If there is no task waiting for an event when timer event is reported, the waiting status is immediately cleared if the
user program is placed in a waiting status after the notification.
Description
Registers a timer event.
Waits for a timer event to occur.
range
0, 1 to 60000 ms
• Batch synchronization
• Individual synchronization
14 TIMER EVENT FUNCTION
14
149

Advertisement

loading

This manual is also suitable for:

Melipc mi5122-vw