<< Prev        Next >>

ID : 5539

#Pragma Optimize( "wait-idling-time" )

Function

Specify the length of rest-time on Wait command per task.

Syntax

#Pragma Optimize( "wait-idling-time", time )

Guaranteed entry

Time
Specify the length of rest-time on Wait command by an integer of 1 to 1000. Unit is "ms".

Description

If two or more tasks run Wait command simultaneously, the process of the controller may be overloaded; that may prevent smooth processing. In that case, use #Pragma Optimize command to optimize controller's task processing.
#Pragma Optimize command adjusts the rest-times on each task so as to reduce the processing load on the controller; that enhances processing speed.

Related Terms

Wait

Attention

-

Example

' In waiting state with Wait command,
' place priority on I/O waiting of Pro1.
' Set rest-time of 100ms for other Pro<n>s so as to reduce processing load.

'Pro1.pcs

Sub Main 

  Wait IO[128] = ON

End Sub


'Pro<n>.pcs

#Pragma Optimize( "wait-idling-time", 100 )
Sub Main 

  Wait I[0] = 1

End Sub

ID : 5539

<< Prev        Next >>