Aug
28

Using new LabVIEW Merge Tool LVMerge With TortoiseSVN

by Tomi Maila, Aug 28, 2007 at 6:30 am
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5 out of 5)
Loading ... Loading ...

LabVIEW 8.5 includes a new visual merge tool LVMerge that can be called from external source code control program for three-way VI merging. I’ll go trough the steps required to integrate LVMerge with popular TortoiseSVN source code control client.

If you have edited a VI that is under source code control, occasionally someone else may have edited the same VI after you have checked it out. As a result the two versions of the same VI are likely differ from each other. In three-way merging, these two different versions of the VI are compared agains a common base version of the VI. This way the merge tool can identify which of the changes have occured in both of the modified version since the VI was last checked out. LVMerge is a three-way merge tool and allows developers to visually compare all three versions of the VI. For each modification in either of the two modified version of the VI developer can choose if the modification should be ignored or included.

Setting up TortoiseSVN

To set up LVMerge with TortoiseSVN, right click on a directory under souce code control and select TortoiseSVN from the right-click menu and and then Settings from the appearing submenu. TortoiseSVN Settings screen will open.

TortoiseSVN Settings

Select Merge Tool from the tree menu on the left and press Advanced… button on the right to open the advanced merge tool settings.

Advanced LVMerge settings

No, let’s define that files with extension .vi shall be merged with LVMerge. Tio do this, click Add… button. A dialog window with two fields Extension and External Program will appear.

Extension specific merge program

For the Extension field fill in

.vi

For the External Program field fill in

“C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe” “C:\Program Files\National Instruments\LabVIEW 8.5\LabVIEW.exe” %base %theirs %mine %merged

If your LabVIEW installation directory is not under C:\Program Files\National Instruments, mofify the path respectively.

Press Ok for all the open windows and you are done setting things up.

Accessing LVMerge to Resolve Conflicts

Now we are ready to resolve conflicted VIs. When TortoiseSVN encounters a conflict, it layouts a exclamation point on top of the file icon on windows explorer. The exclamation point indicates that the file is conflicted and that you need to manually resolve the conflicts.

Conflicted item

To resolve the conflicts, right click on the conflicted file and select TortoiseSVNand Edit conflictsfrom the appearing context menu. Now TortoiseSVN will call LVMerge to allow you to resolve the conflicts. LVMerge is a rather intuitive tool and I’ll not go into detail how to use it. You’ll come along.

After you are done with resolving conflicts, save the file with the proposed name and quit LVMerge. TortoiseSVN doesn’t automatically know that the conflicts are now resolved but you still need to thell this to TortoiseSVN. You can tell TortoiseSVN that all conflicts are now resolved by selecting TortoiseSVNand Resolvedfrom the right click menu of the conflicted file. After you have resolved all conflicts in your project, you can commit your changes to the repository.

Note! When resolving conflicts this way, the merged version gets saved on top of your own version of the VI. If you make mistakes in the merge process, you may accidentally loose your own changes to the VI. This is a feature of TortoiseSVN.

Don’t forget to read Jim Kring’s recent post Using Beyond Compare as your TortoiseSVN Diff Program for ZIP Archives at Thinking in G.

Print This Post Print This Post
Aug
15

The New LabVIEW Champions: Yair Neeman, Pavan Bathla and Tomi Maila

by Tomi Maila, Aug 15, 2007 at 4:15 pm
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

Veuve ClicquotNational Instruments just announced that they’ve inducted three new members Yair Neeman, Pavan Bathla and, well, me to the LabVIEW Champions program. Wow, I’m so excited! Yair and Pavan, you really earned this nomination! I wish I could share a bottle of champaign with you guys.

I need to thank you all for this nomination. I would not have made it this far without all those inspiring discussions at LAVA Forums and at NI Discussion Forums. I’d also like to thank NI R&D team for developing LabVIEW Object-Oriented Programming; LabVIEW would not have been nearly as interesting for me without all those challenging moments with LVOOP. Also special thanks to Jim Kring, Matias Palva, Stephen Mercer and Mikael Holmström for interesting private discussions. And last but not least very special thanks to all other ExpressionFlow authors, this site would not have evolved to where it’s now without you.

Print This Post Print This Post
Aug
08

LabVIEW data corruption bug

by Tomi Maila, Aug 8, 2007 at 9:40 am
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4 out of 5)
Loading ... Loading ...

I don’t normally blog about bugs. However with this particular bug I decided to make an exception as it potentially affects everyone in a very nasty way. A few days ago a severe LabVIEW data corruption bug was found by a LAVA forums member Wolfram. As a result of this bug LabVIEW incorrectly reuses calling VI data buffer when calling a value property node in a subVI. The content of a calling VI data buffer gets overwritten by the data passed to value property node. As LabVIEW stores block diagram constants as data buffers, also the values of block diagram constants get changed. The bug is present in all recent LabVIEW version including LV 8.5.

The most common use case I can think of that reproduces the bug is when passing data to an subVI to be interactively viewed by the user. In such cases it’s common to use value property to modify the displayed data. As a result of the bug, the values written to value property node ‘backpropagate’ to the calling VI or to where ever LabVIEW decided to make the last buffer copy. Main VI

Main VI passes data for subVI to be visualized

SubVI uses value property node to modify the displayed data
SubVI uses value property node to modify the displayed data

Main VI after execution, moving mouse over the constant displays the changed constant value
Main VI after execution, moving mouse over the constant displays the changed constant value

Download an example project from the link below:

Buffer bug example for LabVIEW 8.0

Print This Post Print This Post
Aug
03

National Instruments releases LabVIEW 8.5

by Tomi Maila, Aug 3, 2007 at 4:58 pm
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5 out of 5)
Loading ... Loading ...

National Instrument has just released version 8.5 of its visual programming language and integrated development environment LabVIEW. The following new features have been added to LabVIEW development environment

In addition the language has got some new features as well

The full list of changes can be found in the upgrade notes pdf document. NI has also published the list of most important bug fixes.

It’s interesting to see how these new features affect the software development with LabVIEW. I’m especially happy to see the support for recursion in LabVIEW object-oriented programming, as the lack of that was one of the most restrictive things in the previous LVOOP implementation. As of now, I found no evaluation download link for the latest release. I guess we’ll have to wait to really get our hands on this latest toy from NI. Any comments and further information is very welcome.

EDIT: The download link for LV 8.5 for Windows evaluation is now online.

Print This Post Print This Post