vlitomsk Posted September 25, 2010 Report Share Posted September 25, 2010 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? Link to comment Share on other sites More sharing options...
vlitomsk Posted September 25, 2010 Author Report Share Posted September 25, 2010 Or maybe can you give me full datatable read/write query example to understand it? Link to comment Share on other sites More sharing options...
Saragani Posted September 26, 2010 Report Share Posted September 26, 2010 Maybe the message is too long, or maybe the checksum or something else is wrong. Can you show the binary data you've sent? Link to comment Share on other sites More sharing options...
vlitomsk Posted September 26, 2010 Author Report Share Posted September 26, 2010 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 Link to comment Share on other sites More sharing options...
Saragani Posted September 27, 2010 Report Share Posted September 27, 2010 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... 1 Link to comment Share on other sites More sharing options...
Saragani Posted September 27, 2010 Report Share Posted September 27, 2010 Hi vlitomsk, why did you delete your post? Link to comment Share on other sites More sharing options...
vlitomsk Posted September 28, 2010 Author Report Share Posted September 28, 2010 Because there is something wrong in the controller/etc, because working program using ASCII protocol doesnt' work. Today I'll try do it with the V280, I think it must work Link to comment Share on other sites More sharing options...
Saragani Posted September 28, 2010 Report Share Posted September 28, 2010 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... Link to comment Share on other sites More sharing options...
vlitomsk Posted September 28, 2010 Author Report Share Posted September 28, 2010 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. Link to comment Share on other sites More sharing options...
vlitomsk Posted September 29, 2010 Author Report Share Posted September 29, 2010 Yeah!!! Thanks you a lot!! It works on V280!! Maybe there are some problems in Ethernet card in V570. Link to comment Share on other sites More sharing options...
Saragani Posted September 30, 2010 Report Share Posted September 30, 2010 You are welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now