Class Gray
Version 1.0
Modified 08-MAR-2026 11:05:32.00
Code rt_plc_io.c
 Converts a 16-bits Gray code value into its decimal
 equivalent.

 The Gray code has the property that a change of the
 output signal one unit can always be accomplished by
 changing only one digital input.

 16 binary positions implies the resolution 1 on 2**16  = 65 536.

RtBody attributes pwr_sClass_gray
Boolean Din0 di0 di0 is the least significant and diF the most
significant bit.
Boolean Din1 di1
Boolean Din2 di2
Boolean Din3 di3
Boolean Din4 di4
Boolean Din5 di5
Boolean Din6 di6
Boolean Din7 di7
Boolean Din8 di8
Boolean Din9 di9
Boolean DinA diA
Boolean DinB diB
Boolean DinC diC
Boolean DinD diD
Boolean DinE diE
Boolean DinF diF
Float32 ActVal OUT Specifies the result of the conversion.
Boolean Inv inv Specifies if all inputs will be inverted or not. FALSE
means that no inputs will be inverted; TRUE means that
all inputs will be inverted. If, for example, only the
4 first inputs are used the 12 others have to be set to
avoid an error.

DevBody attributes 
PlcNode PlcNode  


GraphPlcNode
object_type 87
parameters[0] 16
parameters[1] 0
parameters[2] 1
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 Gray
graphname Gray
debugpar


Attributes detail


Din0 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di0
Body RtBody
 di0 is the least significant and diF the most
 significant bit.

Din1 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di1
Body RtBody

Din2 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di2
Body RtBody

Din3 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di3
Body RtBody

Din4 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di4
Body RtBody

Din5 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di5
Body RtBody

Din6 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di6
Body RtBody

Din7 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di7
Body RtBody

Din8 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di8
Body RtBody

Din9 Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName di9
Body RtBody

DinA Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName diA
Body RtBody

DinB Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName diB
Body RtBody

DinC Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName diC
Body RtBody

DinD Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName diD
Body RtBody

DinE Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName diE
Body RtBody

DinF Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName diF
Body RtBody

ActVal Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OUT
Body RtBody
 Specifies the result of the conversion.

Inv Intern
Class Intern
Type Boolean
Flags
GraphName inv
Body RtBody
 Specifies if all inputs will be inverted or not. FALSE
 means that no inputs will be inverted; TRUE means that
 all inputs will be inverted. If, for example, only the
 4 first inputs are used the 12 others have to be set to
 avoid an error.

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody