shift register in subVI | Arduino Compatible Compiler for LabVIEW Discussions | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 4 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
shift register in subVI
April 30, 2017
3:58 am
Avatar
gr
New Member
Forum Posts: 2
Member Since:
April 30, 2017
sp_UserOfflineSmall Offline

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

May 2, 2017
10:59 pm
Avatar
filipealtoe
Admin
Forum Posts: 89
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

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:

http://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
May 3, 2017
12:47 am
Avatar
gr
New Member
Forum Posts: 2
Member Since:
April 30, 2017
sp_UserOfflineSmall Offline

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:

http://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

June 8, 2017
10:22 am
Avatar
Alexander
New Member
Forum Posts: 2
Member Since:
May 24, 2017
sp_UserOfflineSmall Offline

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.

Forum Timezone: UTC 0

Most Users Ever Online: 33

Currently Online:
2 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

John: 18

RTSLVU: 15

Dan6077: 11

Member Stats:

Guest Posters: 0

Members: 80

Moderators: 0

Admins: 3

Forum Stats:

Groups: 1

Forums: 2

Topics: 58

Posts: 289

Newest Members: Marielop, engladcub, AbbaLearilky, LeiylaWes, pavlik76Sed

Administrators: geadmin: 5, filipealtoe: 35, Steffan: 89