dear;
please i need to ask about GUI Composer and how to capture enough data points to plot a 60 Hz sine wave?
thanks
ahmed
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.
dear;
please i need to ask about GUI Composer and how to capture enough data points to plot a 60 Hz sine wave?
thanks
ahmed
Hi!
You can refer to that link http://processors.wiki.ti.com/index.php/Category:GUI_Composer
Regards,
Igor
Dear, thanks
but my question for:
it is not clear in wiki and and i did as wiki but the figure is not appeared as sine wave? but actually with scope it is sine?
can you give me answer?
Hi Ahmed,
You can put sine wave data points into an array on the target side and use the graph to plot the array by binding the array to the graph value.
If this is not what you want, can you send a picture of the graph that you want to plot?
Regards,
Patrick
thank you!
i will explain for you about my problem:
1- i have the current of the ACI motor. it is a sine wave. it is q value is q24. when i tried to plot in the GUI it is not appierd as sine wave. in the ccs, and for plot it, by using the datalog[1] feature to store the values in a memory buffer. can you help to do it for gui? how can i put sine wave data points into an array on the target side?
2- for convert the data to appear in gui as q24 i dieveded the vales in app.js fuunction divideTenthousand and times in function timesTenthousand! value / or * 16777216? it is right?
3- how can i exite run time for c2000; in wiki
"
C2000 family of devices requires following lines to be added to "appInitScript.js" between load program and run program steps.
print("Enabling Realtime\n");
session.expression.evaluate("ST1.DBGM = 0");
session.expression.evaluate("GEL_EnableRealtime()");
"
how can i modefy app.js?
ahmed diab said:1- i have the current of the ACI motor. it is a sine wave. it is q value is q24. when i tried to plot in the GUI it is not appierd as sine wave. in the ccs, and for plot it, by using the datalog[1] feature to store the values in a memory buffer. can you help to do it for gui? how can i put sine wave data points into an array on the target side?
Assuming that you have an array of 5000 elements, each element is a point on the x-axis. The value of the array element represents the y-axis. So, you will need to store your data points (y-axis) into the array. On the host side, GUI Composer, you will need to bind this array to the Series Value in the Binding tab.
Watch this video to find out how to bind variables in GUI Composer.
http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/guicomposer/gc_intro/gc_intro.html
ahmed diab said:2- for convert the data to appear in gui as q24 i dieveded the vales in app.js fuunction divideTenthousand and times in function timesTenthousand! value / or * 16777216? it is right?
See this post for q-value binding.
http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/295399/1030118.aspx#1030118
ahmed diab said:3- how can i exite run time for c2000; in wiki
"
C2000 family of devices requires following lines to be added to "appInitScript.js" between load program and run program steps.
print("Enabling Realtime\n");
session.expression.evaluate("ST1.DBGM = 0");
session.expression.evaluate("GEL_EnableRealtime()");"
how can i modefy app.js?
You can download the runtime from this wiki. http://processors.wiki.ti.com/index.php/Category:Gui_Composer
These lines are for the appInitScript.js, not app.js. After you exported the application for running it with GUIComposer runtime, there will be an appInitScript.js file generated in your GUI app zip file. You should be able to add these lines into the appInitScript.js file.
Note that you might need to remove this line session.options.setBoolean("UseLegacyStopMode", true); in the appInitScript.js file if you don't want to halt the target due to target access.
Regards,
Patrick
thank you very much for your help.
1- please find my appInitScript.js
importPackage(Packages.com.ti.ccstudio.scripting.environment) function initTarget() { var debugServer = ScriptingEnvironment.instance().getServer("DebugServer.1"); print("Initializing target : " + appConfigFile+"\n"); debugServer.setConfig(appConfigFile /* internal variable */); var session = debugServer.openSession("*", "*" /* TODO: */); session.options.setBoolean("UseLegacyStopMode", true); if (!session.target.isConnected()) { print("Connecting target: "+session.getName()+"\n"); session.target.connect(); } print("Loading program: "+appProgramFile+"\n"); session.memory.loadProgram(appProgramFile /* internal variable */); print("Running Program...\n"); session.target.runAsynch(); print("Enabling Realtime\n"); session.expression.evaluate("ST1.DBGM = 0"); session.expression.evaluate("GEL_EnableRealtime()"); } initTarget();[1206/190138:ERROR:renderer_main.cc(218)] Running without renderer sandbox
2- for q24 please check the print screen!! this is true to read with the q24. thanks
thanks
ahmed diab said:1- please find my appInitScript.js
; please till me if errors in it?importPackage(Packages.com.ti.ccstudio.scripting.environment) function initTarget() { var debugServer = ScriptingEnvironment.instance().getServer("DebugServer.1"); print("Initializing target : " + appConfigFile+"\n"); debugServer.setConfig(appConfigFile /* internal variable */); var session = debugServer.openSession("*", "*" /* TODO: */); session.options.setBoolean("UseLegacyStopMode", true); if (!session.target.isConnected()) { print("Connecting target: "+session.getName()+"\n"); session.target.connect(); } print("Loading program: "+appProgramFile+"\n"); session.memory.loadProgram(appProgramFile /* internal variable */); print("Running Program...\n"); session.target.runAsynch(); print("Enabling Realtime\n"); session.expression.evaluate("ST1.DBGM = 0"); session.expression.evaluate("GEL_EnableRealtime()"); } initTarget();[1206/190138:ERROR:renderer_main.cc(218)] Running without renderer sandbox
Put the expression evaluations before the runAsynch line.
ahmed diab said:2- for q24 please check the print screen!! this is true to read with the q24. thanks
I found out that we don't currently support Q-value for array binding at the moment. You will need to use the pre and post functions to do your conversion.
Regards,
Patrick
dear; sorry but it is very important for me!
1- please see the app.jas and the printscreen and this to convert from and to q24?
/* * This file is provided for custom JavaScript logic that your HTML files might need. * GUI Composer includes this JavaScript file by default within HTML pages authored in GUI Composer. */ require(["dojo/ready"], function(ready){ ready(function(){ // logic that requires that Dojo is fully initialized should go here }); }); function divideTenthousand( valueFromTarget) { // return valueFromTarget/2; return valueFromTarget/16777216; } function timesTenthousand( valueToTarget) { // return valueToTarget*2; return valueFromTarget*16777216; }
2- can you review the appInitScript
importPackage(Packages.com.ti.ccstudio.scripting.environment) function initTarget() { var debugServer = ScriptingEnvironment.instance().getServer("DebugServer.1"); print("Initializing target : " + appConfigFile+"\n"); debugServer.setConfig(appConfigFile /* internal variable */); var session = debugServer.openSession("*", "*" /* TODO: */); session.options.setBoolean("UseLegacyStopMode", true); if (!session.target.isConnected()) { print("Connecting target: "+session.getName()+"\n"); session.target.connect(); } print("Loading program: "+appProgramFile+"\n"); session.memory.loadProgram(appProgramFile /* internal variable */); print("Running Program...\n"); print("Enabling Realtime\n"); session.expression.evaluate("ST1.DBGM = 0"); session.expression.evaluate("GEL_EnableRealtime()"); session.target.runAsynch(); } initTarget();[1206/190138:ERROR:renderer_main.cc(218)] Running without renderer sandbox
thanks and soory
ahmed diab said:1- please see the app.jas and the printscreen and this to convert from and to q24?
You need to multiple and divide each element in the pre and post functions.
See this post,
http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/301032/1049516.aspx#1049516
ahmed diab said:2- can you review the appInitScript
and tell me about its errors? and about the function of session.options.setBoolean("UseLegacyStopMode", true); i did not understand whe i must delete it?importPackage(Packages.com.ti.ccstudio.scripting.environment) function initTarget() { var debugServer = ScriptingEnvironment.instance().getServer("DebugServer.1"); print("Initializing target : " + appConfigFile+"\n"); debugServer.setConfig(appConfigFile /* internal variable */); var session = debugServer.openSession("*", "*" /* TODO: */); session.options.setBoolean("UseLegacyStopMode", true); if (!session.target.isConnected()) { print("Connecting target: "+session.getName()+"\n"); session.target.connect(); } print("Loading program: "+appProgramFile+"\n"); session.memory.loadProgram(appProgramFile /* internal variable */); print("Running Program...\n"); print("Enabling Realtime\n"); session.expression.evaluate("ST1.DBGM = 0"); session.expression.evaluate("GEL_EnableRealtime()"); session.target.runAsynch(); } initTarget();[1206/190138:ERROR:renderer_main.cc(218)] Running without renderer sandbox
Where do you see this error? You can safely ignore it if it is from the command prompt.
The UseLegacyStopMode is used to halt the target before any target access, otherwise target access is not possible while it is running. It is intrusive and can cause problem if you have time critical algorithm on your target. Since you already enabled realtime mode, you don't need to halt the target before target access.
Patrick