LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

All LabVIEW retirees! Would you please post the most amazing LabVIEW code you've ever written ?


@BuddyHaun wrote:

If you ever have the pleasure of working a lot with serial instrumentation I found this vi that I wrote long ago to be indispensable. It closes all open com ports without getting out of LabVIEW.  Not that I am retired yet.


Interesting.  It looks like it will close all VISA sessions, not necessarily just the COM ports.  Nice hidden gem in there as well.  I might have to play with this in my next project.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 17
(450 Views)

@crossrulz wrote:

@BuddyHaun wrote:

If you ever have the pleasure of working a lot with serial instrumentation I found this vi that I wrote long ago to be indispensable. It closes all open com ports without getting out of LabVIEW.  Not that I am retired yet.


Interesting.  It looks like it will close all VISA sessions, not necessarily just the COM ports.  Nice hidden gem in there as well.  I might have to play with this in my next project.


There is a LabVIEW.ini Key to do that!  So, a private method probably already exists.  Tim why don't you ask on another board?


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 17
(424 Views)

As a public service FYI:

 

This will only identify VISA sessions that are part of the same execution context.  A colleague tried it out from the dev environment while an EXE was holding a particular COM port open and the EXE's session wasn't in the VISA array.  Which is how it *should* work -- there's a good reason for it *not* to be included.   So this isn't a complaint, just an FYI.

 

 

-Kevin P

 

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 13 of 17
(414 Views)

@GRCK5000 wrote:

 

Let's see your top notch LabVIEW code.


Listen if this is some kind of interview then I'm going to want to see the job offer first.

 

I do have a reuse library I organized and maintained pretty well at my previous job.  I've posted this on Linkedin and LAVA in the past.  I have since made some improvements in automating its generation.

 

post-6627-0-28411100-1403268186.jpg

 

I also have some more elaborate high level software documentation that I'm proud of, but I haven't got permission to post yet.  And the documentation for a cool software thing, isn't really all that impressive if you don't also have the cool software.  But it might look good on a Linkedin accomplishments page.

Message 14 of 17
(362 Views)

@Hooovahh Haha... But I have used your library before. Great documentation, very easy to understand.  Man, you definitely deserve a huge trophy. lol

0 Kudos
Message 15 of 17
(344 Views)

Turns out I did post part of the documentation of this large project here.

0 Kudos
Message 16 of 17
(283 Views)

@Kevin_Price wrote:

As a public service FYI:

 

This will only identify VISA sessions that are part of the same execution context.  A colleague tried it out from the dev environment while an EXE was holding a particular COM port open and the EXE's session wasn't in the VISA array.  Which is how it *should* work -- there's a good reason for it *not* to be included.   So this isn't a complaint, just an FYI.

 

 

-Kevin P

 

 


I just got some time to dig into this a little more.  Sitting right next to Open Sessions.vi on disk is Open VISA Session Monitor.vi.  This looks like a great debugging tool for VISA sessions as far as seeing what is open and forcing sessions to close.  It does look like it was written in the 5.1 days, but it does look like it does the job (I would refactor it to use an Event Structure instead of all the case structures for the buttons).

 

For those wanting to dig, these two VIs are located at <vi.lib>\Utility\visa.llb.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 17 of 17
(253 Views)