

9:35 am

June 21, 2016

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.
10:13 am

June 21, 2016

7:25 pm

March 12, 2015

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:
5:42 am

June 21, 2016

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.
104
1 Guest(s)
