Menu

CPU : Block download sequence failed. S7- CPU 414-3

2015-06-12
2016-06-02
  • Jorge Rodriguez

    Jorge Rodriguez - 2015-06-12

    Hi, i have a problem when downloading blocks to the PLC, i can do a full upload of the blocks but when i try to download them , the message 0x01A appears which is for "Block download sequence failed"
    according to the manual. i even tried downloading using one demo provided in the full package of Snap7 and the same message appears when downloading.

    Any help would be appreciated, thank you.

     
  • Davide Nardella

    Davide Nardella - 2015-06-14

    Try the new 1.4.0 release.

     

    Last edit: Davide Nardella 2015-06-14
  • Jorge Rodriguez

    Jorge Rodriguez - 2015-06-15

    Thanks, i just tried with this version (1.4.0) and the same error appears, what am i doing wrong?

    also the demo in "\snap7-full-1.4.0\rich-demos\x86_64-win64\bin" has the same issue.

    Thank you for yor help.

     
  • Davide Nardella

    Davide Nardella - 2015-06-16

    I just tested with WinAC which has 480 bytes of PDU just like S7400 and it works.

    Are you sure of Rack and slot used ?, with S7400 and WinAC you could connect to the Communication Processor instead of the CPU.

    After connection, into Directory TAB do you see the correct list ?

    Do you have this problem for "all" blocks or only for some of them ?

    I don't have a CPU 414 to make a direct test sorry...

     
  • Jorge Rodriguez

    Jorge Rodriguez - 2015-06-16

    I have tested now with a 417-4H PLC and same problem occurs.

    I believe im using the correct Rack and Slot because when i get the list of objects they are the ones that should be in the CPU.

    I have only tested the download with DBs and FCs, and both failed.

    Heres the code im using to download the blocks. i just do a fullupload and then a download.

    int num = 5;
                Client = new S7Client();
    
                Completion = new S7Client.S7CliCompletion(CompletionProc);
                Client.SetAsCallBack(Completion, IntPtr.Zero);
    
                // Try Connection
                if (PlcConnect(localdev.ip, localdev.Rack, localdev.Slot))
                {
    
                    plc_obj_DB obj = new plc_obj_DB();
                    obj.Data = new byte[0x1000]; 
                    obj.Size = obj.Data.Length;
    
                    int res = Client.FullUpload(Snap7.S7Client.Block_DB,num,obj.Data,ref obj.Size);
                    if( res == 0)
                    {
                        lbl_stat.Text = "Objeto leido.";
                    }
                    else
                    {
                        MessageBox.Show("No se pudo obtener el objeto." + Client.ErrorText(res));
                        return;
                    }
    
                    int stat = Client.Download(num,obj.Data, obj.Size);
                    if(stat == 0)
                    {
                        lbl_stat.Text ="Descargado con exito";
                    }
                    else
                    {
                        lbl_stat.Text ="No se pudo descargar el objeto. " + Client.ErrorText(stat);
                    }
    
                    Client.Disconnect();
                }
    
     
  • Davide Nardella

    Davide Nardella - 2015-06-16

    Just tested your code and works fine : S7315-2PN/DP, IM151-8, WinAC Basis 4.1.

    The code is correct, unlukily I don't have a CPU 414 to make a direct test and see what's wrong.

     

    Last edit: Davide Nardella 2015-06-16
  • Jorge Rodriguez

    Jorge Rodriguez - 2015-06-16

    Ok, thank you Dave, do you believe that there could be some incompatibility with 414-3 and 417 CPUs or what could be the issue in here?

    Thanks for testing the code and for your support.

    EDIT: Heres a comparison between the download frames using Snap7 and Simatic Manager.

    Heres something i found while examining the frames, in the header when i download a block using Simatic Manager the PDU Reference does not change from request to request, and with Snap7 it does. Is this something normal? *EDit: sorry, now i see this is used as reference by the protocol.

    Edit #2:
    I believe that maybe the payload data (those 42 bytes) missing in the request may be the reason that the PLC is sending that error (look at the attached image "comparison_requests_acks_downloadfb").

    Seems strange to me that with snap7 the response is just described as "ACK" and with s7 manager is "ACK_Data", Also there is a difference with the parameter ROSCTR and the "Parameter Length" value.

    Thank you for your support, hope this describes my problem a little better.

     

    Last edit: Jorge Rodriguez 2015-06-16
  • Edouard Bedoucha

    I looked on my side (315-2PN/DP), my Request is quite the same as yours (DB instead of FB). With S7 manager is it working ?
    In my case, i have an Ack_data but in a woring dowload.(The diff for the Ack is not about if it's working or not ?)

     
  • Jorge Rodriguez

    Jorge Rodriguez - 2015-06-17

    Its working with s7 manager, and yes i believe that when the PLC answers with an ACK_Data means that the download will work and if it answer only with Ack it means it will not and there will be an error code like the one in the image. In other words the PLC is letting know the client that it received the request but for some reason that request cant be processed.

     

    Last edit: Jorge Rodriguez 2015-06-17
  • Davide Nardella

    Davide Nardella - 2015-06-19

    Hi
    thanks to all for the cooperation ;)

    Another boy made some test also with IBH Softec SoftPLC and noticed that there is a 0x00 that should be 0x01 (Jorge, the errorcode that I call Uk[1]).

    In attach you will find the two (32/64) dll modified.

    In S7300/WinAC for me there is no difference (also the old works fine)

    Please test them with your S7400 and let me know ... ;)

    Many thanks
    Davide

     
  • Jorge Rodriguez

    Jorge Rodriguez - 2015-06-19

    Thank you, I'll test it and let you know what happened.

    Edit: i just tested it and now the download sequence is completed but the PLC is now throwing an "insert block refused" error.

    i believe this happens at the end of the sequence, im attaching an image that show the last response from the PLC with the error.

     

    Last edit: Jorge Rodriguez 2015-06-19
  • peter

    peter - 2016-06-02

    Hi Jorge,

    I tested the above dll with my S7-400 PLC CPU 412-5H, got a same issue with yours, snap7 tool failed to download blocks to PLC.

    Is the problem resolved at your end? How to resovle? Thanks!

     

Log in to post a comment.

MongoDB Logo MongoDB