Megmeet PLC - how the PLC communicates with the host computer

Create Date: 2024-8-30 12:03:23|Source: MEGMEET

The PLC communicates with the host computer, and BlandC is used to write the communication program between the host and the PLC, and the COM1 port must be initialized, the baud rate is 9600bps, and the parity check bit adopts even check, and the seven-digit valid data is used.

When the computer receives the ACK response character from the PLC, it can enter the data communication.

The computer can read, write and force ON/OFF operations on each software device in the PLC. Except for the PLC's timer and counter setpoint constants, as well as the data in the file registers, all switching inputs, outputs, and software devices of the FX2N series PLC are transparent to the computer.

In order to ensure the accuracy of the communication between the host and the PLC, the host computer must also be carried out and verified according to the communication protocol. If the received information is incorrect, it will be re-read. If it persists after 3 repetitions, an error message is displayed.

Using C language to achieve the above programming, the host can also write data to the PLC for single-point strong proximity positioning and reset.

Before using an external device to communicate with a programmable controller, it is necessary to specify some parameters such as data length, parity, stop bits, and baud rate, i.e., the communication format.

The communication format is set by a four-digit hexadecimal number, which is set to H6880, which means that the data length is 7 bits, the terminator is 7 bits, the parity is none, the control line is RS232 interface, the stop bit is 1 bit, and the check is automatically added, the baud rate is 9600BPS, the protocol is a dedicated protocol, the title is none, and the transmission control protocol is the protocol format 1.

The communication format is first set in the PLC. The communication format of the protocol format stipulates the control code, station number, PC number, command, message waiting, and check code in turn. In the FX series of programming controllers, the station number is set by means of a special register D8121. The setting range is from 00H to 0FH.

In the test bench, because the host computer only communicates with a PLC pneumatic test bench, the station number is 00H. THE PC NUMBER IS THE NUMBER USED BY THE A-SERIES MELSECNET(II) OR MELSECNET/B TO DETERMINE THE CPU OF A PROGRAMMABLE CONTROLLER. The PC number of the FX series is FFH, which is represented by two ASCII characters, i.e. "FF".

Commands are used to specify the required operations (e.g. read, write), and the main commands used in this control software to send to the PLC are:

Batch readout of BR commands for bit elements; Batch write BW instructions for bit components; Force PLC to run (RUN) RR commands; FORCE PLC TO STOP (STOP) RS COMMAND.

A message wait is a delay required by a computer to transition between the send and receive states. and the check code is used to determine that the data in the message has not been corrupted. It is calculated by adding and checking the hexadecimal values of ASCII characters in the region.
Megmeet PLC - how the PLC communicates with the host computer

More on that
Megmeet inverters – what are the development directions of inverter-related technologies? Megmeet inverters – what are the development directions of inverter-related technologies?

1. Intelligent network The intelligent inverter does not need to set a lot of parameters when it is used, and it has the function of fault self-diagnosis, which has high stability, high reliability and practicability. The Internet can be used to realize the linkage of multiple inverters, and even the inverter complex in the factory.

Megmeet PLC – System integration for PLC Megmeet PLC – System integration for PLC

In the manufacturing industry, there are a large number of open-loop sequential control based on switching quantities, which carries out sequential action numbers according to logical conditions and operates in chronological order; In addition, there is the control of chain protection actions according to the logical relationship that is not related to the sequence and timing; As well as a large number of switching quantities, pulse quantities, gauges...

Megmeet Inverter - Precautions for the Use of Inverter (1-10) Megmeet Inverter - Precautions for the Use of Inverter (1-10)

1. The inverter must be selected correctly. 2. Read the product manual carefully, and wiring, installation and use in accordance with the requirements of the manual. 3. The inverter device should be reliably grounded, and the radio frequency interference should be suppressed to prevent the inverter from causing electric shock due to leakage. 4、 ...

Megmeet PLC – three connection methods for PLC and frequency converter Megmeet PLC – three connection methods for PLC and frequency converter

1. Use the analog output module of the PLC to control the inverterThe analog output module of the PLC outputs a 0-5V voltage signal or a 4-20mA current signal, which is used as the analog input signal of the inverter to control the output frequency of the inverter. This control method is simple to wiring, but requires the option to ...

New Arrivals! Hollysys' two blockbuster products were unveiled at the Zhongguancun Forum Technology Trading Conference New Arrivals! Hollysys' two blockbuster products were unveiled at the Zhongguancun Forum Technology Trading Conference

On September 24, the 2021 Zhongguancun Forum, co-sponsored by the Ministry of Science and Technology of China, the Chinese Academy of Sciences, the China Association for Science and Technology, and the Beijing Municipal People's Government, officially opened in Beijing. As one of the main agendas of the forum, the Zhongguancun International Technology Exchange Conference closely follows the "smart· healthy· carbon neutrality...

Megmeet PLC – the three output types of PLC Megmeet PLC – the three output types of PLC

The first is relay output, the relay output response speed is slow, the output current is large, generally can reach 2A, but the electric shock life is short, the output frequency is low, the maximum is 1HZ; The second is transistor output, the transistor output response speed is fast, the output current is small, and the contact life is relatively small.

Megmeet welding machine - resistance welding or laser soldering who is more suitable for electronics industry applications Megmeet welding machine - resistance welding or laser soldering who is more suitable for electronics industry applications

Today's electronics industry revolves around high-speed communication and supercomputing on the Internet, and the requirements for electronic products are getting higher and higher. A large number of micro-precision electronic products are constantly testing the response speed and level of major enterprises in the market. Electronics manufacturers perform real-time, accurate ...

