blueskit / MitsubishiPlcProtocol

三菱PLC(Mitsubishi)通讯协议的C#实现,支持FX、Q系列的ASCII-3E、BIN-3E、FX串口格式。
MIT License
288 stars 152 forks source link

Multiple connection support #7

Open arkypita opened 5 years ago

arkypita commented 5 years ago

I apologize if I ask for information here, but I have not found any other places to talk about communication with Mitsubishi PLC.

I have developed a C # program that communicates with a Misubishi PLC, using your code.

What happens is that if I connect two instances of this program, the first instance connects and can read the data from the PLC, while the second instance connects but does not get the response packets to its own read requests. The second instance is able to complete the reading only when the first instance is disconnected.

It seems that the PLC does not support two connected readers simultaneously. Could it be? Is there any confirmation of this problem in some documentation? I could not find anything!

Thanks for any kind of support. Diego

Ted-Huang commented 5 years ago

Hi, I have same issue like you do. Did you find the solution eventually? Thanks.

arkypita commented 5 years ago

I had to ask the PLC programmer to open a second TCP port to connect with another instance of my software.

Ted-Huang commented 5 years ago

good to know! Thanks for your reply

kowiste commented 3 years ago

Hi i'm trying to communicate with a Mitsubishi R08CPU, later I want to convert to golang this library, but cant find the way to configure it. @arkypita Could you tell, I have to activate cclink IEF Basic setting in the PLC? Any other parameter? how you open the port? Thank you

arkypita commented 3 years ago

I am not the PLC guy, so I don't know what changes was done in the PLC to activate the secondary port, but if you do a google search for "melsec tcp port" and switch to "image search" you can find lot of screenshot that can help you find a way.