From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Improper functioning of LabVIEW vi

This isn't a specific question I'm having trouble with, but more of a curiousity thing.

I was using the Waveform File I/O vi's provided with LabVIEW, but had very limited success, since I kept getting weird errors.  I ended up making them work properly (to what I thought they would have been set up for in the first place), by going in and editing a few of the sub vi's.

I guess my question is, are these vi's editable for that reason?  Or is their functionality limited for some reason I'm not aware of?  Am I using them in the wrong way?

For instance, I added the "EOF?" to the connector of "Read Waveform from File".  I would have thought this to be included orignally, as it's a very important variable (how else would you know when you've reached the end of the file?).


0 Kudos
Message 1 of 5
(2,234 Views)
You really should never change any of the VIs in vi.lib.

Since those are that's the standard set of VIs that ship with LabVIEW, any changes you make could have negitive effects on any VIs that use them as subVIs.

If you see a need or want to change a vi.lib VI, always save it elsewhere (user.lib) with a different name. This way you won't break anything that depends on the original VI.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 5
(2,208 Views)


@Novatron wrote:
I guess my question is, are these vi's editable for that reason? 

There are many good reasons to have them editable, but as Ed said already, you NEVER want to modify system VIs. You would break everything else that depends on the original functionality and next time you upgrade LabVIEW, you're back to square one. 😞
 
It is a fantastic learning tool to inspect vi.lib VIs and we have to thank NI that most are not password protected. They're typically (not always) well written and you can use them as a starting point for your own VIs, which you then save elsewhere for future use. Make sure you give them a different icon for clear distinction. I often keep the same icon, but change the background color. For example, many years ago I modified the "write to spreadheet file" so it overwrites existing files without asking questions. I made the icon backround red (because it is more dangerous to use), saved it as "rambo write to spreadsheed file" and placed it in user.lib. 🙂
 
 
0 Kudos
Message 3 of 5
(2,200 Views)
Thanks for the replies guys...  I did however, know enough not to modify the system vi's!  I just saved it under a modified name "Read Waveform From File - Modified", but thanks for the tip about changing the icon.  That makes some sense.

Is there a reason though that they wouldn't have included things (that seem important at least to me) like EOF?, and Mark After Read - among others - on the connector pane of the vi?
0 Kudos
Message 4 of 5
(2,187 Views)
Probably no specific reason other than whoever originally made it, probably made it for a specific purpose and those two functions were not needed.

I've done the same thing a few times with my own VIs.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 5 of 5
(2,179 Views)