The most popular serial communication between Delt

2022-08-01
  • Detail

Realization of serial communication between Delta PLC and monitoring computer based on VB

Abstract: PLC is directly connected with the detection instruments and meters of the field control layer. It is a component of the bottom control network and the cornerstone of the factory automation system. Therefore, the realization of communication with the monitoring layer computer is of great significance to the optimal operation of the system. This paper discusses the communication between delta DVP PLC and monitoring computer based on VB

key words: VB communication protocol programmable controller

abstract: the PLC is a composing part of Internet, it links to the measuring instrument and device in field control layer directly, and is the footstone of factory automation system Therefore it is very important to realize the communication between PLC and monitoring layer computer for optimization of syste running. The paper discussed the related communication problems between Delta DVP PLC and monitoring computer based on Visual Basic.

key words: visual basic communication protocol programmable logic controller

[CLC No. tp273 [document identification code B Article No.

1 introduction

there are many kinds of equipment in the field equipment layer, including sensors, starters, drivers, i/o components, transmitters, valves, etc., of course, including field detection instruments and meters. PLC is an indispensable part of the field equipment control layer, and has been very popular. How to simply realize the interaction with PLC has become a new competitive battlefield for many manufacturers. As a result, human-computer interface has been generated And other software products. The appearance of these products simplifies the control and operation of PLC and makes the application of PLC more convenient; But it also has its common shortcomings, the price is generally high and the secondary development is poor. VB, as a "primitive" programming language, undoubtedly has obvious advantages in these two aspects. Combined with a simple case, this paper discusses how to realize the communication between PC and PLC through VB with a relatively basic concept, which may be helpful to engineers who are just involved in the field of control. In the field device layer, all kinds of devices can be connected to the computer, and the simplest automatic connection method is to use serial communication. VB provides serial communication controls to enable developers to develop system programs for serial communication. The following is a rough discussion of related issues

2 basic concept of serial communication

there are two types of communication in data communication, namely parallel communication and serial communication. For example, if 8-bit data needs to be transmitted, the parallel communication can complete the 8-bit transmission amount at one time; The serial can only transmit 1 bit at a time. Figure 1 shows two different communication modes. There are also two commonly used serial communication modes, namely RS-232 and RS-485

2.1 RS-232 serial communication

rs ensures that the dimensional accuracy of the vehicle body fully reaches the customer's requirements. The signal level of -232 is in terms of the reference ground wire, as shown in Figure 2. Transmitting data relative to the reference ground terminal 1; The receiving end reproduces the transmitted data of the transmitting end relative to the reference ground terminal 2

Fig. 2 Schematic diagram of RS-232 serial communication

it can be seen from Fig. 2 that since the two grounding terminals are not necessarily the same and are easily disturbed, it is easy to generate errors when the signal is transmitted on the RS-232 line

2.2 RS-485 serial communication

rs-485 signal transmission mode is shown in Figure 3

rs-485 signal will be divided into positive and negative lines when it is transmitted. When it reaches the receiving end, it will be subtracted and restored to the original signal; If the original signal is expressed as (DT), and the divided signals are marked as (d+) and (d-), dt= (d+) - (d-). Similarly, after receiving the signal, the receiving end will revert to the original state according to the above formula. If the line is disturbed, the signals of the two lines are (d+) +noise and (d-) +noise respectively. The restored signal at the receiving end is (DT) = [(d+) +noise - it has not yet formed an internationally competitive system level standardized product [(d-) +noise, which is the same as the previous results, so RS-485 can effectively prevent noise interference.

3 basic concept of VB

vb (Visual Basic) It is Microsoft's window software. It provides many members to connect 277 UPVC building drainage pipe fire resistance ring. Objects, attributes, events and methods are four important interfaces. VB provides many commonly used controls

3.1 volume label control

volume label control is shown in Figure 4 (a). This control is dedicated to displaying text and numbers. The display is shown in Figure 4 (b). The

3.2 button control

button control is shown in Figure 5 (a). This control has a high utilization rate. It provides a button for system users to operate, as shown in Figure 5 (b)

Bamboo fiber (i.e. bamboo raw fiber)

3.3 timer control

timer control is shown in Figure 6. The maximum function of this control is to execute the set program code once within a fixed time

vb provides a large number of controls, which will not be described here

Copyright © 2011 JIN SHI