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.

TMS320F28335: GUI Composer v2 Line Graph Query...

Part Number: TMS320F28335
Other Parts Discussed in Thread: TMS320F28377S

Hope this is the correct Forum as I cant find a dedicated GUI Composer forum.

GUI Composer v2.3.1

CCS V8.0.0.00016 

ti_widget_linegraph

I'm getting some odd behaviour when using the Line Graph to plot Sin and Cos waveforms.  We have a Resolver that feeds our Electronics Board, this is fed into the ADC which is then fed into the TI Resolver Library (resolv_algo_float()).  I am plotting the values returned by the ADC, before they are processed by the Resolver Library.  Here is a snippet:

ResolverBuffer[ResolverBufferPointer][0]=((float)AdcRegs.ADCRESULT0*(3.0/65536.0))- rslvrIn.offsetS; // remove opamp bias;
ResolverBuffer[ResolverBufferPointer][1]=((float)AdcRegs.ADCRESULT1*(3.0/65536.0)) - rslvrIn.offsetC; // remove opamp bias

#ifdef GUI_COMPOSER
increment_debug_array(RXSIN,ResolverBuffer[ResolverBufferPointer][0],0);
increment_debug_array(RXCOS,ResolverBuffer[ResolverBufferPointer][1],0);
#endif

The increment_debug_array procedure basically updates a rolling array, one for Sin and one for Cos, so we have two arrays that I am wanting to plot.

Now, within GUI Composer I have 5 Line Graphs, 3 of them are doing nothing at the moment but will be used to plot a Motor driver (U,V,W signals), 1 will be to visualise a 10KHz driver signal for the Resolver.  The last graph is setup to visualise the Resolver feedback from the ADC (Sin and Cos).

When I setup Channel 1 for Cos and Channel 2 for Sin, all I get is a 0.00 for both Sin and Cos (it looks like the widget is locked up, i.e. crashed):

My settings for the above graph are basically the defaults ones but I have num_channels = 2, series0 and series1 values are bound to the arrays within my code, the yaxis2 and yaxis3 are hidden.  

Now for the interesting bits...

If I change Channel2 (series1) on the graph to be the same as Channel1 (series0), so they are both Cos arrays I get the same as above but the value for both Cos and Sin is NaN.

If I change Channel2 (series1) on the graph to be the same as Channel1 (series0), so they are both Sin arrays, the graph works fine (ignore the labels, I forgot to change the Cos one):

If I revert back to the original setup with Channel1 being Cos and Channel2 being Sin and I add another Line Graph underneath with no bindings and num_channels=1, I get Sin and Cos on the first graph for a small period of time before it locks up:

In short I cannot get a Line Graph to display two signals on one graph.  Am I doing something wrong?

If I use two Line Graphs, one for Sin and one for Cos it seems to work fine but I want to see both sets of data on one Graph.  What can I try to rectify the issues I'm having?

Thanks.

  • Hello,
    Sorry for the delayed response. We are looping in the experts and will keep you posted.

    Thanks
    ki
  • Hi Mike,
    Could you please go back to your initial GUI Compose 2 project, export the project (File / Export / Project) and post the .zip file? It will allow me to get a better understanding of how things are bound.

    Regards,
    Brian
  • Hi Brian,

    Sorry, I have been on Annual Leave for two weeks, just catching up...

    I will get something to you asap.  I managed to get something working by reducing the number of datapoints to 32 in each graph, although not ideal it gives me something to work with.

    Let me revisit the project and get back to you in the next couple of days.

    Thanks, Mike.

  • OK, thanks!

  • RST_Application.zip

    Hi Brian, 

    Attached is the exported App.  I don't have the original App as it was deleted and I restarted.  The App is very basic and to be honest it seems to be the Array size within the embedded software that leads to the issues I've been having.  In fact, after repeated testing before my holiday I came to the conclusion it was more likely to be the XDS200 Debugger that was the issue rather than the GUI App.

    You will see in the bindings the top graph has two channels for two arrays and the lower graph has one binding for one array.  Now, within the embedded code if the internal array size is 32, 64 or 256 the graphs work fine, but increase this to 512 and the App freezes (the embedded software is still running as the Scope shows this).  

    I do now believe it is an issue with the debugger rather than GUI Composer but if you could double check my settings in the App that would be appreciated.  Unfortunately I don't have a different debugger to test with.

    Thanks,

    Mike.

  • Thanks Mike,

        At first glance things look ok.  I'll create a dummy target program to generate sin and cos arrays to work with your GUI and will let you know if I find any problems.

    Regards,

      Brian

  • Hi Mike,

       I was able to create a target program for the TMS320F28377S that defined 2 512 element arrays and have them displayed correctly in the GCv2 app:

    Here's how I defined the arrays in the target .c file:

    volatile int32_t rx_sin_array[]={0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392};

    volatile int32_t rx_cos_array[] = {32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138 ,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138,32768,32138,30273,27245,23170,18204,12539,6392,
    0,-6392,-12539,-18204,-23170,-27245,-30273,-32138,-32768,-32138,-30273,-27245,-23170,-18204,-12539,-6392,
    0,6392,12539,18204,23170,27245,30273,32138};

    linegraph4 series0 was bound to "rx_sin_array" and series1 was bound to "rx_cos_array"

    I noticed that in the project you uploaded, the variable names that the graph series properties were bound to were all ending in ".array".  e.g. rx_sin_array.array  

    This would be correct syntax for binding to a structure named "rx_sin_array" that had one member, an array named "array".  Is this how you defined it in your target program?  

    Regards,

      Brian

  • Hi Brian,

    Yes that is correct,

    The array is a rolling array that is populated via an ADC interrupt:

    You may recognise some of the code as it's taken from the TI Resolver Demo project, I'm just outputting the Resolver Feedback to GUI Composer.  The ADC interrupt runs at a frequency of 160KHz.  

    Do you know if there are any limits in terms of retrieving data from the XDS200 debugger?  I still suspect this is actually the issue, rather than GUI Composer - what are your thoughts on this?

    Thankyou very much for your assistance,

    Mike.

  • Hi Mike,

      I talked with some experts in the debugger team and they said that there are some limits in terms of retrieving data from the XDS200 debugger, but unfortunately nothing has been spec'd regardiing this.  I agree with you that it does look like that may be the issue you are running into.

    Regards,

       Brian