Hi,
there is an example that describes how to implement a recorder in JS scripting?
Many thanks
Fausto
Hi Daniel,
I'm using Freemaster to create a debug page of my application (that runs on s32k148 micro). I have created an html page and use JS scripting.
I've tried to use this function
Hi @FaustoPignatta,
Are you using FreeMASTER (GUI tool) or FreeMASTER Lite as a backend for html page ?
I am asking because SetupRecorder is a special case - specific to FreeMASTER Lite (won't work with main FreeMASTER tool). The GUI tool has an alternative function DefineRecorder (6.5.41 User Manual).
Depending on your use case we will provide a corresponding example.
Regards,
Iulian
Hi Iulian,
I'm using Freemaster (Gui Tool), and i put in my project these files (like I see in scripting example ..\FreeMASTER 3.0\FreeMASTER\examples\scripting\JavaScript-JSON-RPC):
- freemaster-client.js
- simple-jsonrpc.js
Thanks
Fausto
Dear Fausto,
The Oscilloscope is more a user-interactive feature than a programmatic one in the FreeMASTER Desktop application. There is actually no JSON-RPC API to consume oscilloscope data in the script as such script would depend heavily on what oscilloscope item is currently selected in the project tree.
There is an API though to create the Oscilloscope item and populate it with selected variables just like if the user would create it by hand. There is also an API to activate the newly created item in the project tree so that the oscilloscope graph becomes visible in the desktop window. See DefineOscilloscope and SelectItem API calls in the User Guide.
In the FreeMASTER Desktop application, the only way how to get variable values in run-time is reading them programmatically in a script using the ReadVariable or similar methods. This is a good approach as it works any time, regardless of what screen the user currently activates in the UI.
As Iulian mentioned above, the FreeMASTER Lite backend enables an access to Oscilloscope feature at the protocol level, so it might be more suitable for you if you really need a high-speed data sampling.
Regards,
Michal
Hi Michal,
thanks for the suggestion. I've declared some array MCU side and read them in my desktop application with pcm.ReadUIntArray function. In my application I don't need to see real time values but only to acquire them in the fastest way, and at the end of process analyze them.
Thanks,
Fausto
Hi,
Which NXP product do you use?
Thanks,
BR, Daniel