Freemaster : visualize an Array in Scope

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Freemaster : visualize an Array in Scope

跳至解决方案
1,628 次查看
LuisCasado
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 项奖励
1 解答
1,563 次查看
MichalH
NXP Apps Support
NXP Apps Support

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

在原帖中查看解决方案

1 回复
1,564 次查看
MichalH
NXP Apps Support
NXP Apps Support

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