Data Logging - Omron CX-SUPERVISOR - V2.0 User Manual

Table of Contents

Advertisement

CHAPTER 17 – Best Practices
Never use 'On Regular Interval' scripts
You should (almost!) never need to use 'On Regular Interval' scripts. Always question:
If it is used for logging - use the logging facilities instead
If it is used for timing - use PLC ladder instead as this is much more reliable.
When they start with (or contain) "IF <condition> THEN ..." you should probably be
using an "On Condition" script using <condition> from the IF statement.
When they perform calculations on PLC or memory points (e.g. "Z = X * Y), use "On
Condition" to recalculate when the source data changes e.g. with a condition X || Y ||
TRUE (which forces execution even if value changes to value 0). This will guarantee
the calculated is up to date with the latest source information, plus stress the system
much less while the value doesn't change.
Never use Sleep() command
You should (almost!) never need to use the Sleep command. It can also create confusing applications
as it can create re-entrant scripts and asynchronous PLC communications. Always question:
If it is used for timing - use PLC ladder instead as this is much more reliable.
Consider if the code following the Sleep should in fact be executed on an event e.g.
after completion flag returned from PLC instruction or new data value etc
Use Animations if possible
Always choose direct object animations in preference to page/object scripts: blink, colour, disable,
height, width, horizontal%fill, vertical%fill, move, rotate, display and close. These are both quicker
and clearer.
Keep scripts short
Although the script editor can manage hundreds of lines this would suggest a serious design problem.
Consider 30 lines as a practical maximum

Data Logging

This section covers some data logging related good practices.
Utilise Data Logging performance
Always use the inbuilt Data Logging in preference to trend graphs or file I/O functions, as the
performance is far superior.
Always use "On Change"
Always log data "On Change". There is no sampling error and CPU, disk activity and storage
required are almost certainly reduced.
Page 260
OMRON
Release 2.0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents