Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I keep the "DIO Port Config vi" setting only for my VI?

I have got a VI in which there are both “Write to line VI “ and “Read to line VI” in there. When the program is running, the “ Write to Line vi” sometimes fails to output the digital logic (high or low) that I set in the control. I found out that LV sets the entire Port where the lines are as output or input. In my case this causes the output to fail.

To solve this problem, I opened the “ Write to line VI” and “ Read to Line VI” to access “DIO Port Config. Vis”. In the “ Line Direction Map” pin of that VI, I changed it to binary format and wrote the binary value in such way that it indicated which line should operate as
input or output. This worked perfectly.

My problem is that every time one opens a new VI. My settings are still presenting the “line direction map” pin.

How can get it to start as (-1) that is the default? And how can I only have the changes in my vi?
0 Kudos
Message 1 of 5
(3,756 Views)
This sounds like you need to save your customized VIs with a different name. Labview looks for files by name, so if you have 2 VI's with the same name but different function, you may get the wrong one.

Take all the VI's you changed and save them in a different location than the originals. Then make sure the originals are back to the way they started.

Labview has a folder called user.lib which was intended to be a a storage library for new or modified files the user makes. (located in the same directory as labview.exe) Customizing the defaults or changing the standard VIs is very common, you just need to make sure you don't mess up the files that were there before.
0 Kudos
Message 2 of 5
(3,756 Views)
I’ve tried what you told me to do. I think I’m not doing something right. Can U please give me a step-by-step instruction so that I can get it this time?

Thanks in advance
Tiano
0 Kudos
Message 3 of 5
(3,756 Views)
Search your computer for a folder called user.lib, it should be in the same directory as the Labview.exe. Usually the path is like the one below, but it depends on your installation options.
C:\program Files\National Instruments\Labview 6.1\user.lib

Open all the files you modified, and change the inputs back to the way they were before you changed them.
On the front panel of each VI, right click on each input control you changed, and select Data Operations, then click "Make current value Default". Save all the VI's.

Next, change the controls back to values that work for your DIO work, click the "Make current Value Default" on each control, then resave the VI in your User.lib location WITH A DIFFERENT FILENAME. Use the "Save As" command un
der the File menu. These are the files you want to save in your User.Lib folder.

Now when you want to call those files for your special DIO work, you use your custom files which are saved in the user.lib folder, not the files in the DIO menu.
0 Kudos
Message 4 of 5
(3,756 Views)
Thanks so much for your input. It worked. Thanks
0 Kudos
Message 5 of 5
(3,756 Views)