Mainly through the c # read mitsubishi PLC data through Ethernet,
I see a third-party DLL HslCommunication, MX, and "LFL g-kong blog" http://blog.sina.com.cn/s/blog_16d7d3ecb0102x6wj.html, provided by the DLL, HslCommunication need to collect fees, MX need to install to use computer, "LFL g-kong blog" also needs to pay, the underlying code is not opened,
To use c # socket peer PLC, then about mitsubishi protocol, such as MC this is what the agreement? This agreement only refers to the sending data needs to be in accordance with the agreement of the definition of special arrangement format? Under the great god said that, what about the agreement,
A great god can provide about mitsubishi PLC communication source code, learning,
CodePudding user response:
Basic is a serial port directly plugged into the computer. Don't need a third party plug-in directly through a serial port receives.
If it is even on other computer.. So you can't read directly.. May need such as serial port server can set is TCP/IP model or other model.
As for the agreement. According to the actual situation of equipment.
Actually is also a heap of byte data. What a mean.
CodePudding user response:
You can use the OPC
CodePudding user response:
The PLC manual, each PLC has its own protocol format
CodePudding user response:
The
references a line on the second floor, Jon response: can use OPC OPC don't need to care about the agreement? OPC is through the interface to get the data? Don't need to know the PLC agreement? CodePudding user response:
There are many kinds of dde opc modbus, CodePudding user response:
Mitsubishi FX3U series with the cable connection, you can use Interop. ActProgTypeLib, very simple, a few lines of code can be done, You can search ActProgTypeLib CodePudding user response:
Have communication documents, according to the document format it is ok to send and receive, is very simple CodePudding user response:
reference yy response: 6th floor program mitsubishi FX3U series with wiring, can use Interop. ActProgTypeLib, very simple, a few lines of code can be done, You can search ActProgTypeLib MX does not support 64 - bit, CodePudding user response:
There are many kinds of PLC and PC communication protocol, you can use a custom protocol, you can also use the PLC special agreements, such as MODBUS etc, proprietary protocols need to refer PLC protocol format, CodePudding user response:
Use serial port controls access to data, then according to the protocol parsing, I ever read with this equipment M0 signal, first contact hardware make me miserable, Byte [] byteBuffer=new byte [] {0 x02, 0 x30, 0 x30, 0 x31, 0 x30, 0 x30, 0 x30, 0 x31, 0 x03, 0 x35, 0 x35}; SerialPort1. Write (byteBuffer, 0, byteBuffer. Length); This is a read signal, Byte [] rs=new byte [serialPort1 BytesToRead]; SerialPort1. Read (rs, 0, rs. Length); Bool info=false; String QSSS=""; for (int i=0; i { [I] QSSS +=rs. ToString (" X2 ") + ""; If (rs [I]. ToString (" X2 ".) the Equals (" 31 ") | | rs [I] ToString (" X2 ".) the Equals (" 34 ")) { Info=true; } } The return value contains 31 or 34 OK signal, perform other operations CodePudding user response:
PLC manufacturer should be able to provide protocol and function interface, the best solution directly ask factory technicians, CodePudding user response:
reference autumn leaf no reply on the eighth floor: Quote: refer to the sixth floor program yy reply: Mitsubishi FX3U series with the cable connection, you can use Interop. ActProgTypeLib, very simple, a few lines of code can be done, Can search ActProgTypeLib MX does not support 64, Compiled into 32 bits CodePudding user response:
references to the tenth floor rabbit family - second brother reply: use serial port controls access to data, and then according to the protocol parsing, I ever read with this equipment M0 signal, first contact hardware make me miserable, Byte [] byteBuffer=new byte [] {0 x02, 0 x30, 0 x30, 0 x31, 0 x30, 0 x30, 0 x30, 0 x31, 0 x03, 0 x35, 0 x35}; SerialPort1. Write (byteBuffer, 0, byteBuffer. Length); This is a read signal, Byte [] rs=new byte [serialPort1 BytesToRead]; SerialPort1. Read (rs, 0, rs. Length); Bool info=false; String QSSS=""; for (int i=0; i { [I] QSSS +=rs. ToString (" X2 ") + ""; If (rs [I]. ToString (" X2 ".) the Equals (" 31 ") | | rs [I] ToString (" X2 ".) the Equals (" 34 ")) { Info=true; } } Return value contains 31 or 34 OK signal and perform other operations isn't PLC the data returned to hexadecimal data? CodePudding user response:
Most PLC support modbusTCP, I now in use, the helper classes next DLL can be read CodePudding user response:
Link: https://pan.baidu.com/s/1CiIPdpMmGv8FNQ_nlnACXQ The extracted code: 0 w0t Mitsubishi PLC communication documents, can write their own according to the inside of the form CodePudding user response:
OPC is charge, have cracked versions, but also trouble to configuration, a lot of PLC provides a DLL library, but it is in accordance with the instructions to write their own, direct access to the relays and register, mitsubishi and panasonic are well written, omron excuse me, write their own benefit is convenient to use later, Siemens can write their own, but Siemens S7 mentioned a free libraries, directly in a more simple, CodePudding user response:
Mitsubishi so high-end equipment generally support the modbus or upper level protocol of opc, as for the underlying communication RS232/RS485 or TCP/IP, if supported modbus or opc USES the DLL they provide good, if there is no need to read data from the register analysis, the original poster can download modbus or opc simulator, which is related to the DLL, the other to catch up with the binary stream, a serial port and the socket, speaking, reading and writing, basically all know, CodePudding user response:
reference 13 floor autumn leaf no reply: Quote: reference to the tenth floor rabbit family - second brother reply: Use serial port controls access to data, then according to the protocol parsing, I ever read with this equipment M0 signal, first contact hardware make me miserable, Byte [] byteBuffer=new byte [] {0 x02, 0 x30, 0 x30, 0 x31, 0 x30, 0 x30, 0 x30, 0 x31, 0 x03, 0 x35, 0 x35}; SerialPort1. Write (byteBuffer, 0, byteBuffer. Length); This is a read signal, Byte [] rs=new byte [serialPort1 BytesToRead]; SerialPort1. Read (rs, 0, rs. Length); Bool info=false; String QSSS=""; for (int i=0; i { [I] QSSS +=rs. ToString (" X2 ") + ""; If (rs [I]. ToString (" X2 ".) the Equals (" 31 ") | | rs [I] ToString (" X2 ".) the Equals (" 34 ")) { Info=true; } } nullnullnullnullnullnullnullnullnullnullnullnullnullnullnull