LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

speed up execution of this VI?

Actually, that wasn't the problem -- I had to open the VI, go to File, go to VI Properties, Protection, and set it to "Unlocked".  I hadn't encountered this before ...

 

BS

0 Kudos
Message 21 of 26
(1,370 Views)

There were 22 locked VIs.  Not wanting to hunt them down and do this "by hand", I whipped up the following VI to do the dirty work.  You need to load the Main VI into memory first ...

Unlock All VIs.png

 

Enjoy.

 

Bob Schor

0 Kudos
Message 22 of 26
(1,358 Views)

Here's a tiny example.  Look at Table 4, BH1.  Near the left edge of its loop, there are a whole bunch of parallel Orange wires that go into a huge Case statement and through a smaller Case Statement inside it.  It turns out that half those wires are input, half are output, and they loop through the Case and back out.  Why not make a little sub-VI (32 x 32 pixels!) that takes three Orange wires in, three wires out, and sets them when it is time to set them, otherwise just passes them through?  Similarly, you could/should bury all those settings of controls in a sub-VI and make the huge Case disappear (well, be reduced to a 32 x 32 pixel sub-VI with an icon that says "Enable Controls" (or Disable Controls -- I can't figure out what it is doing).

 

Encapsulate, encapsulate, encapsulate!  I see you are using Arrays of controls (good), do more of this, but also many more sub-VIs to hide the irrelevant mess details.

 

Bob Schor

Message 23 of 26
(1,338 Views)

I hadn't checked back since afternoon yesterday.  Something I started working with was turning each table into a SubVi.  I'm attaching that attempt if anyone wants to look...  I'm not sure if I'm going the right direction or not.  Not quite finished and probably have some redundancies since some indicators are simply a restatement of a control value.

 

Bob, I'll look at at that structure and see what I can do there.  Thanks for the input (And the unlocker).  I removed the password restriction, somehow it remained locked afterwards?

___________________________________________________________________
Still confused after 8 years.
0 Kudos
Message 24 of 26
(1,307 Views)
To Ralph@NES
@you wrote:
"Each of those big loops is also writing data to a text file every minute, and once those get close to 8mb the file get large enough that it can't be opened, written to, closed in less than one minute and the whole mess crashes.

I'd like to have it automatically generate new files when they reach roughly 4mb.  That will be the next obstacle to tackle.  "

 

Why are you writing to a text file? Have you looked at other file types?

 

I'm currently writing a datalogger project were I am writing about ~1MB/s to a TDMS file over 30 minutes creating files in the 1-3GB range which can all be opened with opensource software or as plugins to excel, matlab, R, etc... No crashing no issues.

 

This may be a better option then trying to create multiple text files, there is also a whole TDMS library in labview for writing and reading files.

 

Message 25 of 26
(1,278 Views)

Vic,

 

That's the filetype I'm familiar with programming to, and that imports easily to excel.  That's really it.  I've got no issues with other filetypes that play nice with simple import to excel.  I'll look into that.

___________________________________________________________________
Still confused after 8 years.
0 Kudos
Message 26 of 26
(1,255 Views)