Class DiBCD
Version 1.0
Modified 08-MAR-2026 11:05:32.00
Code rt_plc_io.c
 Digital input Binary Coded Decimal.

 Represents four binary coded decimal (BCD) digits (= 16
 digital signals) on a decimal floating point number.

 The name of the inputs indicating which dignity every
 single input represents.
 The inputs could be connected to thumb wheels etc.

 BCD0 - BCD3 represents integers in the interval {0,1,...,9}
 BCD4 - BCD7 represents integers in the interval {10,20,...,90}
 BCD8 - BCDB represents integers in the interval {100,200,...,900}

Example
 1  BCD1 = BCD4 = BCD7 = TRUE and the rest FALSE.

    VAL gets the value BCD1 * 2 + BCD4 * 10 + BCD7 * 80 = 92
    and err becomes FALSE, i.e. zero
 2  BCD1 and BCD3 set ( 2 + 8 ). Such a combination is
    impossible !

    VAL = last valid value and err is TRUE, i.e. one

Hints
 More DiBCD objects can be connected in parallel to
 additional BCD-input signals.

See Also



RtBody attributes pwr_sClass_dibcd
Boolean BCD0 1 BCD0 - BCD3 defines the ones digit.
Boolean BCD1 2
Boolean BCD2 4
Boolean BCD3 8
Boolean BCD4 10 BCD4 - BCD7 defines the tens digit.
Boolean BCD5 20
Boolean BCD6 40
Boolean BCD7 80
Boolean BCD8 100 BCD8 - BCDB defines the hundreds digit.
Boolean BCD9 200
Boolean BCDA 400
Boolean BCDB 800
Boolean BCDC 1000 BCDC - BCDF defines the thousands digit.
Boolean BCDD 2000
Boolean BCDE 4000
Boolean BCDF 8000
Float32 ActVal VAL Last valid value, if Error is FALSE.
Boolean Error err Error flag. FALSE means that the ActVal is reflecting
the inputs; TRUE means that some error has occurred in
the last conversion.
Boolean Inv inv TRUE means that all inputs shall be inverted. If, for
example, only the first 4 bits are used in an
application, the remaining 12 bits have to be set TRUE
in the development environment, or else an error is
introduced.

DevBody attributes 
PlcNode PlcNode  


GraphPlcNode
object_type 80
parameters[0] 16
parameters[1] 0
parameters[2] 2
parameters[3] 0
subwindows 0
graphmethod 0 (standard, individual attributes)
graphindex 0
default_mask[0] 65535
default_mask[1] 1
segname_annotation 1
compmethod 4
compindex 0
executeordermethod 2
objname DiBCD
graphname DiBCD
debugpar


Attributes detail


BCD0 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 1
Body RtBody
 BCD0 - BCD3 defines the ones digit.

BCD1 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 2
Body RtBody

BCD2 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 4
Body RtBody

BCD3 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 8
Body RtBody

BCD4 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 10
Body RtBody
 BCD4 - BCD7 defines the tens digit.

BCD5 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 20
Body RtBody

BCD6 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 40
Body RtBody

BCD7 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 80
Body RtBody

BCD8 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 100
Body RtBody
 BCD8 - BCDB defines the hundreds digit.

BCD9 Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 200
Body RtBody

BCDA Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 400
Body RtBody

BCDB Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 800
Body RtBody

BCDC Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 1000
Body RtBody
 BCDC - BCDF defines the thousands digit.

BCDD Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 2000
Body RtBody

BCDE Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 4000
Body RtBody

BCDF Input
Class Input
Type Boolean
Flags STATE | NOEDIT
GraphName 8000
Body RtBody

ActVal Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName VAL
Body RtBody
 Last valid value, if Error is FALSE.

Error Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName err
Body RtBody
 Error flag. FALSE means that the ActVal is reflecting
 the inputs; TRUE means that some error has occurred in
 the last conversion.

Inv Intern
Class Intern
Type Boolean
Flags
GraphName inv
Body RtBody
 TRUE means that all inputs shall be inverted. If, for
 example, only the first 4 bits are used in an
 application, the remaining 12 bits have to be set TRUE
 in the development environment, or else an error is
 introduced.

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody