Jump to content
Sign in to follow this  
vlitomsk

Reading Data Tables

Recommended Posts

Hello again.

I've tried to read data tables from the PLC. I wrote program in Java, and it doesn't work. Query was created by myself, checksums was calculated by myself. This program worked successfully , when I tried to read one MI. But when I run this program, and sometimes it throws exception (Connection reset), sometimes it doesn't write something to the screen few minutes, and I have to stop that. Can you help me? There isn't problems in the cable/etc.

Here is the source: http://pastebin.com/GkFssHiG .

I've Vision V570 model, and when entered to the Ethernet monitor from the INFO MODE, saw that RX and TX count = 0. But on the PC, RX and TX count increases when running program.

Where is the problem?

Share this post


Link to post
Share on other sites

Here is hex dump:

TCP header (for communication over Ethernet): 01 00 66 00 3B 00

Header section: 2F 5F 4F 50 4C 43 01 FE 01 00 00 00 04 00 00 00 00 00 00 00 20 00 19 FD

Details section: 04 00 01 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Footer section: F7 00 5C

Share this post


Link to post
Share on other sites

Correct me if I'm wrong, but:

2F + 5F + 4F + 50 + 4C + 43 + 01 + FE + 01 + 04 + 20 = 2E0

So the checksum will be 0xFD20

And

04 + 01 + 04 = 9

So the checksum is 0xFFF7

This means that your checksum calculation function is wrong. Please show me your code...

  • Upvote 1

Share this post


Link to post
Share on other sites

Check the UnitID of the PLC, Check the cable, check that you are calling the right serial port / Ethernet IP (Maybe it got changed)

Maybe your firewall is blocking the communication...

Share this post


Link to post
Share on other sites

Today I checked communication over ASCII format between PC and V280. It works :( Tomorrow, I'll try write program with your recommendations(checksum calculation), and write results here.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...