3:58 am
April 30, 2017
Hi everyone,
I just started with the arduino compiler (very nice tool!!) and run into a problem with shift register (SR) in a sub VI. The problem is that the SR does is not retaining the data, the execution setting of the VI is OK (non-reentrant).
I wrote a little test VI (attached) with a SR, a local and a global variable performing he same job. I also run the subVI by itself. When running in LabVIEW all 3 methods work the same, no matter if it is called as sub VI or run by itself. When compiling and running on the arduino by itself, all 3 are OK again, but when calling as a sub VI from another VI only local and global variables work, the SR does not.
I use LabVIEW 2015 Pro SP1, Arduino Mega 2560, the latest compiler and IDE.
Can you please help me on this?
Thank you and greetings, gr
10:59 pm
March 12, 2015
Hello;
The issue you are facing is due to uninitialized SRs inside a subVI. You can find a detailed explanation as to why that doesn't work on this post:
https://www.geverywhere.com/for.....pport-fgv/
As a workaround, you will need to replace the data the uninitialized SR is handling with Global Variables.
Filipe
Cheers
Filipe
12:47 am
April 30, 2017
filipealtoe said
Hello;The issue you are facing is due to uninitialized SRs inside a subVI. You can find a detailed explanation as to why that doesn't work on this post:
https://www.geverywhere.com/for.....pport-fgv/
As a workaround, you will need to replace the data the uninitialized SR is handling with Global Variables.
Filipe
Hi Filipe,
thank you for clarification. I am using a lot of functional globals and NI has uninitialized SRs in PID and some other subVIs too. I guess I have to rewrite them ....
Anyway, thanks and greetings, Günter
10:22 am
May 24, 2017
Hi
Also faced the need to generate extra subVI.
The issue you are facing is due to uninitialized SRs inside a subVI...
As a workaround, you will need to replace the data the uninitialized SR is handling with Global Variables...
Can add it in compiller:
for not reentrant subVI:
automatic initialization and create SRs or Global Variables before main cycle - on the level 0.
Once.
for reentrant subVI:
automatic initialization and create SRs or Global Variables before main cycle - on the level 0.
N times - for every reentrant subVI clone.
See VI, how the number of extra lines SRs.
17
1 Guest(s)