Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
5
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition
Table of Contents
5. How to Specify Devices and Constants to Instructions 149
5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers) ....................... 149
5.1.1 Types of numeric values.......................................................................................................................149
5.1.2 Conversion of numeric values...............................................................................................................150
5.1.3 Handling of numeric values in floating point operations........................................................................151
5.2 Specification of Constants K, H and E (Decimal, Hexadecimal and Real Number)............................. 153
5.2.1 Constant K (decimal number) ...............................................................................................................153
5.2.2 Constant H (hexadecimal number) .......................................................................................................153
5.2.3 Constant E (real number)......................................................................................................................153
5.3 Character Strings ................................................................................................................................. 154
5.3.1 Character string constant ("ABC").........................................................................................................154
5.3.2 Character string data.............................................................................................................................154
5.4 Specification of Digits for Bit Devices (Kn[ ]***).................................................................................... 155
5.5 Bit Specification of a Word Device (D[ ].b)........................................................................................... 156
5.6 Direct Specification of Buffer Memory (U[ ]\G[ ]).................................................................................. 156
5.7 Indexing................................................................................................................................................ 157
5.7.1 Indexing in basic instructions................................................................................................................157
5.7.2 Indexing in applied instructions.............................................................................................................158
5.7.3 Indexing example for instruction with limited number of use.................................................................160
6. What to Understand before Programming 161
6.1 How to Read Explanation of Instructions ............................................................................................. 161
6.2 Cautions on Creation of Fundamental Programs................................................................................. 164
6.2.1 Programming procedure and execution order.......................................................................................164
6.2.2 Double output (double coil) operation and countermeasures ...............................................................165
6.2.3 Circuits which cannot be programmed and countermeasures..............................................................166
6.3 I/O Processing and Response Delay ................................................................................................... 167
6.4 Mutual Relationship Among Program Flow Control Instructions.......................................................... 168
6.5 General Rules for Applied Instructions................................................................................................. 170
6.5.1 Expression and operation type of applied instructions..........................................................................170
6.5.2 Handling of general flags ......................................................................................................................172
6.5.3 Handling of operation error flag.............................................................................................................174
6.5.4 Handling functions of extension flag .....................................................................................................174
6.5.5 Limitation in number of instructions.......................................................................................................175
7. Basic Instruction 176
7.1 LD, LDI................................................................................................................................................. 178
7.2 OUT...................................................................................................................................................... 180
7.3 AND, ANI.............................................................................................................................................. 183
7.4 OR, ORI ............................................................................................................................................... 186
7.5 LDP, LDF, ANDP, ANDF, ORP, ORF .................................................................................................. 189
7.6 ORB ..................................................................................................................................................... 195
7.7 ANB...................................................................................................................................................... 196
7.8 MPS, MRD, MPP ................................................................................................................................. 197
7.9 MC, MCR ............................................................................................................................................. 201
7.10 INV ..................................................................................................................................................... 204
7.11 MEP, MEF.......................................................................................................................................... 205
7.12 PLS, PLF............................................................................................................................................ 207
7.13 SET, RST........................................................................................................................................... 210
7.14 NOP ................................................................................................................................................... 213
7.15 END.................................................................................................................................................... 214
7.16 Number of Instruction Steps and Specified Devices.......................................................................... 215
8. Program Flow – FNC 00 to FNC 09 216
8.1 FNC 00 – CJ / Conditional Jump..........................................................................................................217
8.1.1 CJ instruction and operations of contact and coil..................................................................................221
8.1.2 Relationship between master control instruction and jump instruction .................................................223