beautypg.com

Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 143

background image

Floating Point Values on the 1775ĆS4B Scanner

Appendix B

BĆ2

The program shown in figure B.1 performs the floating point conversion
routine. The following words contain constants and must be entered as
shown
:

N0:l = 1
N0:2 = 0

F0:6 = 1 E-38
F0:7 = 9.99999 E-1
F0:8 = 1 E I
F0:9 = 9.99999 E0
F0:10 = 1 E 0
F0:11 = 1 E 6

CAUTION: Failure to enter these constants as shown above
prior to going to run mode may cause a watchdog timeout
which will shut down the PLC-3 processor.

Additional data table usage is as follows:

F0:0 new floating point value
F0:l old floating point value
F0:2 storage word
F0:3 storage word
F0:4 storage word
F0:5 storage word

C0 less than range counter (preset must be < 40)
Cl greater than range counter (preset must be > 40)
C2 watchdog counter (preset must equal 40)

N0:0 storage word
H0:0 result word
H0:l result word
H0:2 result word

B0:0/0 One-shot bit
B0:0/l Conversion complete (in range) flag bit
B0:0/2 Multiply flag bit
B0:0/3 Divide flag bit
B0:0/4 Negate result flag bit
B0:0/5 Conversion fault flag bit

B.2
Program Explanation