DCB real-valued function DCB real-valued function Syntax DCB (value) Function Convert BCD digits into an equivalent integer value. Usage Considerations No more than four BCD digits can be converted. The DCB function is most often used with the BITS real-valued function to decode input from the digital input signal lines. Parameter value Real value interpreted as a binary bit pattern representing up to four BCD digits. NOTE: An error is reported if any digit is not a valid BCD digit. That is, if a digit is greater than 9.
Example If external input signals 1001-1008 (8 bits of input) receive two BCD digits from an external device, then the instruction input = DCB(BITS(1001, 8)) sets the real variable input equal to the integer equivalent of the BCD input on the specified signals. Related Keyword BCD real-valued function eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 147