Hollysys edge intelligent controller and edge intelligent all-in-one machine launched new products Hollysys edge intelligent controller and edge intelligent all-in-one machine launched new products

Transportation power, urban rail responsibility. With the vigorous development of emerging technologies such as 5G, cloud computing, big data, and artificial intelligence, more innovative technologies are accelerating the empowerment of urban rail transit, and smart urban rail is ushering in a "golden age" of development. As a deep cultivator in the field of smart urban rail, Hollysys adheres to technological innovation.

Megmeet PLC maintenance inspection Megmeet PLC maintenance inspection

PLC maintenance and inspection steps: 1. Check and make sure the mains power is on (120 VAC) 2. Check the available 24V power supply 3. Identify problem areas. It is recommended that peak currents cover this error code, a control method consisting of multiple components distributed over an area or process.

Megmeet PLC - the basic composition of PLC Megmeet PLC - the basic composition of PLC

a. Power supply The power supply of the PLC plays a very important role in the whole system. It can't work properly without a good and reliable power supply system, so PLC manufacturers also attach great importance to the design and manufacture of power supplies. General AC voltage fluctuations are +10% (+15%) ...

Megmeet inverter - the daily maintenance and overhaul of the inverter Megmeet inverter - the daily maintenance and overhaul of the inverter

1. Regularly dust the inverter, focusing on the rectifier cabinet, inverter cabinet and control cabinet, if necessary, the rectifier module, inverter module and the circuit board in the control cabinet can be removed for dust removal. Whether the lower air inlet and upper air outlet of the inverter are dusty or blocked due to excessive dust. The inverter is due to the ...

Introduction to Megmeet welding machine Introduction to Megmeet welding machine

The EhaveCM350AR is a fully digital inverter melting multi-functional industrial heavy-duty Megmeet welding machine launched by Megmeet for global metalworking manufacturing. It brings customers higher quality and higher efficiency welding experience and value with excellent arc characteristics, reliability and high efficiency, and helps customers ...

Megmeet PLC - What are the steps to complete PLC commissioning? Megmeet PLC - What are the steps to complete PLC commissioning?

1. Check the circuit according to the drawing (without power transmission) The drawings of the general PLC system include two parts: the drawings in the cabinet and the drawings outside the cabinet; The drawing in the cabinet refers to the wiring diagram inside the cabinet; The out-of-cabinet drawings are the wiring diagrams of all electrical cabinets. This part needs to be checked for; ...

Megmeet inverter - over-temperature protection for common fault analysis and treatment of inverter Megmeet inverter - over-temperature protection for common fault analysis and treatment of inverter

1. Over-temperature protection of inverter and its necessity The temperature protection function of the inverter is an indispensable condition to ensure the stable operation of the inverter; In the main circuit power device of the inverter, the rectifier bridge and the inverter bridge are semiconductor power devices.

Megmeet inverter - the basic method and steps of inverter commissioning Megmeet inverter - the basic method and steps of inverter commissioning

1. No-load energizing test of inverter 1. Ground the grounding terminal of the inverter. 2. Connect the power input terminal of the inverter to the power supply through the leakage maintenance switch. 3. Check whether the factory display of the inverter window is normal, if it is incorrect, it should be reset, otherwise it should be ...

Megmeet PLC - What are the features of the PLC program? Megmeet PLC - What are the features of the PLC program?

1. Correctness (low debugging cost) First of all, the PLC program must be able to work correctly to meet the requirements of the actual control process. This is the essence of the PLC program, and if you don't do that, nothing else makes sense. 2. Reliability (low maintenance cost) Not only to ...

Megmeet inverter - common faults and treatment methods of high-voltage inverters Megmeet inverter - common faults and treatment methods of high-voltage inverters

The high-voltage inverter has a highly intelligent computing level and a perfect fault detection circuit, and can provide accurate positioning of all faults, and make clear instructions on the main control interface. In practical application, we find that common faults can be divided into abnormal control channels, IGBT overcurrent, overvoltage...

Megmeet drives – a common fault in low-voltage drives Megmeet drives – a common fault in low-voltage drives

External electromagnetic interference can easily cause malfunctions If there are interference sources around the inverter, they will invade the inside of the inverter through radiation or power lines, causing the control loop to malfunction, causing abnormal operation or shutdown, and even damage to the inverter in severe cases. Noise suppression on the outside ...

Megmeet PLC - What places should be avoided when installing PLC control? Megmeet PLC - What places should be avoided when installing PLC control?

(1) The ambient temperature exceeds the range of 0-50 °C; (2) The relative humidity exceeds 85% or there is dew condensation (caused by sudden temperature changes or other factors); (3) direct sunlight; (4) There are corrosive and flammable gases, such as hydrogen chloride, ...

Megmeet inverter - precautions for inverters at high temperatures Megmeet inverter - precautions for inverters at high temperatures

1. Carefully monitor and record the display parameters on the man-machine interface of the inverter, and reflect the abnormality immediately; 2. Carefully monitor and record the ambient temperature of the frequency conversion room, and the ambient temperature should be between -5 °C and 40 °C. The temperature rise of the phase-shifting transformer should not exceed 130°C; 3. Summer ...

CATEGORIES BYPASS
Customer Service Center

Online Consultation:QQ


ContactContact

Contact: Manager Huang

Contact QQ: 3271883383

Contact number: 13522565663


Scan the code to add WeChat (please save the picture first on the mobile phone)

working hoursworking hours

Weekdays: 9:00-17:00

Holidays: Only emergencies are handled

Contact us

Contact us

Contact number QQ consultation
QQ consultation

3271883383

Company address
Back to top