| Volume pwrb | |
| Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class  ClassTree | INDEX NO INDEX |
Class DataArithm
|
||
|---|---|---|
| Version | 1.0 | |
| Modified | 08-MAR-2026 11:05:32.00 | |
User progammable object with data inputs and outputs.

The object contains
- four data inputs
- six digital inputs
- six analog inputs
- four data outputs
- six digital outputs
- six analog outputs
The function for digital and analog signals is similar to CArithm,
DataArithm also has the possibility to handle data object references.
A data object is connected to an input and is handled as a pointer in
the c-code. The class of the data object has to be declared with a
classdef statement in the code. If a dataobject of class MyClass is
connected to the first data input Da1, the classdef declaration is
classdef Da1 MyClass;
Da1 is then used as a pointer to a struct of the MyClass object
(pwr_sClass_MyClass)
Da1->Temperature = 20;
The classdef statement can also contain an alias name for the pointer
classdef Da1 MyClass MyObject;
MyObject->Temperature = 20;
The analog and digital inputs and outputs can also obtain alias names
with the alias statement
alias d1 EngineStarted, od1 StartEngine;
alias A1 Temperature;
if ( EngineStarted && Temperature < 400)
StartEngine = 1;
If the the databuffer object is a general buffer object, e.g. Buff256, but
should be casted in the code to a c struct, the structdef statement can be
used.
structdef Da1 MyStruct;
Da1->Temperature = 20;
where the struct MyStruct is defined in ra_plc_user.h
typedef struct {
pwr_tFloat32 Temperature;
} MyStruct;
DpDistribute, ApDistribute, DpCollect and ApCollect objects can be used
to expand the number of inputs and outputs to the DataArithm.
See also| RtBody attributes pwr_sClass_dataarithm | |||
|---|---|---|---|
| Pointer to Void | DataIn1 | Da1 | Data object referens input Da1. |
| Pointer to Void | DataIn2 | Da2 | Data object referens input Da2. |
| Pointer to Void | DataIn3 | Da3 | Data object referens input Da3. |
| Pointer to Void | DataIn4 | Da4 | Data object referens input Da4. |
| Float32 | AIn1 | A1 | Analog input A1. |
| Float32 | AIn2 | A2 | Analog input A2. |
| Float32 | AIn3 | A3 | Analog input A3. |
| Float32 | AIn4 | A4 | Analog input A4. |
| Float32 | AIn5 | A5 | Analog input A5. |
| Float32 | AIn6 | A6 | Analog input A6. |
| Boolean | DIn1 | d1 | Digital input d1. |
| Boolean | DIn2 | d2 | Digital input d2. |
| Boolean | DIn3 | d3 | Digital input d3. |
| Boolean | DIn4 | d4 | Digital input d4. |
| Boolean | DIn5 | d5 | Digital input d5. |
| Boolean | DIn6 | d6 | Digital input d6. |
| Int32 | IIn1 | I1 | Integer input I1. |
| Int32 | IIn2 | I2 | Integer input I2. |
| Int32 | IIn3 | I3 | Integer input I3. |
| Int32 | IIn4 | I4 | Integer input I4. |
| Int32 | IIn5 | I5 | Integer input I5. |
| Int32 | IIn6 | I6 | Integer input I6. |
| DataRef | OutData1 | ODa1 | Data object reference output ODa1. |
| DataRef | OutData2 | ODa2 | Data object reference output ODa2. |
| DataRef | OutData3 | ODa3 | Data object reference output ODa3. |
| DataRef | OutData4 | ODa4 | Data object reference output ODa4. |
| Float32 | OutA1 | OA1 | Analog output OA1. |
| Float32 | OutA2 | OA2 | Analog output OA2. |
| Float32 | OutA3 | OA3 | Analog output OA3. |
| Float32 | OutA4 | OA4 | Analog output OA4. |
| Float32 | OutA5 | OA5 | Analog output OA5. |
| Float32 | OutA6 | OA6 | Analog output OA6. |
| Boolean | OutD1 | od1 | Digital output od1. |
| Boolean | OutD2 | od2 | Digital output od2. |
| Boolean | OutD3 | od3 | Digital output od3. |
| Boolean | OutD4 | od4 | Digital output od4. |
| Boolean | OutD5 | od5 | Digital output od5. |
| Boolean | OutD6 | od6 | Digital output od6. |
| Int32 | OutI1 | OI1 | Integer output OI1. |
| Int32 | OutI2 | OI2 | Integer output OI2. |
| Int32 | OutI3 | OI3 | Integer output OI3. |
| Int32 | OutI4 | OI4 | Integer output OI4. |
| Int32 | OutI5 | OI5 | Integer output OI5. |
| Int32 | OutI6 | OI6 | Integer output OI6. |
| GraphPlcNode | |
|---|---|
| object_type | 224 |
| parameters[0] | 22 |
| parameters[1] | 0 |
| parameters[2] | 22 |
| parameters[3] | 0 |
| subwindows | 0 |
| graphmethod | 14 |
| graphindex | 0 |
| default_mask[0] | 1 |
| default_mask[1] | 1 |
| segname_annotation | 3 |
| devbody_annotation | 1 |
| compmethod | 42 |
| compindex | 0 |
| tracemethod | 0 |
| traceindex | 0 |
| executeordermethod | 2 |
| objname | DataA |
| graphname | DataA |
| debugpar | |
| DevBody attributes | |||
|---|---|---|---|
| PlcNode | PlcNode | ||
| Text1024 | Code | code | Code with c-syntax. |
| DataIn1 Input | ||
|---|---|---|
| Class | Input | |
| Type | Pointer to Void | |
| Flags | POINTER | |
| GraphName | Da1 | |
| Body | RtBody | |
Data object referens input. The input is connected to a data output (for example from a GetData). The class of the input is declared with a classdef statement and the input is referred to as Da1 in the code. It can also be referred to with an alias name supplied in the classdef statement.
| DataIn2 Input | ||
|---|---|---|
| Class | Input | |
| Type | Pointer to Void | |
| Flags | POINTER | |
| GraphName | Da2 | |
| Body | RtBody | |
Data object referens input. Da2 or the aliasname is used to refer to the input in the code.
| DataIn3 Input | ||
|---|---|---|
| Class | Input | |
| Type | Pointer to Void | |
| Flags | POINTER | |
| GraphName | Da3 | |
| Body | RtBody | |
Data object referens input. Da3 or the aliasname is used to refer to the input in the code.
| DataIn4 Input | ||
|---|---|---|
| Class | Input | |
| Type | Pointer to Void | |
| Flags | POINTER | |
| GraphName | Da4 | |
| Body | RtBody | |
Data object referens input. Da4 or the aliasname is used to refer to the input in the code.
| AIn1 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | A1 | |
| Body | RtBody | |
Analog input. A1 or the aliasname is used to refer to the input in the code.
| AIn2 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | A2 | |
| Body | RtBody | |
Analog input. A2 or the aliasname is used to refer to the input in the code.
| AIn3 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | A3 | |
| Body | RtBody | |
Analog input. A3 or the aliasname is used to refer to the input in the code.
| AIn4 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | A4 | |
| Body | RtBody | |
Analog input. A4 or the aliasname is used to refer to the input in the code.
| AIn5 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | A5 | |
| Body | RtBody | |
Analog input. A5 or the aliasname is used to refer to the input in the code.
| AIn6 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | A6 | |
| Body | RtBody | |
Analog input. A6 or the aliasname is used to refer to the input in the code.
| DIn1 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | REDUTRANSFER | NOINVERT | |
| GraphName | d1 | |
| Body | RtBody | |
Digital input. d1 or the aliasname is used to refer to the input in the code.
| DIn2 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | REDUTRANSFER | NOINVERT | |
| GraphName | d2 | |
| Body | RtBody | |
Digital input. d2 or the aliasname is used to refer to the input in the code.
| DIn3 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | REDUTRANSFER | NOINVERT | |
| GraphName | d3 | |
| Body | RtBody | |
Digital input. d3 or the aliasname is used to refer to the input in the code.
| DIn4 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | REDUTRANSFER | NOINVERT | |
| GraphName | d4 | |
| Body | RtBody | |
Digital input. d4 or the aliasname is used to refer to the input in the code.
| DIn5 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | REDUTRANSFER | NOINVERT | |
| GraphName | d5 | |
| Body | RtBody | |
Digital input. d5 or the aliasname is used to refer to the input in the code.
| DIn6 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | REDUTRANSFER | NOINVERT | |
| GraphName | d6 | |
| Body | RtBody | |
Digital input. d6 or the aliasname is used to refer to the input in the code.
| IIn1 Input | ||
|---|---|---|
| Class | Input | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | I1 | |
| Body | RtBody | |
Integer input. I1 or the aliasname is used to refer to the input in the code.
| IIn2 Input | ||
|---|---|---|
| Class | Input | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | I2 | |
| Body | RtBody | |
Integer input. I2 or the aliasname is used to refer to the input in the code.
| IIn3 Input | ||
|---|---|---|
| Class | Input | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | I3 | |
| Body | RtBody | |
Integer input. I3 or the aliasname is used to refer to the input in the code.
| IIn4 Input | ||
|---|---|---|
| Class | Input | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | I4 | |
| Body | RtBody | |
Integer input. I4 or the aliasname is used to refer to the input in the code.
| IIn5 Input | ||
|---|---|---|
| Class | Input | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | I5 | |
| Body | RtBody | |
Integer input. I5 or the aliasname is used to refer to the input in the code.
| IIn6 Input | ||
|---|---|---|
| Class | Input | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | I6 | |
| Body | RtBody | |
Integer input. I6 or the aliasname is used to refer to the input in the code.
| OutData1 Output | ||
|---|---|---|
| Class | Output | |
| Type | DataRef | |
| Flags | STATE | NOEDIT | |
| GraphName | ODa1 | |
| Body | RtBody | |
Data object reference output. ODa1 is used to refer to the output in the code. The output consists of a pointer and an objid.
| OutData2 Output | ||
|---|---|---|
| Class | Output | |
| Type | DataRef | |
| Flags | STATE | NOEDIT | |
| GraphName | ODa2 | |
| Body | RtBody | |
Data object reference output. ODa2 is used to refer to the output in the code.
| OutData3 Output | ||
|---|---|---|
| Class | Output | |
| Type | DataRef | |
| Flags | STATE | NOEDIT | |
| GraphName | ODa3 | |
| Body | RtBody | |
Data object reference output. ODa3 is used to refer to the output in the code.
| OutData4 Output | ||
|---|---|---|
| Class | Output | |
| Type | DataRef | |
| Flags | STATE | NOEDIT | |
| GraphName | ODa4 | |
| Body | RtBody | |
Data object reference output. ODa4 is used to refer to the output in the code.
| OutA1 Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OA1 | |
| Body | RtBody | |
Analog output. OA1 is used to refer to the output in the code.
| OutA2 Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OA2 | |
| Body | RtBody | |
Analog output. OA2 is used to refer to the output in the code.
| OutA3 Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OA3 | |
| Body | RtBody | |
Analog output. OA3 is used to refer to the output in the code.
| OutA4 Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OA4 | |
| Body | RtBody | |
Analog output. OA4 is used to refer to the output in the code.
| OutA5 Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OA5 | |
| Body | RtBody | |
Analog output. OA5 is used to refer to the output in the code.
| OutA6 Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OA6 | |
| Body | RtBody | |
Analog output. OA6 is used to refer to the output in the code.
| OutD1 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | od1 | |
| Body | RtBody | |
Digital output. od1 is used to refer to the output in the code.
| OutD2 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | od2 | |
| Body | RtBody | |
Digital output. od2 is used to refer to the output in the code.
| OutD3 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | od3 | |
| Body | RtBody | |
Digital output. od3 is used to refer to the output in the code.
| OutD4 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | od4 | |
| Body | RtBody | |
Digital output. od4 is used to refer to the output in the code.
| OutD5 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | od5 | |
| Body | RtBody | |
Digital output. od5 is used to refer to the output in the code.
| OutD6 Output | ||
|---|---|---|
| Class | Output | |
| Type | Boolean | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | od6 | |
| Body | RtBody | |
Digital output. od6 is used to refer to the output in the code.
| OutI1 Output | ||
|---|---|---|
| Class | Output | |
| Type | Int32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OI1 | |
| Body | RtBody | |
Integer output. OI1 is used to refer to the output in the code.
| OutI2 Output | ||
|---|---|---|
| Class | Output | |
| Type | Int32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OI2 | |
| Body | RtBody | |
Integer output. OI2 is used to refer to the output in the code.
| OutI3 Output | ||
|---|---|---|
| Class | Output | |
| Type | Int32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OI3 | |
| Body | RtBody | |
Integer output. OI3 is used to refer to the output in the code.
| OutI4 Output | ||
|---|---|---|
| Class | Output | |
| Type | Int32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OI4 | |
| Body | RtBody | |
Integer output. OI4 is used to refer to the output in the code.
| OutI5 Output | ||
|---|---|---|
| Class | Output | |
| Type | Int32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OI5 | |
| Body | RtBody | |
Integer output. OI5 is used to refer to the output in the code.
| OutI6 Output | ||
|---|---|---|
| Class | Output | |
| Type | Int32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | OI6 | |
| Body | RtBody | |
Integer output. OI6 is used to refer to the output in the code.
| PlcNode Buffer | ||
|---|---|---|
| Class | Buffer | |
| Type | PlcNode | |
| Flags | INVISIBLE | |
| Body | DevBody | |
| Code Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Text1024 | |
| Flags | ||
| GraphName | code | |
| Body | DevBody | |
Code with c-syntax that uses the inputs and outputs of the DataArithm object.