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.

GUI Composer Example



Perhaps I've missed it but are there any examples that actually show you how to bind a widget to your code? As an example, say your code modifies the CCR1 register. How would you create a widget that allows you to change CCR1 while the code is running?

I saw some example videos but all they did is show using the widgets. I haven't found anything that explains how to do some thing from scratch.

  • Hi George,

    You can find the Get started guide in this link:
    processors.wiki.ti.com/.../Category:GUI_Composer

    Regards,
    Gautam
  • Thanks but I was looking for an actual code example that walks through how you tie everything together. For example if you're working with a MSP430 you can search and find many examples of code that explains each line of code. I can hardly find anything about the GUI Composer other than how to drag and drop widgets.

  • George Ioakimedes said:
    Thanks but I was looking for an actual code example that walks through how you tie everything together. For example if you're working with a MSP430 you can search and find many examples of code that explains each line of code. I can hardly find anything about the GUI Composer other than how to drag and drop widgets.

    As of this time, documentation on the GUI Composer is mostly in the wiki page that Gautam had sent earlier.

    The Getting Started section has a link to a powerpoint that includes a hands on module. The module is currently quite basic - it shows how to create a Dial widget and bind a variable to the widget, but I think it will guide you in the right direction. We are also working on a more advanced version of the training module that should be available within a few weeks. 

    To bind a widget to a global variable in your program, all you need to do is select a widget and drag it into the canvas, then go to Binding category and enter the variable name in the Value field. 
    http://processors.wiki.ti.com/index.php/Category:GUI_Composer#Create_Application:

     

  • I know this is a bit of an old post, but I too am having some significant difficulty with "persuading" GuiComposer to do what I want. The lack of examples and detailed documentation on the widgets is a real challenge for me as is a lack of JavaScript knowledge!

    The examples I have found so far have been helpful, but only really for the simplest of applications and there just isn't enough example code to help you push the boundaries. Further, I can't find any information as to what functions, objects, and methods are built in by default so that we can access them. The example about data logging is a good example. It works, but how do I go about enhancing it to say select just one data set within an array  rather than streaming if I want to?

    For example, I would like to display a bank of LED's or something similar to represent the bit status of a word/byte. I appreciate that the widget bank is fairly limited at the moment and there is nothing in there that specifically provides this function. However, one that looks like it might provide this functionality is the radio list box which could potentially be configured into read mode such that the value within the bound variable could be interpreted for the relevant bit status and hence display the a specific radio button associated with that bit. Having spent a couple of hours wrestling with it I'm no further forward.....

    Some more online help for the widgets would be welcome, any pointers you can provide to such information beyond the wiki would be welcome.

    Ignorance is not bliss:-(

    regards

    s

     

  • Steve,

    It sounds like what you want to do is similar to this forum thread. You could probably even use other widgets to achieve a similar outcome but this should guide you in the right direction.

    More detailed step by step method of how to use the MultiImage widget along with preprocessing function is in the Lab included with the GUI Composer Training module here: http://processors.wiki.ti.com/index.php/CCS_Modules_Library#GUI_Composer

    Please see slides 56-64. GUIVars (also included in the training material) might also be interesting in your scenario. GUI Vars allow you to bind to a target variable without a widget. It lets you perform an action when the value of the variable changes.

    Hope this helps!

  • Hello Aartig,

    Its not a million miles away and I can see how it could possibly be persuaded to work, but is a perhaps a tad clunky as I will need to create a separate widget for each bit of my error word. . What I thought I might be able to do was use a set of 16 radio buttons in receive mode such that each button is effectively tied to one binary bit of the underlying  error word and as such then it would be possible to visually see which bits are set. Maybe it isn't possible to do this.  I'll have a play tomorrow with the samples you have suggested.

    Thanks for the prompt response and suggestions:-)

    regards

    Steve

  • Hello Aartig,

    Yep that suggestion seems to work ok. I put a pre-processing javascript function like the one below behind each LED to select the specific bit from the staus variable to set the LED colour status and it works just fine:

     

    function SelectLED3( valueFromTarget) {

    if ((valueFromTarget & 0x0004) == 0x0004)//(valueFromTarget <50 )

    return 0;

    else

     return 1;

    }