Class CStoSv
Version 1.0
Modified 08-MAR-2026 11:05:32.00
Code rt_plc_macro_string.h
 Conditional storage of string value.

 Conditional storage of a string value on a specified
 local Sv object.
 Conditional is aimed at the con-input, which is
 supposed to be connected.

 The conditional input signal can be inverted by means
 of the Attribute Editor.

 The string input can be connected to an output of type String.
 It can also be hidden and instead, a constant string can be inserted,
 as a value of the input. The constant string is displayed in the plc-sheet.

 It is not allowed, by means of a function in C or PLC
 programs, to write in any of the inputs.

RtBody attributes pwr_sClass_cstosv
String80 In VAL Input string.
Boolean Cond con Specifies whether a storage will be done or not. FALSE
means no storage and TRUE means storage of an analog
value.

DevBody attributes 
AttrRef SvObject In Specifies the name of the object where to store the
value.
Int32 SvObjectSegments   Specifies how many segments of the Sv object name that
is to be displayed in the symbol of the CStoSv object.
The segments are counted from behind.
PlcNode PlcNode  


GraphPlcNode
object_type 261
parameters[0] 2
parameters[1] 0
parameters[2] 0
parameters[3] 0
subwindows 0
graphmethod 8
graphindex 1
default_mask[0] 3
default_mask[1] 0
segname_annotation 0
devbody_annotation 1
rtbody_annotation 1
compmethod 11
compindex 0
tracemethod 0
traceindex 1
connectmethod 18
executeordermethod 2
objname CStoSv
graphname CStoSv
debugpar Cond


Template Object
Cond 1


Attributes detail


In Input
Class Input
Type String80
Flags RTVIRTUAL | DEVBODYREF
GraphName VAL
Body RtBody
 The input is connected to a string value or left
 open. In the latter case the value of In, is considered
 to be stored.

Cond Input
Class Input
Type Boolean
Flags STATE | RTVIRTUAL | DEVBODYREF | NOEDIT
GraphName con
Body RtBody
 Specifies whether a storage will be done or not. FALSE
 means no storage and TRUE means storage of an analog
 value.

SvObject Intern
Class Intern
Type AttrRef
Flags
GraphName In
Body DevBody
 Specifies the name of the object where to store the
 value.

SvObjectSegments Intern
Class Intern
Type Int32
Flags
Body DevBody
 Specifies how many segments of the Sv object name that
 is to be displayed in the symbol of the CStoSv object.
 The segments are counted from behind.

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody