| Volume pwrb | |
| Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class BCDDo
|
||
|---|---|---|
| Version | 1.0 | |
| Modified | 08-MAR-2026 11:05:32.00 | |
| Code | rt_plc_io.c | |
Binary Coded Decimal Digital output.

Represents a decimal floating point number on 4 binary coded decimal (BCD) digits (= 16 digital signals). Overflow is taken into account. The input signals are truncated to the next lower integer. A negative input signal sets all output signals equal to 0. Several BCDDo objects can be connected in series to manage numbers >= 10000. The name of the outputs indicating which dignity every single output represents. Used for example to govern a character display.Example
Suppose the input signal has the value 235 016.7
The BCD-value becomes 5016 because
BCD1 and BCD2 are both set => 6
BCD4 is set => 10
BCDC and BCDE are both set => 5000
Rest is equal to 23. It is possible to connect the
output Rest to the input In of a second BCDDo object.
In that case also the the decimal digits are
representing 10 000 and 100 000 binary coded decimal.
See Also| RtBody attributes pwr_sClass_bcddo | |||
|---|---|---|---|
| Float32 | In | IN | Positive analog value that should be binary coded decimals. When the input is connected the outer signal is regarded, otherwise the attribute In. |
| Boolean | BCD0 | 1 | BCD0 - BCD3 define the units digit. The following table shows which values the output signals represent as FALSE respectively TRUE: BCD0 BCD1 BCD2 BCD3 FALSE 0 0 0 0 TRUE 1 2 4 8 |
| Boolean | BCD1 | 2 | |
| Boolean | BCD2 | 4 | |
| Boolean | BCD3 | 8 | |
| Boolean | BCD4 | 10 | BCD4 - BCD7 define the tens digit. The following table shows which values the output signals represent: BCD4 BCD5 BCD6 BCD7 FALSE 0 0 0 0 TRUE 10 20 40 80 |
| Boolean | BCD5 | 20 | |
| Boolean | BCD6 | 40 | |
| Boolean | BCD7 | 80 | |
| Boolean | BCD8 | 100 | BCD8 - BCDB define the hundreds digit. The following table shows which values the output signals represent: BCD8 BCD9 BCDA BCDB FALSE 0 0 0 0 TRUE 100 200 400 800 |
| Boolean | BCD9 | 200 | |
| Boolean | BCDA | 400 | |
| Boolean | BCDB | 800 | |
| Boolean | BCDC | 1000 | BCDC - BCDF define the thousands digit. The following table shows which values the output signals represent: BCDC BCDD BCDE BCDF FALSE 0 0 0 0 TRUE 1000 2000 4000 8000 |
| Boolean | BCDD | 2000 | |
| Boolean | BCDE | 4000 | |
| Boolean | BCDF | 8000 | |
| Float32 | Rest | RES | Input signal divided by 10 000, or the value of the IN-signal if this is less than zero (= an impossible value). |
| DevBody attributes | |||
|---|---|---|---|
| PlcNode | PlcNode | ||
| GraphPlcNode | |
|---|---|
| object_type | 79 |
| parameters[0] | 1 |
| parameters[1] | 0 |
| parameters[2] | 17 |
| parameters[3] | 0 |
| subwindows | 0 |
| graphmethod | 0 (standard, individual attributes) |
| graphindex | 0 |
| default_mask[0] | 1 |
| default_mask[1] | 65535 |
| segname_annotation | 1 |
| compmethod | 4 |
| compindex | 0 |
| executeordermethod | 2 |
| objname | BCDDo |
| graphname | BCDDo |
| debugpar | |
| In Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | IN | |
| Body | RtBody | |
Positive analog value that should be binary coded decimals. When the input is connected the outer signal is regarded, otherwise the attribute In.
| BCD0 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 1 | |
| Body | RtBody | |
BCD0 - BCD3 define the units digit. The following table
shows which values the output signals represent as
FALSE respectively TRUE:
BCD0 BCD1 BCD2 BCD3
FALSE 0 0 0 0
TRUE 1 2 4 8
| BCD1 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 2 | |
| Body | RtBody | |
| BCD2 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 4 | |
| Body | RtBody | |
| BCD3 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 8 | |
| Body | RtBody | |
| BCD4 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 10 | |
| Body | RtBody | |
BCD4 - BCD7 define the tens digit. The following table
shows which values the output signals represent:
BCD4 BCD5 BCD6 BCD7
FALSE 0 0 0 0
TRUE 10 20 40 80
| BCD5 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 20 | |
| Body | RtBody | |
| BCD6 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 40 | |
| Body | RtBody | |
| BCD7 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 80 | |
| Body | RtBody | |
| BCD8 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 100 | |
| Body | RtBody | |
BCD8 - BCDB define the hundreds digit. The following
table shows which values the output signals represent:
BCD8 BCD9 BCDA BCDB
FALSE 0 0 0 0
TRUE 100 200 400 800
| BCD9 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 200 | |
| Body | RtBody | |
| BCDA Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 400 | |
| Body | RtBody | |
| BCDB Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 800 | |
| Body | RtBody | |
| BCDC Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 1000 | |
| Body | RtBody | |
BCDC - BCDF define the thousands digit. The following
table shows which values the output signals represent:
BCDC BCDD BCDE BCDF
FALSE 0 0 0 0
TRUE 1000 2000 4000 8000
| BCDD Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 2000 | |
| Body | RtBody | |
| BCDE Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 4000 | |
| Body | RtBody | |
| BCDF Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | 8000 | |
| Body | RtBody | |
| Rest Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | RES | |
| Body | RtBody | |
Input signal divided by 10 000, or the value of the IN-signal if this is less than zero (= an impossible value).
| PlcNode Buffer | ||
|---|---|---|
| Class | Buffer | |
| Type | PlcNode | |
| Flags | INVISIBLE | |
| Body | DevBody | |