10-27-2015 09:30 AM
Hi!
I'm having some problems with this labview file. I want to create a 16 stacked sequence loop of the same controls which includes 12 valve controls and two linear actuator ( the files are attached below). Each sequence of the 16 stacked sequene are essentially a duplicate of the same set of VIs. However, I found that the save times are getting increasingly longer as I approached 16 stacks. For example, at the 12th stack it took about 15 minutes and then at the 13th stack it took 20 mins.
This wouldn't be a problem normally as I'll just have to wait longer right? Nope, at the 16th stack and whilst saving, the program keep alternating between a non-responding program and a responding program according to the windows task manager. The file also cant seem to be saved no matter how long I wait. Is this a problem regarding the computer processing power? or is there a limit on the labview program itself (like cant have more than 15th stacked sequences, too redundant codes etc). I am using labview 2013, a NI DAQ usb-6223 (I think) and two motors for this particular program. I posted a file that contains the motor controls that i want to put in each sequence as well as a shortened version of the valve control file.
Regards,
Gabriel
Solved! Go to Solution.
10-27-2015 10:13 AM
1. That many Stacked Sequence Structures usually point to a bad architecture. Perhaps you should change to use a State Machine instead.
2. A single VI should not be approaching 4MB. That tells me you have a very non-scalable architecture. Perhaps you should change to using arrays or reentrant VIs and subpanels (essentially making a plugin architecture).
10-27-2015 10:14 AM - edited 10-27-2015 10:15 AM
I suggest you take some LabVIEW tutorials, urgently. I saw you said 'stacked sequence' and then saw that your VI was 4mb in size (most are <1mb) so I suspected that something definitely wasn't right.
1) Get rid of the stacked sequence structure. It is a horrible construction and hides most of your code!
2) The button/case structure/true or false constant is completely redundant, you can just wire the values to the DAQ assistant, like this:
3) Limit your block diagram to a single screen in size, I had to scroll through a lot of empty space to find your diagram!
4) Lose the 150 or so DAQ assistant VIs and replace them with the appropriate DAQmx functions. You will probably be able to replace all 150 instances of the DAQ assistant with a single DAQmx write. Each of those DAQ assistants contain a whole heap of code to initialise the device, write the data and then close the device which is why the VI is 4MB in size and probably why the whole thing runs slowly. You can probably replace the whole lot with a single while loop & case structrure, depending on what you're actually trying to achieve.