+ Post New Thread
Results 1 to 12 of 12
  1. #1
    Junior Member level 3
    Points: 387, Level: 4

    Join Date
    Oct 2017
    Posts
    27
    Helped
    0 / 0
    Points
    387
    Level
    4

    Export ADS equations to text file?

    I'm simulating my circuit in ADS. I was successful with exporting variables to text file using write_var. But I do not know how to export equations (from MeasEqn blocks) to text file. I've tried but it gave the following error: Evaluation failed for 'x5 = write_var("PCE_area.txt","W","PCE area","","f", 3, PCE_Curve1)': "x5": operand: invalid field access.

    Please have a look at my circuit and the MeasEqn blocks. PCE_Curve1 is a scalar as attached. Any advice is highly appreciated.

    Click image for larger version. 

Name:	My schematic.JPG 
Views:	7 
Size:	158.2 KB 
ID:	150878
    Click image for larger version. 

Name:	PCE curve.JPG 
Views:	23 
Size:	10.7 KB 
ID:	150879

  2. #2
    Advanced Member level 5
    Points: 12,125, Level: 26

    Join Date
    Apr 2014
    Posts
    1,892
    Helped
    758 / 758
    Points
    12,125
    Level
    26

    Re: Export ADS equations to text file?

    Maybe this is a problem in what order the MeasEqn are evaluated.

    I would try to export from the data display instead. The advantage is that you can inspect/debug each variable in detail.



    •   AltAdvertisment

        
       

  3. #3
    Junior Member level 3
    Points: 387, Level: 4

    Join Date
    Oct 2017
    Posts
    27
    Helped
    0 / 0
    Points
    387
    Level
    4

    Re: Export ADS equations to text file?

    Dear Volker,

    Thank you very much for your comment. Could you please explain more about the order the MeasEqn are avaluated? I do not understand this.
    I've tried to export from data display. It is okay, but because I need to do a lot of iterations, so it will be very time-consuming to manually extract the results each time. I'm looking for an automatic method to extract data for post-processing.



  4. #4
    Advanced Member level 5
    Points: 14,695, Level: 29
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,221
    Helped
    606 / 606
    Points
    14,695
    Level
    29

    Re: Export ADS equations to text file?

    See netlist.
    You can understand incorporations of MeasEqn in netlist.

    Quote Originally Posted by SuBill View Post
    I'm looking for an automatic method to extract data for post-processing.
    Use write_var() in DataDisplay not Schematic.
    Or write custom script using AEL.
    You can run custom AEL from command line.
    Last edited by pancho_hideboo; 31st January 2019 at 07:59.


    1 members found this post helpful.

  5. #5
    Advanced Member level 5
    Points: 12,125, Level: 26

    Join Date
    Apr 2014
    Posts
    1,892
    Helped
    758 / 758
    Points
    12,125
    Level
    26

    Re: Export ADS equations to text file?

    Quote Originally Posted by SuBill View Post
    Could you please explain more about the order the MeasEqn are avaluated? I do not understand this.
    You have multiple MeasEqn blocks, and one MeasEqn uses results from the other MeasEqn. I don't know if ADS is smart enough to evaluate this in the correct order.

    Quote Originally Posted by SuBill View Post
    I've tried to export from data display. It is okay, but because I need to do a lot of iterations, so it will be very time-consuming to manually extract the results each time. I'm looking for an automatic method to extract data for post-processing.
    I meant to move some equations and write_var() to the data display, where are results are available. You can make the data display come up automatically after simulation, so that is where I place my equations in my automated workflows.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  6. #6
    Junior Member level 3
    Points: 387, Level: 4

    Join Date
    Oct 2017
    Posts
    27
    Helped
    0 / 0
    Points
    387
    Level
    4

    Re: Export ADS equations to text file?

    Quote Originally Posted by pancho_hideboo View Post
    See netlist.
    You can understand incorporations of MeasEqn in netlist.

    Use write_var() in DataDisplay not Schematic.
    Or write custom script using AEL.
    You can run custom AEL from command line.
    Thank you very much for your comment. I tried using Eqn to write write_var() in Data Display, but it gave error: While evaluating x1, L4: word undefined. I used the same equation of x1 as in the schematic.

    It seems in Data Display the variables are not recognized. How to use variables in Data Display is what I still do not know.

    - - - Updated - - -

    Quote Originally Posted by volker@muehlhaus View Post
    You have multiple MeasEqn blocks, and one MeasEqn uses results from the other MeasEqn. I don't know if ADS is smart enough to evaluate this in the correct order.



    I meant to move some equations and write_var() to the data display, where are results are available. You can make the data display come up automatically after simulation, so that is where I place my equations in my automated workflows.
    Thank you for your advise. Yes I tried to move write_var() to the data display as pancho_hideboo recommended in the previous post, but the problem was the variable L4 was not recognized.



  7. #7
    Advanced Member level 5
    Points: 14,695, Level: 29
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,221
    Helped
    606 / 606
    Points
    14,695
    Level
    29

    Re: Export ADS equations to text file?

    Do you save variables ?
    Show me ADS netlist.


    1 members found this post helpful.

  8. #8
    Junior Member level 3
    Points: 387, Level: 4

    Join Date
    Oct 2017
    Posts
    27
    Helped
    0 / 0
    Points
    387
    Level
    4

    Re: Export ADS equations to text file?

    Quote Originally Posted by pancho_hideboo View Post
    Do you save variables ?
    Show me ADS netlist.
    Thank you very much for your prompt response. The netlist is attached. I did not know I should save the variables, so I guess they are not saved yet.
    netlist.txt



  9. #9
    Advanced Member level 5
    Points: 14,695, Level: 29
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,221
    Helped
    606 / 606
    Points
    14,695
    Level
    29

    Re: Export ADS equations to text file?

    Open simulation controler for HB Analysis, you can find output tab.
    Note : Saved variable data have sweep dependency.
    You have to know it.
    You can know dependency by what() function in data display.


    1 members found this post helpful.

  10. #10
    Junior Member level 3
    Points: 387, Level: 4

    Join Date
    Oct 2017
    Posts
    27
    Helped
    0 / 0
    Points
    387
    Level
    4

    Re: Export ADS equations to text file?

    Quote Originally Posted by pancho_hideboo View Post
    Open simulation controler for HB Analysis, you can find output tab.
    Note : Saved variable data have sweep dependency.
    You have to know it.
    You can know dependency by what() function in data display.
    Got it! It is working now. Thank you so much for your help. Just one more question, about the dependency. In my case, dependency of L4 is Pin. With 401 values of Pin, there are 401 values of L4 but they are the same (of course, it does not change in one time of simulation). So, how can I export just ONE value of L4 (for example, L4 at Pin=0 dBm) into the file?



  11. #11
    Advanced Member level 5
    Points: 14,695, Level: 29
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,221
    Helped
    606 / 606
    Points
    14,695
    Level
    29

    Re: Export ADS equations to text file?

    Use Meas in schematic, then define Aho_L4=L4[0].
    In this case, you donít need save L4.



    •   AltAdvertisment

        
       

  12. #12
    Junior Member level 3
    Points: 387, Level: 4

    Join Date
    Oct 2017
    Posts
    27
    Helped
    0 / 0
    Points
    387
    Level
    4

    Re: Export ADS equations to text file?

    Quote Originally Posted by pancho_hideboo View Post
    Use Meas in schematic, then define Aho_L4=L4[0].
    In this case, you don’t need save L4.
    It solved my problem! Thank you very much.



--[[ ]]--