EDH0162En1040 – 06/99
2.42
MM4005
Local Mode
Set a bit on the I/O output port.
This function will generate a command that sets an I/O output bit to a spec-
ified state. Use the numeric keypad to enter a number between 1 and 8 to
select a bit or enter 0 to set all bits and then press
to accept the
selection. Next, press the
key to specify the operation to be per-
formed on the bit: set high, set low or toggle. Press the
key to
accept the entry and return to the Line Entry menu.
Commands generated
CB
— Clear I/O output bit.
SB
— Set I/O output bit.
TG
— Toggle I/O output bit.
When all entries have been made on a command line, use the
key
to find the screen in the Line Entry menu that has the
function key
and press it to save the line in memory and advance to a new one.
2.4.2.2
WHILE Loop Creation
As mentioned earlier, the Program Creation menu offers the choice of cre-
ating simple while loops.
NOTE
Programs created from the front panel can have only simple while loops.
Remote programs could have up to 100 nested loops.
From the Program Creation menu press the
key. The next selection
you have to make is the type of while loop. The controller can do a check
on an I/O input bit or a variable, thus the two choices are
and
.
Pressing the
key will start a loop that repeats while an I/O input bit
has a specified state. First enter a bit number between 1 and 8 on the key-
pad, press
and then using the
key select the bit state.
When done, press the
key to accept the entry.
If you want to create a loop that repeats a specified number of times, at the
while selection menu press the
key. The next choice you have to
make is the number of times you want to repeat the loop. Enter the number
on the keypad and press
. The controller will write the necessary
commands to initialize a new variable, to increment it every time the loop
executes and to verify that it reached the specified number.
After defining the initial loop parameters, the display shows the WHILE
Loop menu with two choices:
Pressing
will enter a Line Entry menu identical to the one
described in the Command Line Creation paragraph. Use it to create com-
mand lines that will be part of the while loop. Enter command lines as
described in the previous paragraph. When a line is terminated, the display
returns to the WHILE Loop menu. To enter a new line, press the
key again and repeat the operation.
To close the while loop, press the
key. This will add the appropri-
ate command to close the loop and return the display to the Program
Creation menu.
WEND
LINE
LINE
WEND
LINE
VALID
VAR.
VALID
CHANGE
VALID
INPUT
VAR.
INPUT
WHILE
VALID
NEXT
VALID
CHANGE
VALID
OUTPUT
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com