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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Are NI based applications communicating with an instrument?

Hello,

 

I am writing an application in LabWindows/CVI that queries Keithley Switch/DMMs for the switch counts for all the relays on all of the cards installed in the instrument as a preventive maintenance strategy. The application will be installed on all test systems equipped with any of the Keithly Switch/DMMs. It will run as a scheduled task and add the max switch count from each card in each instrument to a central report that can be accessed to determine when the cards maybe approaching critical life cycle milestones.

 

My Issue:

How can I determine, within this application, if there is another application communicating with the instrument when the scheduled task starts? Other applications that might be ccommunicating with the instrument would be our test applications and they could be LabWindows, Labview, Teststand, or dotNET based applications. I don't think other application matters, but I am looking to avoid this PM application interfering/conflicting with a running test application.

 

John O'C
Staff Test Systems Engineer
Woodward, Inc.
Skokie, Illinois, USA

"Life is not a journey to the grave with the intention of arriving safely
in a pretty and well preserved body, but rather to skid in broadside,
thoroughly used up, totally worn out, and loudly proclaiming...
Wow...What a Ride!"
0 Kudos
Message 1 of 2
(2,004 Views)

If the device is reserved, VISA should throw an error when you try to open a session to it. Just monitor for and handle those errors appropriately.

 

If one of the other applications tries to open a session while your scheduled task is running, that's a different story... you can't guarantee that all other test code will handle errors nicely. You could minimize the chances of this by scheduling your task sometime late night or early morning and only running it if the PC is idle.

 

Trent

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 2 of 2
(1,967 Views)