beautypg.com

Rockwell Automation AutoMax Enhanced Ladder Language Reference Manual User Manual

Page 300

background image

CĆ2

Within a BASIC program you may want to:

D change a counter's preset
D use the Current element of a counter for data display, logic sequencing, or other purposes
D monitor the status of a counter

To change the preset value by using a BASIC statement

D Enter a statement in this format:

name!(1)=new_preset_value
where NAME! is the name of the counter variable

The value of 1 is the location of the element CPreset within a Counter data type.
Example:
COUNTER1!(1)=50
This statement is setting the preset value for the global variable COUNTER1 to 50.

To specify the Current element of a counter in a BASIC statement

D Enter the variable in this format:

NAME!(0)
where NAME is the name of the counter variable

The value of 0 is the location of the element Current within a Counter data type.