beautypg.com

11ć6 – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 131

background image

Using Report Generation Functions

Chapter 11

11Ć6

If you use the to_bcd function:

$D:0 = TO(10)

The value 10 converts to:

0000 0000 0001 0000

Definition: To convert an expression from BCD to its binary.

Abbreviation: F

Format: F ()

Description: The from_bcd function performs the opposite operation to the
to_bcd function. It converts expression to a 32 bit BCD number and returns
the binary representation.

Example using the from_bcd function:

If you enter:

F($D:0)

If decimal file 0 contains the BCD value (0000 0000 0001 0000). The
from_bcd function converts $D:0 to the binary bit pattern.

0000 0000 0000 1010

In this chapter, you read about the functions that you can use to tell the
1775-S4B what to do. Functions must be accompanied by a command for
proper execution. Report generation supports two types of functions:

Input access functions give you the capability of entering characters into

a procedure during procedure execution.

Format conversion functions give you the capability of expressing

values in binary or binary coded decimal format.

The next chapter describes factors that affect 1775-S4B scanner execution
time.

11.3.2
From_bcd

11.4
Chapter Summary