Nested structures in nested VIs | 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 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Nested structures in nested VIs
June 22, 2016
9:35 am
Avatar
senthilkumaranms
Member
Members
Forum Posts: 9
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

Is it possible to have subvi? I tried the blink program as a subvi call in the main program to be compiled. I saved two blink program with different blink timing and repeats then I added them in a main vi and named as combined blink. in arduino compatible compiler, I called the combined blink vi and compiled & downloaded to arduino UNO. Pin 13 LED blinked at a rate of longer delay subvi always, either it was called first or second/ before or after the shorter delay blink subvi.

 

Please see attached the program.

June 22, 2016
9:40 am
Avatar
lovediwan
Member
Members
Forum Posts: 14
Member Since:
March 2, 2016
sp_UserOfflineSmall Offline

can send the screen shot or can u convert the VI to LV13 as i don't have LV14 on my Laptop

Regards

Love Diwan

June 22, 2016
10:13 am
Avatar
senthilkumaranms
Member
Members
Forum Posts: 9
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

PLease see blink vi for LV 2013.

June 23, 2016
7:25 pm
Avatar
Steffan
Admin
Forum Posts: 408
Member Since:
March 12, 2015
sp_UserOfflineSmall Offline

Yes you can use subVIs.  I think what you have run into is a known issue with deeply nested structures through subVIs.  You have a while loop on the main VI, and nested sequence structures within for loops within subVIs.  It is the nested flat sequence structures that are causing a problem.  Simply replace them with the delay APIs (Delay Millis.vi) from the Timing palette to control dataflow.  It is good practice to use this instead of a flat sequence structure.  This should do the trick:

delays.pngImage Enlarger

sp_PlupAttachments Attachments
June 27, 2016
5:42 am
Avatar
senthilkumaranms
Member
Members
Forum Posts: 9
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

Thank you. the solution that you have provided has worked.

At this moment what I understand is I cannot have more than one structure loop in subvi due to some known technical limitations. 

since this is a known issue, I request you to rename this topic suitably so that other customers facing the same problem will able to see this topic easily.

Forum Timezone: UTC 0
Most Users Ever Online: 100
Currently Online:
14
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
miche91: 33
scottj: 28
scadao: 23
Member Stats:
Guest Posters: 5
Members: 202
Moderators: 0
Admins: 3
Forum Stats:
Groups: 1
Forums: 2
Topics: 266
Posts: 1222
Newest Members:
pujacontrol
Administrators: geadmin: 22, filipealtoe: 96, Steffan: 356