| Volume pwrb | |
| Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class SubStr
|
||
|---|---|---|
| Version | 1.0 | |
| Modified | 08-MAR-2026 11:05:32.00 | |
| Code | rt_plc_macro_string.h | |
Extract a substring from a string.

The SubStr extracts a substring from a string at the specified offset and with the specified length.
| RtBody attributes pwr_sClass_SubStr | |||
|---|---|---|---|
| String80 | In | In | String input that the substring will be extracted from. |
| UInt32 | Start | Start index of the substring. First character has index 0. | |
| UInt32 | Length | Length of the substring. | |
| String80 | ActVal | Val | Output that contains the substring. |
| DevBody attributes | |||
|---|---|---|---|
| PlcNode | PlcNode | ||
| GraphPlcNode | |
|---|---|
| object_type | 11 |
| parameters[0] | 1 |
| parameters[1] | 2 |
| parameters[2] | 1 |
| parameters[3] | 0 |
| subwindows | 0 |
| graphmethod | 1 (standard, common attributes) |
| graphindex | 0 |
| default_mask[0] | 1 |
| default_mask[1] | 1 |
| segname_annotation | 1 |
| compmethod | 5 |
| compindex | 0 |
| tracemethod | 0 |
| traceindex | 0 |
| executeordermethod | 2 |
| objname | SubStr |
| graphname | SubStr |
| Template Object | |
|---|---|
| Length | 10 |
| In Input | ||
|---|---|---|
| Class | Input | |
| Type | String80 | |
| Flags | STATE | RTVIRTUAL | NOEDIT | NOREMOVE | |
| GraphName | In | |
| Body | RtBody | |
String input that the substring will be extracted from. The input has to be connected to an output of type String.
| Start Intern | ||
|---|---|---|
| Class | Intern | |
| Type | UInt32 | |
| Flags | ||
| Body | RtBody | |
Start index of the substring. First character has index 0.
| Length Intern | ||
|---|---|---|
| Class | Intern | |
| Type | UInt32 | |
| Flags | ||
| Body | RtBody | |
Length of the substring. The maximum length is 79 characters. If the maximum length is exceede the substring will be cut off.
| ActVal Output | ||
|---|---|---|
| Class | Output | |
| Type | String80 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | Val | |
| Body | RtBody | |
Output that contains the substring.
| PlcNode Buffer | ||
|---|---|---|
| Class | Buffer | |
| Type | PlcNode | |
| Flags | INVISIBLE | |
| Body | DevBody | |