Abstract: This article appears online detection problem of yarn unevenness, through RS-232C serial communication, the design of the host computer and Omron PLC-CJ1M (CPU21) between the data communication.
Windows operating system based on a powerful object-oriented programming languages - VisualBasic, glue stick procedures for the preparation of the host computer without having to write any program in the PLC, available online yarn test data, reflect the unevenness of yarn .
Keywords: yarn detection; serial communication; programmable controller.
0. Introduction.
In 1969, Digital Equipment Corporation under the requirements of General Motors Corporation,glue gun developed the world's first programmable logic controller. Initially only used for logical operations, it is known as programmable logic controllers, referred to as PLC (ProgrammableLogicController), along with computer technology and the rapid development of electronic technology, its capabilities far beyond the control of sequential control and logic areas, not only to achieve data computing and processing power, small volume, strong function, high reliability, visual programming, adaptability, convenient interface, cost-effective.
In recent years, with modern production technology improved, and computer technology, information technology and communication technology mutual penetration, yarn unevenness is not a direct result of fabric formation, which indicates that the yarn production processes is extremely important. Unevenness of the yarn is an important indicator of its quality. The traditional way of yarn are in the laboratory testing carried out off-line, through the yarn sample, required under the premise of a certain temperature and humidity, as opposed to yarn shows off the online testing and random testing of delay. RS-232C serial communication easy to achieve, often used in automatic control, data acquisition, intelligent instruments, such as PC data communication with external devices. This paper designs VB and Omron PLC-CJ1M (CPU21) data communication between the online access to test data of yarn, such as the CV value, the instantaneous yarn diameter, mean diameter, thick section of maximum, minimum details, etc. timely reflect the unevenness of the yarn, the operator and make timely adjustments.
1. The communication between PC and PLC implementation.
Omron PLC-CJ1M (CPU21) with two serial communication ports, one dedicated serial communication line by Omron CS1W-CN226, the network type is set to Toolbus, while DIP4 serial communications equipment status is set to ON; First Omron nine-pin serial port by communications lines XM2Z-200S-CV, the network type is set to SYSMACWAY, the other to the default settings, including port COM1, baud rate is 9600. Figure 1 shows the host computer through the RS-232C port to connect to the PLC of the diagram, also called a 1:1 connection.
Links System 2.1 communication protocol.
Data communication in the yarn, just write in the host computer system, host computer communication procedures, without having to write any program in the PLC, PLCCPU based on commands sent by the host computer automatically generated response frame frame back to the host computer. Command frame and response frame contains the necessary communication between the data, only to ensure correct implementation between the command frame and response frame response in order to achieve accurate data exchange. Commands and responses in two ways, one is an order from the host computer to the PLC, another way to allow the PLC send commands to the host computer, we use shallow way.