save diagnosis log failed by webservice

Hello,

According to the ABB website ,we use the following code to save a diagnosis log for a 1600 robot(real controller), there’s no file saved at all.

 -------------------------------------------

curl --digest -u "Default User":robotics -d "dstpath=/fileservice/$TEMP/sysdump/diagnostics.log" -X POST http://localhost/ctrl/diagnostics?action=save

 -------------------------------------------

Does anyone ecnounter this problem?

Thanks a lot.

Answers

  • Leon_dev
    Leon_dev Shanghai
    Hello, someone has any ideas for this issue? :/
  • NilsOlofsson
    NilsOlofsson Sweden admin

    Hello.

    Just to make sure, i want to know that you are checking for the file in the correct location on the controller?

    If you are and the file is not there i would like to know some things:

    What's the HTTP response status code?

    Did you try to subscribe to the location header so you could follow the status of the execution?    


    Nils Olofsson
    PC Software Support Engineer

  • Leon_dev
    Leon_dev Shanghai
    Dear Nils,please check the following information.Waiting for you reply.Thanks a lot.
  • NilsOlofsson
    NilsOlofsson Sweden admin
    Hello, your post data is incorrect. is somewhat unclear in the manual but the /progress/1;state&1 is your location header, so replace that parameter with you location header.
    your parameters should look something like:
     
    resource = 1 
    1 = Location header
    1-p = 0

    I am no to familiar with the http request library you are using so i tried to just give you some "pseudo code".



    Nils Olofsson
    PC Software Support Engineer

  • Leon_dev
    Leon_dev Shanghai
    Hello,
    We checked that in"https://developercenter.robotstudio.com/api/rwsApi/ctrl_diagnostics_states_subscribe.html" described [/progress/{id} : "location header" which is getting when "Save system diagnostics " operation is successfully done"], but we can't do  "save system diagnostics " opeation successfully..this seems to be a contradiction  :(.
    If possible,would you please give me a part of code that can successfully get the diagnostics file.
    Thanks a lot.
  • NilsOlofsson
    NilsOlofsson Sweden admin
    Hello.

    The save system diagnostics is an asynchronous operation. This means that the HTTP response you get only tells you that the call was successful, not the whole operation (since this will take some time). So with the response to the save system diagnostics call a location header will be sent. You can subscribe to this in order to get information on the actual status of the asynchronous operation.

    so to summarize, as long as you get an ok HTTP status code from the save system diagnostics call (i think it should be 202, maybe it's 200) you will get a location header sent along with the response. IF you do not get an ok HTTP status (bad call, some 400 status) please let us know. 

    lastly i really want to recommend using postman to test the http requests, it is easy to edit the request's and it also allows you to inspect the information sent with the response (headers, body, status code etc.)

    Nils Olofsson
    PC Software Support Engineer

  • barryjij
    barryjij ShangHai
    Dear Nils,as shown in the picture,I want to subscribe on Diagnostics States,and I need the "location header",but "location header" which is getting when "Save system diagnostics " operation is successfully done!!!

    Now,I send the request-"Save system diagnostics ",and get the return in the following picture ,do not contain "location header",why is this?


  • NilsOlofsson
    NilsOlofsson Sweden admin
    Hello.

    in the picture you are looking under the Body of the response, you will find the Location header under headers

    Nils Olofsson
    PC Software Support Engineer