386
22 LABELS
22.8 Precautions
Precautions for creating programs
When specifying a label as an operand used in instructions, match the data type of the label with that of the operand. In
addition, when specifying a label as an operand used in instructions that control continuous data, specify the data range used
in instructions within the data range of the label.
SFT(P) instruction
SER(P) instruction
Specify a label which has a larger data range than the search range (n) points.
Restrictions on naming labels
The following restrictions apply when naming labels.
• Start the name with a character or underline (_). Numbers cannot be used at the beginning of label names.
• Reserved words cannot be used.
For details on the reserved words, refer to the following.
GX Works3 Operating Manual
SET
bLabel[0]
SFTP bLabel[1]
SET wLabel1.0
SFTP wLabel1.1
To shift the bits correctly, specify the array of the bit type label.
Specify the bit number of the word type label.
or
123
10
500
20
123
wLabel1[0]
wLabel1[1]
wLabel1[n+1]
-123
Start device number of search range
Data matched
Search range:
(n) points