C - using counter variables in basic programs, Appendix c, Using counter variables in basic programs – Rockwell Automation AutoMax Enhanced Ladder Language Reference Manual User Manual

Page 299

Advertising
background image

CĆ1

Appendix C

Using Counter Variables in BASIC Programs

You can use counter elements in BASIC programs. To do this, you must declare the

counter as a global, double integer array. For example, COMMON COUNTER!(4). The

elements of the counter data structure can be accessed as follows:

Element:

Description:

0

Current

1

CPreset

2

Reserved for system

3

bit 7

LD

bit 15

CR

bit 23

QD

bit 31

QU

4

Reserved for system

WARNING

DO NOT MODIFY TIMER ELEMENTS 0, 1, 3, AND 4 FROM A BASIC PROGRAM.

THIS WILL CAUSE THE TIMER TO OPERATE INCORRECTLY, RESULTING IN

UNPREDICTABLE MACHINE OPERATION.

Advertising