A - 3 A - 3
INTRODUCTION
Thank you for purchasing the MELSEC-Q, A series PLC.
Please read this manual carefully so that equipment is used to its optimum.
CONTENTS
SAFETY PRECAUTIONS..............................................................................................................................A- 1
REVISIONS ....................................................................................................................................................A- 2
CONTENTS....................................................................................................................................................A- 3
How to use this manual..................................................................................................................................A-13
Regarding Compiler BASIC ...........................................................................................................................A-13
About Module Names ....................................................................................................................................A-13
1 OVERVIEW
1- 1 to 1- 3
1.1 Features .................................................................................................................................................. 1- 2
1.2 Symbols Used in This Manual ................................................................................................................ 1- 3
2 THE BASICS OF AD51H-BASIC
2- 1 to 2- 24
2.1 Preparation to Use AD51H-BASIC......................................................................................................... 2- 1
2.2 Direct Mode and Program Mode ............................................................................................................ 2- 4
2.3 Line Format ............................................................................................................................................. 2- 4
2.4 Spaces and Keywords ............................................................................................................................ 2- 5
2.5 Characters Used in BASIC ..................................................................................................................... 2- 6
2.6 What are Instructions and Functions?.................................................................................................... 2- 9
2.7 Constants ................................................................................................................................................ 2-10
2.7.1 Character string constants ............................................................................................................... 2-10
2.7.2 Numeric constants............................................................................................................................ 2-10
2.7.3 Single-precision and double-precision numeric constants ............................................................. 2-10
2.8 Variables.................................................................................................................................................. 2-12
2.8.1 Variable names and type declaration characters............................................................................ 2-12
2.8.2 Array variables.................................................................................................................................. 2-13
2.8.3 Special variables (How to use B@ and W@) ................................................................................. 2-14
2.9 Type Conversion ..................................................................................................................................... 2-17
2.10 Expressions and Operators .................................................................................................................. 2-18
2.10.1 Arithmetic operators ....................................................................................................................... 2-18
2.10.2 Relational operators ....................................................................................................................... 2-20
2.10.3 Logical operators............................................................................................................................ 2-21
2.11 Character String Operations................................................................................................................. 2-23
2.12 Priority Order of Operations.................................................................................................................. 2-24