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.
Tool/software: Code Composer Studio
Hi!
I'm starting use GUI Composer v2. In first version binding graph to floating variables array was very simple and works. However in second version I filled field "series_0_value" with name of array choosing ''my_xds" option but in runtime it doesn't work. What is the correct possibility to bind array to Line Graph and display waveform ?
AartiG thank you for reply !
I'm using LaunchXL 28379D and LaunchXL 28069. Array data type is float.
Hi Kamil,
I'm in the process of creating a demo project that shows how to do this, and will post again later today when it is ready.
Thanks for your patience.
Regards,
Brian
Hi Kamil,
We're still working on this - there may be some workarounds necessary to get this working. I've asked the person who wrote the code that handles binding to arrays to take a look at this and he will respond directly to this thread.
Thanks again for your patience.
Regards,
Brian
Yes this looks like a bug. It is suppose to work as expected. There is a workaround, but it requires you to write a bit of javascript in a .js file to intercept the array of floats as its coming up from the target, and reformat it to work around the bug. Let me know if you are interested in the workaround, otherwise we will let you know when the problem is fixed.
Hi Brian,
Thank you for information. If it is possible to display array using .js file I am interested how to do it. Do you have sample code ?
series_0_value is a string type. I know how to convert float array to properly formatted string and display it on line graph. However how to get data from my_xds and process it in .js file ?
I found only this tutorial:
https://dev.ti.com/gc/designer/help/WorkingWithJavascript/index.html#xds_proc
And I had created simple code, however there is no information about direct read data from xds. Furthermore, I tried to use method: my_xds.readValue(expression); and I don't achieve expected result.
https://dev.ti.com/gc/components/ti-core-databind/demo/ti-program-model/index.html#ti-program-model
My example code:
var points = [40, 100, 1, 5, 25, 10]; gc.databind.registry.bind('ti_widget_linegraph.series_0_values', "ti_widget_numberbox.value", function(value) { var points_string = ""; for(i=0; i<points.length;i++){ points_string = points_string + ";" + points[i]; } return points_string; });
Hi,
After adding a line graph, series 0 is initialized with sine values:
The problem is that when you click on the button to link these series to an array, the initialized values are not deleted from java code and the widget is not working. You have to manually delete the sine values and then click on the button to make it work properly. Small error, but takes a lot of time to figure out.