Zuviel Werbung? - > Hier kostenlos beim SPS-Forum registrieren

Results 1 to 2 of 2

Thread: Communication between Libnodave and WinAC RTX

  1. #1
    Join Date
    Erhielt 0 Danke für 0 Beiträge


    Zuviel Werbung?
    -> Hier kostenlos registrieren

    First of all, sorry for writing in english but I don't speak German very well. I hope this isn't to big of an issue.

    I'm currently doing an intership and they have a problem with the communication between Libnodave and WinAC RTX.
    Libnodave was working fine with the IBHSoftec PLC, but isn't working correctly with the WinAC RTX Softplc.
    They are currently using Libnodave, and want to keep using it. However, they want to change from an IBHSoftec softPLC to WinAC RTX softPLC's.

    So my assignment is to get Libnodave communicate with WinAC RTX. Unfortunately, I am not the best java programmer, nor do I have a lot of knowledge of PLC's, but hey, that's why I am doing an intership.

    I am using:
    - WinAC RTX SoftPLC
    - Libnodave-java-0.1

    After going through the code I noticed that when the program enters testReadReult() in the class PDU, it tries to read mem[param] and compares this with FUNC_READ which is 4. Since param = 17, I tried looking at what the current value of mem[17] is, which is 1. The function returns RESULT_UNEXPECTED_FUNC, which is -128, back to the function readBytes() and this is where it goes wrong. Since the returned value -128, which is saved as res in the function readBytes, is now being compared with RESULT_OK, which is 0 and then the program ends.

    I am guessing something is going wrong when the program is reading out the header bytes of the datablock.

    At the moment I am not sure what to search for, or where to search. So if anyone has any hints or tips those would be greatly appreciated!

    Thanks for any replies!
    Last edited by Jornn; 18.02.2015 at 11:52.
    Reply With Quote Reply With Quote Communication between Libnodave and WinAC RTX  

  2. #2
    Join Date
    Erhielt 1,437 Danke für 1,064 Beiträge


    the main problem with the java version of libnodave is, that is hasn't seen any of the updates and bugfixes that the C library of libnodave has, for the last 10 years.

    So it's possible that there are other unfixed bugs.

    The communication the WinAC RTX fails, because the java version of libnodave doesn't handle the TPKT/ISO packets correctly.
    A special thing with all Siemens PC versions is, that they send a so called "fast ack" option for S7 communication.

    The response telegram from this partner sends at first a TCP packet including a TPKT/ISO packet of minimum size (7 bytes overall) where the "Last data unit" flag in the ISO part is not set. After this another TCP packet follows (or possible in a single TCP telegram), with the S7 data and set "Last data unit" flag in the ISO part.
    As a simple solution, the driver should check the "Last data unit" flag, and read from the TCP socket as long as this is flag not set, and reassemble that payload of the TPKT/ISO stack. This is what you have to fix if you want to use the java version of libnodave.

  3. Folgender Benutzer sagt Danke zu Thomas_v2.1 für den nützlichen Beitrag:

    Jornn (19.02.2015)

Similar Threads

  1. Replies: 7
    Last Post: 17.09.2013, 15:01
  2. Zugriff auf WinAC RTX mit LibnoDave
    By rm2001 in forum Hochsprachen - OPC
    Replies: 2
    Last Post: 27.04.2012, 20:31
  3. Unterschied WINAC RTX und WINLC RTX
    By Sepp1301 in forum Simatic
    Replies: 2
    Last Post: 05.07.2011, 15:16
  4. WinAC RTX PB und PN
    By cabman in forum Simatic
    Replies: 2
    Last Post: 20.05.2011, 12:09
  5. Replies: 10
    Last Post: 26.10.2010, 11:24


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts