1. Trang chủ
  2. » Tất cả

MELSEC iq f FX5 programming manual (instructions, standard functionsfunction blocks)

1.1K 12 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

MELSEC iQ F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks) MELSEC iQ F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks) SAFETY PRECAUTIONS (Read the[.]

MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks) SAFETY PRECAUTIONS (Read these precautions before use.) Before using the MELSEC iQ-F series PLCs, please read the manual supplied with each product and the relevant manuals introduced in that manual carefully and pay full attention to safety to handle the product correctly Store this manual in a safe place so that it can be taken out and read whenever necessary Always forward it to the end user INTRODUCTION This manual describes the instructions and functions/function blocks required for programming MELSEC iQ-F series systems This manual and the related manuals should be read and the functions and performance of the MELSEC iQ-F series PLC should be understood before attempting to use the unit However, before using a program example introduced in this manual to the actual system, always confirm that it poses no problem for control of the target system Regarding use of this product • This product has been manufactured as a general-purpose part for general industries, and has not been designed or manufactured to be incorporated in a device or system used in purposes related to human life • Before using the product for special purposes such as nuclear power, electric power, aerospace, medicine or passenger movement vehicles, consult with Mitsubishi Electric • This product has been manufactured under strict quality control However when installing the product where major accidents or losses could occur if the product fails, install appropriate backup or failsafe functions in the system Note • If in doubt at any stage during the installation of the product, always consult a professional electrical engineer who is qualified and trained in the local and national standards If in doubt about the operation or use, please consult the nearest Mitsubishi Electric representative • Since the examples indicated by this manual, technical bulletin, catalog, etc are used as a reference, please use it after confirming the function and safety of the equipment and system Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples • This manual content, specification etc may be changed without a notice for improvement • The information in this manual has been carefully checked and is believed to be accurate; however, if you have noticed a doubtful point, an error, etc., please contact the nearest Mitsubishi Electric representative When doing so, please provide the manual number given at the end of this manual CONTENTS SAFETY PRECAUTIONS INTRODUCTION RELEVANT MANUALS 16 TERMS 17 HOW TO READ THIS MANUAL 19 PART OVERVIEW CHAPTER OVERVIEW 24 1.1 Instruction Configuration 24 1.2 Data Specification Method 25 Bit data 28 16-bit data (word data) 29 32-bit data (double word data) 31 Real number data (floating-point data) 34 Character string data 36 1.3 Execution Condition 37 CHAPTER PRECAUTIONS ON PROGRAMMING 38 2.1 Errors Common to Instructions 38 2.2 Checking the Ranges of Instruction Runtime Devices and Labels 38 2.3 Operations Arising when the OUT, SET/RST, and PLS/PLF Instructions of the Same Device are Used 39 2.4 Standard Function/Function Block Return Values 44 PART INSTRUCTION/FUNCTION LIST CHAPTER CPU MODULE INSTRUCTION 46 3.1 Sequence Instruction 46 3.2 Basic Instruction 50 3.3 Application Instruction 64 3.4 Step Ladder Instructions 83 3.5 Built-in Ethernet Function Instructions 83 3.6 PID Control Instruction 84 CHAPTER 4.1 MODULE SPECIFIC INSTRUCTION 85 Network Common Instruction 85 4.2 CC-Link IE Field Network Instruction 85 4.3 High-speed Counter Instruction 86 4.4 External Device Communication Instruction 87 4.5 Positioning Instruction 88 4.6 Positioning Module 89 4.7 BFM Device Read/ Write Instruction 89 CHAPTER 5.1 STANDARD FUNCTIONS/FUNCTION BLOCKS 90 Standard Functions 90 Type conversion functions 90 Standard functions of one numeric variable 96 Standard arithmetic functions 97 Standard bit shift functions 98 Standard bitwise boolean functions 98 Standard selection functions 98 Standard comparison functions 99 Standard character string functions 99 Time data functions 100 Standard Function Blocks 101 Bistable function blocks 101 Edge detection function blocks 101 Counter function blocks 101 Timer function blocks 102 PART CPU MODULE INSTRUCTIONS CHAPTER SEQUENCE INSTRUCTIONS 6.1 CONTENTS 5.2 104 Contact Instructions 104 Operation start, series connection, parallel connection 104 Pulse operation start, pulse series connection, pulse parallel connection 106 Pulse NOT operation start, pulse NOT series connection, pulse NOT parallel connection 108 6.2 Association Instruction 110 Ladder block series/parallel connection 110 Storing/reading/clearing the operation result 111 Inverting the operation result 112 Converting the operation result into a pulse 113 6.3 Output Instructions 114 Out (excluding the timer, counter and annunciator) 114 Timer 115 Counter 117 Long counter 118 Annunciator 120 Setting devices (excluding annunciator) 121 Resetting devices (excluding annunciator) 123 Setting annunciator 125 Resetting annunciator 127 Setting annunciator (with check time) 129 Resetting annunciator (smallest number reset) 131 Rising edge output 132 Falling edge output 134 Inverting the bit device output 136 Inverting the bit device output 137 6.4 Shift Instructions 139 Shifting bit devices 139 Shifting 16-bit data to the right by n bit(s) 141 Shifting 16-bit data to the left by n bit(s) 143 Shifting n-bit data to the right by bit 145 Shifting n-bit data to the left by bit 146 Shifting n-word data to the right by word 147 Shifting n-word data to the left by word 148 Shifting n-bit(s) data to the right by (n) bit(s) 149 Shifting n-bit data to the left by n bit(s) 151 Shifting n-word data to the right by n word(s) 153 Shifting n-word data to the left by n word(s) 155 6.5 Master Control Instruction 157 Setting/resetting the master control 157 6.6 Termination Instructions 161 Ending the main routine program 161 Ending the sequence program 162 6.7 Stop Instruction 164 Stopping the sequence program 164 CHAPTER 7.1 BASIC INSTRUCTIONS 165 Comparison Operation Instructions 165 Comparing 16-bit binary data 165 Comparing 32-bit binary data 167 Comparison output 16-bit binary data 169 Comparison output 32-bit binary data 171 Comparing 16-bit binary data band 173 Comparing 32-bit binary data band 175 Comparing 16-bit binary block data 177 Comparing 32-bit binary block data 179 7.2 Arithmetic Operation Instructions 182 Adding 16-bit binary data 182 Subtracting 16-bit binary data 188 Adding 32-bit binary data 194 Subtracting 32-bit binary data 199 Multiplying 16-bit binary data 205 Dividing 16-bit binary data 209 Multiplying 32-bit binary data 213 Dividing 32-bit binary data 217 Adding BCD 4-digit data 221 Subtracting BCD 4-digit data 223 Adding BCD 8-digit data 225 Subtracting BCD 8-digit data 227 Multiplying BCD 4-digit data 229 Dividing BCD 4-digit data 230 Multiplying BCD 8-digit data 232 Dividing BCD 8-digit data 234 Adding 16-bit binary block data 236 Subtracting 16-bit binary block data 238 Adding 32-bit binary block data 240 Subtracting 32-bit binary block data 243 Incrementing 16-bit binary data 245 Decrementing 16-bit binary data 246 Incrementing 32-bit binary data 247 Decrementing 32-bit binary data 248 7.3 Logical Operation Instructions 249 Performing an AND operation on 16-bit data 249 Performing an AND operation on 32-bit data 251 Performing an AND operation on 16-bit block data 253 Performing an OR operation on 16-bit data 255 Performing an OR operation on 32-bit data 257 Performing an OR operation on 16-bit block data 259 Performing an XOR operation on 16-bit data 261 Performing an XOR operation on 32-bit data 263 Performing an XOR operation on 16-bit block data 265 Performing an XNOR operation on 16-bit data 267 Performing an XNOR operation on 16-bit block data 271 7.4 Bit Processing Instructions 273 Setting a bit in the word device 273 Resetting a bit in the word device 274 Performing a 16-bit test 275 Performing a 32-bit test 277 Batch-resetting bit devices 279 CONTENTS Performing an XNOR operation on 32-bit data 269 Batch-resetting devices 280 7.5 Data Conversion Instructions 282 Converting binary data to BCD 4-digit data 282 Converting binary data to BCD 8-digit data 284 Converting BCD 4-digit data to binary data 286 Converting BCD 8-digit data to binary data 288 Converting single-precision real number to 16-bit signed binary data 290 Converting single-precision real number to 16-bit unsigned binary data 291 Converting single-precision real number to 32-bit signed binary data 292 Converting single-precision real number to 32-bit unsigned binary data 293 Converting 16-bit signed binary data to 16-bit unsigned binary data 294 Converting 16-bit signed binary data to 32-bit signed binary data 295 Converting 16-bit signed binary data to 32-bit unsigned binary data 296 Converting 16-bit unsigned binary data to 16-bit signed binary data 297 Converting 16-bit unsigned binary data to 32-bit signed binary data 298 Converting 16-bit unsigned binary data to 32-bit unsigned binary data 299 Converting 32-bit signed binary data to 16-bit signed binary data 300 Converting 32-bit signed binary data to 16-bit unsigned binary data 301 Converting 32-bit signed binary data to 32-bit unsigned binary data 302 Converting 32-bit unsigned binary data to 16-bit signed binary data 303 Converting 32-bit unsigned binary data to 16-bit unsigned binary data 304 Converting 32-bit unsigned binary data to 32-bit signed binary data 305 Converting 16-bit binary data to Gray code 306 Converting 32-bit binary data to Gray code 307 Converting Gray code to 16-bit binary data 308 Converting Gray code to 32-bit binary data 309 Converting decimal ASCII to 16-bit binary data 310 Converting decimal ASCII to 32-bit binary data 312 Converting ASCII to HEX 314 Converting character string to 16-bit binary data 318 Converting character string to 32-bit binary data 321 Two's complement of 16-bit binary data (sign inversion) 324 Two's complement of 32-bit binary data (sign inversion) 325 Decoding from to 256 bits 326 Encoding from 256 to bits 328 Seven-segment decoding 329 Seven Segment With Latch 331 Separating bits from 16-bit data 333 Connecting bits to 16-bit data 335 Separating the specified number of bits 337 Connecting the specified number of bits 339 Separating data in byte units 341 Connecting data in byte units 343 7.6 Digital Switch (Thumbwheel Input) 345 7.7 Data Transfer Instructions 347 Transferring 16-bit data 347 Transferring 32-bit data 348 Inverting and transferring 16-bit data 349 Inverting and transferring 32-bit data 350 Digit move 351 Inverting and transferring 1-bit data 353 Transferring 16-bit block data (65535 points maximum) 354 Transferring identical 16-bit block data (65535 points maximum) 356 Transferring identical 32-bit block data (65535 points maximum) 358 Exchanging 16-bit data 360 Exchanging 32-bit data 361 Exchanging the upper and lower bytes of 16-bit data 362 Exchanging the upper and lower bytes of 32-bit data 363 Transferring 1-bit data 364 Transferring octal bits (16-bit data) 365 Transferring octal bits (32-bit data) 367 Transferring n-bit data 369 CHAPTER 8.1 APPLICATION INSTRUCTION 371 Rotation Instruction 371 Rotating 16-bit data to the right 371 Rotating 16-bit data to the left 374 Rotating 32-bit data to the right 377 Rotating 32-bit data to the left 379 8.2 Program Branch Instruction 381 Pointer branch 381 Jump to END 384 8.3 Program Execution Control Instruction 385 Disabling/enabling interrupt programs 385 Disabling the interrupt program with specified priority or lower 387 Interrupt program mask 390 Disabling/enabling the specified interrupt pointer 392 Returning from the interrupt program 393 Resetting the watchdog timer 394 8.4 Structuring Instruction 395 FOR to NEXT 395 Forcibly terminating the FOR to NEXT instruction loop 397 Calling a subroutine program 399 Returning from the subroutine program 403 Calling a subroutine program 404 8.5 Data Table Operation Instruction 406 Reading the oldest data from the data table 406 Reading the newest data from the data table 408 Writing data to the data table 410 Inserting data to the data table 412 Deleting data from the data table 414 8.6 Character String Operation Instruction 416 Comparing character strings 416 Transferring character strings 423 Converting 16-bit binary data to decimal ASCII 425 Converting 32-bit binary data to decimal ASCII 427 Converting HEX code data to ASCII 429 Converting 16-bit binary data to character string 432 Converting 32-bit binary data to character string 435 Converting single-precision real number to character string 438 CONTENTS Concatenating character strings 419 Detecting a character string length 443 Extracting character string data from the right 445 Extracting character string data from the left 447 Storing the specified number of character strings 449 Replacing the specified number of character strings 452 Searching character string 455 Inserting character string 457 Deleting character string 459 8.7 Real Number Instruction 461 Comparing single-precision real numbers 461 Single-precision real number comparison 463 Single-precision real number data band comparison 465 Adding single-precision real numbers 467 Subtracting single-precision real numbers 471 Adding single-precision real numbers 475 Subtracting single-precision real numbers 477 Multiplying single-precision real numbers 479 Dividing single-precision real numbers 481 Multiplying single-precision real numbers 483 Dividing single-precision real numbers 485 Converting 16-bit signed binary data to single-precision real number 487 Converting 16-bit unsigned binary data to single-precision real number 488 Converting 32-bit signed binary data to single-precision real number 489 Converting 32-bit unsigned binary data to single-precision real number 490 Converting character string to single-precision real number 491 Converting binary floating point to decimal floating point 494 Converting decimal floating point to binary floating point 496 Inverting the sign of single-precision real number 498 Transferring single-precision real number data 499 Calculating the sine of single-precision real number 500 Calculating the cosine of single-precision real number 502 Calculating the tangent of single-precision real number 504 Calculating the arc sine of single-precision real number 506 Calculating the arc cosine of single-precision real number 508 Calculating the arc tangent of single-precision real number 510 Converting single-precision real number angle to radian 512 Converting single-precision real number radian to angle 514 Calculating the square root of single-precision real number 516 Calculating the exponent of single-precision real number 518 Calculating the natural logarithm of single-precision real number 520 Calculating the exponentiation of single-precision real number 522 Calculating the common logarithm of single-precision real number 524 Searching the maximum value of single-precision real number 526 Searching the minimum value of single-precision real number 528 8.8 Random Number Instruction 530 8.9 Index Register Operation Instruction 531 Generating random number 530 Saving all data of the index register 531 Returning all data of the index register 533 Saving the selected data of the index register and long index register 534 Returning the selected data of the index register and long index register 536 8.10 Data Control Instruction 537 Upper and lower limit control of 16-bit binary data 537 Upper and lower limit control of 32-bit binary data 539 Dead band control of 16-bit binary data 541 Dead band control of 32-bit binary data 543 Zone control of 16-bit binary data 545 Zone control of 32-bit binary data 547 Scaling 16-bit binary data (point coordinates) 549 Scaling 32-bit binary data (point coordinates) 552 Scaling 16-bit binary data (XY coordinates) 555 Scaling 32-bit binary data (XY coordinates) 558 8.11 Special Timer Instruction 561 Teaching timer 561 Special function timer 563 8.12 Special Counter Instruction 565 Signed 32-bit bi-directional counters 565 8.13 Shortcut Control Instruction 567 Rotary table shortest direction control 567 8.14 Ramp Signal Instruction 570 Ramp signal 570 8.15 Pulse Related Instruction 573 Measuring the density of 16 bit binary pulses 573 Measuring the density of 32 bit binary pulses 577 16 bit binary pulse output 581 32 bit binary pulse output 589 16 bit binary pulse width modulation 597 32 bit binary pulse width modulation 603 8.16 Input Matrix Instruction 609 8.17 Initial State 612 8.18 Drum Sequence 622 Input matrix 609 Initial State 612 16-bit binary data absolute method 622 32-bit binary data absolute method 624 Relative method 626 ... for FX5U-32MR/ES, FX5U-32MT/ES, FX5U-32MT/ESS, FX5U-64MR/ES, FX5U-64MT/ES, FX5U-64MT/ESS, FX5U-80MR/ES, FX5U-80MT/ES, FX5U-80MT/ESS, FX5U-32MR/DS, FX5U-32MT/DS, FX5U-32MT/DSS, FX5U-64MR/DS, FX5U-64MT/DS,... intelligent function modules • FX5 intelligent function module Generic term for FX5- 8AD, FX5- 4LC, FX5- 20PG-P, FX5- 40SSC-S, FX5- 80SSC-S, FX5- CCLIEF, FX5- CCL-MS, and FX5- ASL-M 17 Terms • FX3 intelligent function... FX5U-64MT/DS, FX5U-64MT/DSS, FX5U-80MR/DS, FX5U-80MT/DS, and FX5U-80MT/DSS FX5UC CPU module Generic term for FX5UC-32MT/D, FX5UC-32MT/DSS, FX5UC-64MT/D, FX5UC-64MT/DSS, FX5UC-96MT/D, and FX5UC-96MT/DSS

Ngày đăng: 13/11/2022, 21:11

Xem thêm: