beautypg.com

B - floating point values on the 1775-s4b scanner – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 142

background image

Appendix

B

BĆ1

Floating Point Values on the

1775ĆS4B Scanner

This appendix gives you a ladder diagram program which you can use to
access floating point numbers on the 1775-S4B scanner.

Since the 1775-S4B scanner does not directly allow access to floating point
numbers, a technique is desirable to allow access to these numbers for use
in report generation. The following program which is described in detail in
section B.2 allows you to input a floating point into the floating point file
0, word 0 (F0:0) in the data table. The program breaks the number apart
and places the result into high order integer (H) file 0 words 0, 1, and 2
(H0:0, H0:l, H0:2). The converted format is:

(+ or - A). (BBBBBB) E

(+or-C)

where:

H0:0 = (+ or - A)
H0:l = (BBBBBB)
H0:2 = (+ or - C)

These three words can then be reformatted into usable print statements. An
example print statement could be:

P 0 ‘.’ 1!-06D ‘E’ 2!+2D

The ladder diagram program is given in figure B.l.

B.0
Appendix Objectives

B.1
Introduction