CHAR

Top  Previous  Next

 

This data type has got a size of one byte. It serves for saving ASCII-signs. In TrySim it is compatible for assigning to the type BYTE, that means always there where you can use a BYTE you can also use a CHAR and the other way round. If you want to export your program to STEP®7 you must not make use of this compatibility because it does not exist there.

 

Examples for the use of CHAR-types

 

      L      ‘T’          (First letter of TrySim)

      T      #Word[3]     (#Word is declared as ARRAY[1..5] of CHAR)

 

With the help of the operation L (Load) you can load up to 4 signs at the same time into the accu:

 

      L      ‘afGh’

 

But if you want to connect a CHAR-parameter of a FB/FC, the constant must not be longer than one sign.

 

ASCII-Table:

SP - 32

0- 48

@ - 64

P - 80

` - 96

p - 112

! - 33

1 - 49

A - 65

Q - 81

a - 97

q - 113

- 34

2 - 50

B - 66

R - 82

b - 98

r - 114

# - 35

3 - 51

C - 67

S - 83

c - 99

s - 115

$ - 36

4 - 52

D - 68

T - 84

d - 100

t - 116

% - 37

5 - 53

E - 69

U - 85

e - 101

u - 117

& - 38

6 - 54

F - 70

V - 86

f - 102

v - 118

- 39

7 - 55

G - 71

W - 87

g - 103

w - 119

( - 40

8 - 56

H - 72

X - 88

h - 104

x - 120

) - 41

9 - 57

I - 73

Y - 89

i - 105

y - 121

* - 42

: - 58

J - 74

Z - 90

j - 106

z - 122

+ - 43

; - 59

K - 75

[ - 91

k - 107

{ - 123

, - 44

< - 60

L - 76

\ - 92

l - 108

| - 124

- - 45

= - 61

M - 77

] - 93

m - 109

} - 125

. - 46

> - 62

N - 78

^ - 94

n - 110

~ - 126

/ - 47

? - 63

O - 79

_ - 95

o - 111

 - 127

 

See also:

ASCII-Table

Data Types

 

STEP®7 is a registered trademark of the Siemens AG.