Installation manual

Publication 1747-RM001G-EN-P - November 2008
G-12 Application Example Programs
The following rung will convert the BCD thumbwheel value from BCD to integer. This is done because the
processor operates upon integer values. This rung also "debounces" the thumbwheel to
ensure that
conversion only occurs on valid BCD values. Note that invalid BCD values can occur while the
operator is
changing the BCD thumbwheel. This is due to input filter propagation delay differences between the 4 input
circuits that provide the BCD input
value.
0004
S:1
15
First Pass
EQU
Equal
Source A N7:13
0<
Source B N7:14
0<
EQU FRD
From BCD
Source N7:14
0000h <
Dest N7:12
0<
FRD
S:0
1
Processor
Arithmetic
Underflow/
Overflow
Flag
U
S:5
0
Overflow
Trap
MOV
Move
Source N7:14
0<
Dest N7:13
0<
The following rung will ensure that the operator cannot select a paper thickness of 0. If this were allowed, the
drill bit life calculation could be defeated resulting in poor quality holes due to a dull drill bit. Therefore the
minimum paper thickness that will be used to calculate drill bit wear is ΒΌ".
0005
EQU
Equal
Source A N7:12
0<
Source B 0
0<
MOV
Move
Source 1
1<
Dest N7:12
0<