Class CArithm
Version 1.0
Modified 15-JAN-2025 13:23:37.00
Code rt_plc_macro_logic.h
 User programmable object in the C programming language.

 The code is edited by means of the Attribute Editor at
 the object's Code attribute.

 Up to 8 analog inputs respectively outputs and up to 8
 digital inputs respectively outputs.

 Digital inputs may be inverted either by means of the
 Attribute Editor, or by the logical operator '!' in the
 Code attribute.

Example
 This application starts to declare a variable 'r1'. The r1 is
 assigned the sum of A1 and A2. As A2 is left open it will be
 given a value internally. If r1 is greater then 2.7 OA1 will
 be increased by one, otherwise cleard.

Hints
 The symbol of the CArithm accommodates to the Code
 attribute. To avoid very wide CArithm objects finish
 statements with return.

See Also



RtBody attributes pwr_sClass_carithm
Float32 AIn1 A1 Analog quantities that can be included in the Code
attribute. If , for example, A1 is connected, the
external signal is used, otherwise the internal
attribute AIn1. Changes in AIn1, ..., AIn8 in the run
time system are taken into consideration.
Float32 AIn2 A2
Float32 AIn3 A3
Float32 AIn4 A4
Float32 AIn5 A5
Float32 AIn6 A6
Float32 AIn7 A7
Float32 AIn8 A8
Boolean DIn1 d1 Digital quantities that can be included in the Code
attribute. If , for example, d1 is connected, the
external signal is used, otherwise the internal
attribute DIn1. Changes in DIn1, ..., DIn8 in the run
time system are taken into consideration.
Boolean DIn2 d2
Boolean DIn3 d3
Boolean DIn4 d4
Boolean DIn5 d5
Boolean DIn6 d6
Boolean DIn7 d7
Boolean DIn8 d8
Int32 IIn1 I1 Integer quantities that can be included in the Code
attribute. If , for example, I1 is connected, the
external signal is used, otherwise the internal
attribute IIn1. Changes in IIn1, ..., IIn8 in the run
time system are taken into consideration.
Int32 IIn2 I2
Int32 IIn3 I3
Int32 IIn4 I4
Int32 IIn5 I5
Int32 IIn6 I6
Int32 IIn7 I7
Int32 IIn8 I8
Float32 OutA1 OA1 The analog results of the latest Code evaluation.
Float32 OutA2 OA2
Float32 OutA3 OA3
Float32 OutA4 OA4
Float32 OutA5 OA5
Float32 OutA6 OA6
Float32 OutA7 OA7
Float32 OutA8 OA8
Boolean OutD1 od1 The binary results of the latest Code evaluation.
Boolean OutD2 od2
Boolean OutD3 od3
Boolean OutD4 od4
Boolean OutD5 od5
Boolean OutD6 od6
Boolean OutD7 od7
Boolean OutD8 od8
Int32 OutI1 OI1 The integer results of the latest Code evaluation.
Int32 OutI2 OI2
Int32 OutI3 OI3
Int32 OutI4 OI4
Int32 OutI5 OI5
Int32 OutI6 OI6
Int32 OutI7 OI7
Int32 OutI8 OI8


GraphPlcNode
object_type 11
parameters[0] 24
parameters[1] 0
parameters[2] 24
parameters[3] 0
subwindows 1
graphmethod 14
graphindex 0
default_mask[0] 1
default_mask[1] 1
segname_annotation 3
devbody_annotation 1
compmethod 40
compindex 0
tracemethod 0
traceindex 0
executeordermethod 2
objname CArit
graphname CArithm
debugpar

DevBody attributes 
PlcNode PlcNode  
Text1024 Code code Ordinary code in the C programming language of up to
1024 characters. The code is edited by means of the
Attribute Editor and cannot be changed in the target
environment. All C-statements are allowed.

Note! If an arithmetical operator is followed by a graph
name, e.g. A1, the operator and the graph name have to
be separated by a space or a left parenthesis.


Attributes detail


