NgoHoang

Send Data From PC to PLC by Ethernet

9 posts in this topic

Dear All!

After research some thing, I communicate to PLC Mitsubishi Q06UDV CPU from PC by ethernet.

1. I config PLC is MC_Protocol as image 1. 

2. I send a cmd read data (pink color) at D device (cmd 0401) and PLC have a response (black color) as image 2.

3. But data receive is wrong. 

Could you tell me, why PLC have a response but don't have data ? The message to read a device in PLC?

Thanks and best regard!

 

 

Capture1.JPG

Capture2.JPG

Capture3.JPG

Edited by NgoHoang

Share this post


Link to post
Share on other sites

Hi!

First of all: I'm assuming you have developed the code using MC 4E frame coding.

Your request is not correct, I have only looked at the beginning: 540000000401..... (04 and 01 are both supposed to be 00 00) since they are [fixed] in the protocol spec. The last two bytes of the subheader are always 00 00 and not 04 01 like you have. So you should start with checking your initial request.

Also: What does the asterix in your request/response indicate?

Share this post


Link to post
Share on other sites

Thanks kaare_t!

Could you tell me, with the 4E frame, I want to read data from D0 to D4 device, what do I send to PLC?

Thanks and best regard!

Share this post


Link to post
Share on other sites

Here's a screenshot from the manual, from the message section. As you can see your CPU interprets your request as a valid request, but your are probably requesting the wrong areas. Also, as mentioned your subheader looks funny. Take a look at the screenshot try again, and post the results.

Also, again: What does the asterix in your 'Hercules' software indicate?

4e.png

Share this post


Link to post
Share on other sites
18 hours ago, kaare_t said:

Here's a screenshot from the manual, from the message section. As you can see your CPU interprets your request as a valid request, but your are probably requesting the wrong areas. Also, as mentioned your subheader looks funny. Take a look at the screenshot try again, and post the results.

Also, again: What does the asterix in your 'Hercules' software indicate?

4e.png

Thanks the reply!

"Hercules" is a tool that I set is a TCP Client and will connect to PLC (IP and Port same with config of MC_Protocol).

"Hercules" connect with PLC via MC_Protocol successful.

I have just send 54000100000000FFFF03000C00100001040000D*0000000100 to read data from D0 (cmd 0401) but no response from PLC.

Could you tell me about:

   "Serial  No.", "network No.","PC No.", "Request Destination I/O No" is what? I only use Computer send to PLC by "Hercule.exe".

If you have any tool to test it, can you give me the name?

 

Edited by NgoHoang

Share this post


Link to post
Share on other sites

Dear!

In the PLC Mitsubishi Q06-UDV CPU, Can I change the Frame for it? (Now it use 4E frame, I wan to config to 3E frame)

Thanks and best regard!

Share this post


Link to post
Share on other sites

First of all, sorry for my late reply to this topic.

Hercules looks like a nice tool and I am sure it is fine for testing, I just wondered what all the "*" means. I don't have any special tools anymore, so just keep using what you're familiar with.

Regarding the frame format, I did some investigation and it looks like you must use 3E frame when using the built-in Ethernet port of the CPU (the built-in port simply does not support 4E). I honestly wasn't aware of this limitation in the built-in Ethernet port. When that is said, you don't have to change anything in the PLC, just rewrite your requests and you should receive correct responses.

Share this post


Link to post
Share on other sites
On 9/9/2017 at 3:23 PM, kaare_t said:

First of all, sorry for my late reply to this topic.

Hercules looks like a nice tool and I am sure it is fine for testing, I just wondered what all the "*" means. I don't have any special tools anymore, so just keep using what you're familiar with.

Regarding the frame format, I did some investigation and it looks like you must use 3E frame when using the built-in Ethernet port of the CPU (the built-in port simply does not support 4E). I honestly wasn't aware of this limitation in the built-in Ethernet port. When that is said, you don't have to change anything in the PLC, just rewrite your requests and you should receive correct responses.

Thanks kaare_t support!

Now i can transfer data from PLC to PC by MC Protocol.

Last time, I wrong the format. I see the serial number of CPU and it support 1E frame.

With the 1E frame, I use the cmd from Hercules send and receive data is ok.

Thanks alot

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now