04-19-2017 07:16 AM
Hi everybody,
does anyone know the problem with this special failure of the VI-Analyser?
- I must not use "Concatenate Strings" or "Build Array" functions in loops -
I try so hard to fix all failures shown in the result but i can't get rid of thisone!
Is there a simple array manipulation function, wich manipulates every element in the same way?
Otherwise i don't know how to fix this issue.
Thx 4 ur help
Solved! Go to Solution.
04-19-2017 07:34 AM
You can use a 'Format into string' with '%.2f°C' instead of those 2 functions. If it's more efficient i don't know, but it should get rid of the warning.
Not all warnings can be fixed ...
/Y
04-19-2017 07:55 AM
Thank you very much!
04-19-2017 08:33 AM
@Yamaeda wrote:
You can use a 'Format into string' with '%.2f°C' instead of those 2 functions. If it's more efficient i don't know, but it should get rid of the warning.
Not all warnings can be fixed ...
/Y
Ditto that!
The motivation for that warning is driven by concerns over memory allocation. Firstly to guard against the possibility of an ever growing need for memory and secondly the slow down that happens as the array holding the data (output tunnel or shift registers for example) grows and the OS has to allocate more memory.
The memory required by that code construct is bounded by the maximum sized of the input ray of floats. The slow down issues will be limited to either the first time that code executes OR if the input array suddenly increases.
Since only YOU can tell if the array of floats will be growing as the application runs, the VIA is helping you out by alerting you that you should think about the code and decided if there is an issue.
For situations like that I will put comments in the code explaining why the warning is OK OR will modify the VIA settings to skip that check for that VI.
Ben