<< Prev        Next >>

ID : 3961

#Pragma Optimize( "idling" )

Function

To reduce CPU load, this command reduces idle time.

Syntax

#Pragma Optimize( "idling", off )
	'Statements
#Pragma Optimize( "idling", on )

Guaranteed Entry

#Pragma Optimize( "idling", off )
Reduces idle time of 3ms.
#Pragma Optimize( "idling", on )
Places idle time of 3ms.

Description

In PacScript, idle time of 3ms is placed in every 80ms operation to reduce CPU load. (The duration of idle time can be changed. For information of changing methods, refer to "Displaying and Changing Program Parameters" of "TP App Operation Guide.)
This command is used for the high-priority program whose idle time of 3ms is unnecessary. This could help to shorten the cycle time.

Attention

If more than one program is running, other program can be slowed down.

Example

'!TITLE "Sample Pragma optimize"

Sub Main 
	TakeArm Keep = 0

'Reduces idle time of 3ms.  
#Pragma 	Optimize( "idling", Off )

	Set IO10
	Set IO20

'Places idle time of 3ms.
#Pragma 	Optimize( "ildling", On )

	Move P, P1
End Sub

ID : 3961

<< Prev        Next >>