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.