PLC-5 / SLC Item Syntax

Home  Back  Next

 

The item syntax for PLC-5 and SLC is set up as shown below:

<Area>[File number]<Start address>[Array size][Tani-Suffix]

<Area>[File number]<Start address>[Array size][RSLinX-Suffix]

 

Legend: <> mandatory        [ ] optional

<Area>

File Type

Syntax

Orientation 1

Access rights

Default

File number

Address

Output

O

BIT

Read / write

0

octal

Input

I

BIT

Read

1

octal

Integer

N

WORD

Read / write

7

decimal

Binary

B

WORD

Read / write

3

decimal

Float

F

DOUBLE WORD

Read / write

8

decimal

String

ST

SLC-String

Read / write

9

decimal

SFC-Status

SC

WORD

Read / write

3

decimal

Status

S

WORD

Read / write

2

decimal

Timer

T

WORD

Read / write

4

decimal

Counter

C

WORD

Read / write

5

decimal

Control

R

WORD

Read / write

6

decimal

ASCII

A

WORD

Read / write

9

decimal

Long Integer

L

DOUBLE WORD

Read / write

9

decimal

 

1 BIT-oriented means that one bit is addressed for each physical address.

 WORD-oriented means that one word (16 bits) is addressed for each physical address.

 DOUBLE WORD-oriented means that one double word (32 bits) is addressed for each physical address.

[File number]

Specification of the file number is optional. If it is not specified, the default file number is used. See column marked Default File Number in the table.

<Start address>

The start address specifies the address starting at which read or write accesses begin. The start address can consist of 2 pieces of information. Word (floating) number and when a single bit is accessed, then the bit number. The word number can be omitted with a bit. The word number or the floating number is introduced by a colon (:). The bit number is then introduced with a slash (/) <:word> or <:float> or </bit>.

 

The address is octal for some areas. It is decimal for others. See column labeled Address.

 

Either the word number, the float number or the bit number is specified as the start address.

<:word> or <:float> or </bit>

 

The following syntax is used to address a certain bit within a word.

<:word/bit>

 

NOTE:

When bits are write-accessed, the whole word is written!

 

Syntax

Description

O:0

Word 0 in Output file 0

O:0/12

Bit 10 (12 octal = 10 decimal) in output file 0

O/12

Bit 10 (12 octal = 10 decimal) in output file 0

I:37

Word 31 (37 octal = 31 decimal) in input file 1

I4:37/2

Bit 2 in Word 31 (37 octal = 31 decimal) in input file 4

I:1/0

Bit 0 in Word 1 in input file 1

B3/26

Bit 26 in binary file 3

B12:5/15

Bit 15 in word 5 of binary file 12

F8:0

Float 0

N23:4

word 4 of integer file 23

N23:4/2

Bit 2 in word 4 of integer file 23 = Bit 66 in integer file 23

N23/66

Bit 66 in integer file 23

[Array size]

Arrays are created to combine several units of one data type in a field together. Arrays are only possible for word areas and float areas. The array size is initiated with a #.

Examples: N23:4#10

[Tani-Suffix]

A value can be represented in another format with the aid of a suffix. If no suffix is specified, the formats from the column Orientation apply.

For more information on suffixes, see also Suffixes.

 

[RsLinx-Suffix]

The alternative syntax allows you to use one or more suffixes. Every suffix is initiated. The order is arbitrary.

 

NOTE:

The combination of RSLINX-Suffixes and Tani-Suffixes is not possible.

 

Suffix

Description

File Types

,N

Values are represented with sign.

(Default is: no sign)

I, O, N, B, S, A

,M

Values are represented in Motorola-Format. (Default is: Intel-Format)

I, O, N, B, S, A, F

,L<xxx>

The len specifier for RSLinX Format.

xxx is the count of array length

all

,SC<xxx>

Values are interpreted as a zero-terminated string. The maximum length is XXX.

N, A