Obsolete Features; Windows Nt, Windows Me, Windows 98 And Windows 95; Sleep; D.2 Sleep - Omron CX-Supervisor Reference Manual

Script language reference
Hide thumbs Also See for CX-Supervisor:
Table of Contents

Advertisement

Windows NT, Windows ME, Windows 98 and Windows 95

D.1 Windows NT, Windows ME, Windows 98 and Windows 95

D.2 Sleep

Note:
Note:
Note:
Note:
This appendix provides a summary of features that are obsolete and have
been removed from the standard documentation. Details are included here to
assist maintaining old projects still using these features. These features
should not be used in development of new solutions as it is likely support for
the following features may and will be removed from the next or future
releases.
This product will no longer install on these operatinf systems. It is
recommended to upgrade to a later Windows version.
Description
Pause execution of a script for specified duration.
Syntax
Sleep (duration)
Remarks
Argument
Type
Duration
- - -
Typical Example

Sleep (1000)

CX-Supervisor waits 1 second.
The sleep statement should be used with caution, as some other parts of the
system may not be updated while a script is sleeping. It also uses
multithreading which means some tasks like PLC communication may occur in
parallel and behave unpredictably.
In a well designed, truly event driven system use of the Sleep() statement
should never be required. Always consider if the statements after the Sleep
should be in their own script, executed when a Condition occurs.
The Granularity (or intervals) differs between Operating Systems. In Windows
NT (and 2000) expiration is checked every 10ms, so 'Sleep(100)' actually
pauses for any time between 100 to 109.99 milliseconds depending on when it
was started. For Windows 98 (and ME) the granularity is 55ms so 'Sleep(100)'
actually pauses for 110 (2 times 55) to 164.99 milliseconds (nearly 3 times 55).
For this reason, Sleep statements can act differently on different Operating
Systems making the application OS dependant.
Sleep should never be used as a delay for timing processes, for the following
reasons:
The actual time delay depends on the OS as described above
There is always an error of 0 to 1 granularity, depending on when the
action is started.
The frequency can not be guaranteed as the OS may be busy, or handling
other processes.
Appendix D Obsolete Fea-

Obsolete Features

Description
Number of milliseconds to wait before
continuing.
Appendix D
143

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents