Page top

Lead Contents

FAQ01070 of Programmable Controllers FAQ

FAQ No. FAQ01070

Primary Contents


How do I create programming to use a DATA SEARCH (SRCH) instruction to find a certain product code from within the production instruction master table and extract the related production instruction data?


There are many applications that use the product code as a search key to extract the related production instruction data. The following explains how to use the DATA SEARCH (SRCH) instruction to accomplish this.

Work Flow to Extract Production Instruction Master and Data

Figure1. Production Instruction Master

*File size: 320 words (80 records at 4 words per record)

*Code specifications: The product code and instruction data cannot have the same code.

Program and Operation

The following programming is designed for the CS/CJ Programmable Controllers. When using a C200H Programmable Controllers or other smaller Programmable Controllers, the usage of the DATA SEARCH (SRCH) instruction is slightly different. Before programming, refer to the Instructions Reference Manual for the relevant Programmable Controllers (PLC).

*1. What is &320?

Direct Decimal Input/Hexadecimal Data Formal
When &320 is written, the decimal 320 is converted to hexadecimal 0140 and used as the parameter for the first operand.