This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Accessing graphing tool via the scripting console

Hi team,

I recently discovered the scripting console! and a .js script has helped me to reduce the number of clicks to connect to my cores, load, run, reset etc.

I was just wondering if I can even load graphs using the scripting console?

This would help me so much! Let me know if there are any available API's for this Slight smile

Best Regards,

Madhurya

  • Please see the Scripting part of the online CCS documentation.

    Thanks and regards,

    -George

  • Madhurya,

    There is an API for opening a graph called openAnalysisView.  You pass in the type of graph and a properties file that contains the other settings.

    js:> help openAnalysisView 

     

    Description: opens an Analysis View.  E.g. to open a single time graph, openAnalysisView('Single Time','C:\\abc.graphProp')

    Syntax: openAnalysisView(viewID,arg)

    Arguments: 

      viewID - Name of the view. Please see feature specific view names For CCS Graphs Feature: 'Single Time', 'Dual Time',  'FFT Magnitude', 'FFT Magnitude Phase', 'Complex FFT', 'FFT Waterfall'

      arg - See feature specific interpretation of this argument For CCS Graphs: Used as a property file from which to load the graph property values

    I have not used this API before.  I believe the idea is that you would setup a graph manually and then save the settings to a properties file which you could then load with this API.

    Regards,

    John

  • Hi John!

    Thanks for the info! This indeed works and helps me avoid so many clicks!

    Happy Holidays!

    Best Regards,

    Madhurya

  • Hi John,

    Happy new year!

    I'm back to exploring the scripting console, is there a way to add an expression and edit the expression value?

    Also, adding a breakpoint and 'run to line' are equivalent, right?

    I see that there is an option to show the expression tab, but I do not see a command to edit certain expressions.

    showExpview();
  • Happy new year to you as well.

    There is a command for adding an expression: expAdd()

    js:> help expAdd

    Description: Add an expression to the expression view.

    Syntax: expAdd(expression)

    Arguments: 

      expression - the expression to add to the expression view.

    Description: Add an expression to the expression view with a given format.

    Syntax: expAdd(expression,format)

    Arguments: 

      expression - the expression to add to the expression view.

      format - the display format that will be tried to use (if reasonable) when the value of expression is displayed. This is an optional parameter. The format can be obtained from getHex, getDecimal, getBinary, getNatural, and getQValue.

    There is no command for editing an expression but what you can do is remove an existing one with expRemove and then add your new one.

    Yes run to line basically sets a breakpoint and runs to it.

    Regards,

    John