AIn1 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A1
Body RtBody
 Analog quantities that can be included in the Code
 attribute. If , for example, A1 is connected, the
 external signal is used, otherwise the internal
 attribute AIn1. Changes in AIn1, ..., AIn8 in the run
 time system are taken into consideration.

AIn2 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A2
Body RtBody

AIn3 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A3
Body RtBody

AIn4 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A4
Body RtBody

AIn5 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A5
Body RtBody

AIn6 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A6
Body RtBody

AIn7 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A7
Body RtBody

AIn8 Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName A8
Body RtBody

DIn1 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d1
Body RtBody
 Digital quantities that can be included in the Code
 attribute. If , for example, d1 is connected, the
 external signal is used, otherwise the internal
 attribute DIn1. Changes in DIn1, ..., DIn8 in the run
 time system are taken into consideration.

DIn2 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d2
Body RtBody

DIn3 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d3
Body RtBody

DIn4 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d4
Body RtBody

DIn5 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d5
Body RtBody

DIn6 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d6
Body RtBody

DIn7 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d7
Body RtBody

DIn8 Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName d8
Body RtBody

IIn1 Input
Class Input
Type Int32
Flags NOINVERT | REDUTRANSFER
GraphName I1
Body RtBody
 Integer quantities that can be included in the Code
 attribute. If , for example, I1 is connected, the
 external signal is used, otherwise the internal
 attribute IIn1. Changes in IIn1, ..., IIn8 in the run
 time system are taken into consideration.

IIn2 Input
Class Input
Type Int32
Flags NOINVERT
GraphName I2
Body RtBody

IIn3 Input
Class Input
Type Int32
Flags NOINVERT | REDUTRANSFER
GraphName I3
Body RtBody

IIn4 Input
Class Input
Type Int32
Flags NOINVERT | REDUTRANSFER
GraphName I4
Body RtBody

IIn5 Input
Class Input
Type Int32
Flags NOINVERT | REDUTRANSFER
GraphName I5
Body RtBody

IIn6 Input
Class Input
Type Int32
Flags NOINVERT | REDUTRANSFER
GraphName I6
Body RtBody

IIn7 Input
Class Input
Type Int32
Flags NOINVERT | REDUTRANSFER
GraphName I7
Body RtBody

IIn8 Input
Class Input
Type Int32
Flags NOINVERT | REDUTRANSFER
GraphName I8
Body RtBody

OutA1 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA1
Body RtBody
 The analog results of the latest Code evaluation.

OutA2 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA2
Body RtBody

OutA3 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA3
Body RtBody

OutA4 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA4
Body RtBody

OutA5 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA5
Body RtBody

OutA6 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA6
Body RtBody

OutA7 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA7
Body RtBody

OutA8 Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OA8
Body RtBody

OutD1 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od1
Body RtBody
 The binary results of the latest Code evaluation.

OutD2 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od2
Body RtBody

OutD3 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od3
Body RtBody

OutD4 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od4
Body RtBody

OutD5 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od5
Body RtBody

OutD6 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od6
Body RtBody

OutD7 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od7
Body RtBody

OutD8 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName od8
Body RtBody

OutI1 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI1
Body RtBody
 The integer results of the latest Code evaluation.

OutI2 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI2
Body RtBody

OutI3 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI3
Body RtBody

OutI4 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI4
Body RtBody

OutI5 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI5
Body RtBody

OutI6 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI6
Body RtBody

OutI7 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI7
Body RtBody

OutI8 Output
Class Output
Type Int32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName OI8
Body RtBody

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody

Code Intern
Class Intern
Type Text1024
Flags
GraphName code
Body DevBody
 Ordinary code in the C programming language of up to
 1024 characters. The code is edited by means of the
 Attribute Editor and cannot be changed in the target
 environment. All C-statements are allowed.

 Note! If an arithmetical operator is followed by a graph
 name, e.g. A1, the operator and the graph name have to
 be separated by a space or a left parenthesis.