Freemaster : visualize an Array in Scope

cancel
Showing results for 
Search instead for 
Did you mean: 

Freemaster : visualize an Array in Scope

Jump to solution
164 Views
NXP Employee
NXP Employee

Hello,

When you select an Array to be visualized in a Scope, if you select the full array name, you can only “Create a single Variable”. In this case, FreeMaster in reading only Array[0] or the full array?

Luis

0 Kudos
1 Solution
99 Views
NXP Employee
NXP Employee

Hi Luis,

FreeMASTER does not enable to visualize arrays natively. This is a feature we plan to have in a future version. FreeMASTER is only able to put single variables to variable Watch view and/or to Oscilloscope and Recorder graphs. The graph then displays how the selected variable evolves in time.

 

In any case, you can write a JavaScript to access the array memory and visualize the array your custom way in the HTML page. We have an example available of this approach.

 

If you do not want to deal with scripting, the easiest way to visualize array using a bare FreeMASTER is to generate a FreeMASTER variables for each element of the array and put them to variable Watch (see User Guide section 4.2.1.1). This is only good for short arrays though.

For graphing, there are some options too:

  • If the array is a kind-of a time buffer – with just one value being produced by MCU at one time and then put to the first array element, moving/shifting other elements. In this case it should be enough to monitor just this first array element with an Oscilloscope or Recorder.
  • If it is a circular buffer – again one value produced at one time, put to array and overwriting the oldest element. Still it can be visualized – just create a helper variable to which the new value will be put each time it is also added to buffer. Then monitor this helper variable with a graph.
  • If the whole array is created/filled at once by MCU (e.g. an FFT calculation result etc.), then you cannot visualize it graphically in the current FreeMASTER version.

 

Of course there can be more scenarios where array visualization would be needed and we realize it is not always easy to do with FreeMASTER. We will try to address this limitation in future development.

Thanks,

Michal

View solution in original post

1 Reply
100 Views
NXP Employee
NXP Employee

Hi Luis,

FreeMASTER does not enable to visualize arrays natively. This is a feature we plan to have in a future version. FreeMASTER is only able to put single variables to variable Watch view and/or to Oscilloscope and Recorder graphs. The graph then displays how the selected variable evolves in time.

 

In any case, you can write a JavaScript to access the array memory and visualize the array your custom way in the HTML page. We have an example available of this approach.

 

If you do not want to deal with scripting, the easiest way to visualize array using a bare FreeMASTER is to generate a FreeMASTER variables for each element of the array and put them to variable Watch (see User Guide section 4.2.1.1). This is only good for short arrays though.

For graphing, there are some options too:

  • If the array is a kind-of a time buffer – with just one value being produced by MCU at one time and then put to the first array element, moving/shifting other elements. In this case it should be enough to monitor just this first array element with an Oscilloscope or Recorder.
  • If it is a circular buffer – again one value produced at one time, put to array and overwriting the oldest element. Still it can be visualized – just create a helper variable to which the new value will be put each time it is also added to buffer. Then monitor this helper variable with a graph.
  • If the whole array is created/filled at once by MCU (e.g. an FFT calculation result etc.), then you cannot visualize it graphically in the current FreeMASTER version.

 

Of course there can be more scenarios where array visualization would be needed and we realize it is not always easy to do with FreeMASTER. We will try to address this limitation in future development.

Thanks,

Michal

View solution in original post