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: 

how can i determine which devices are used at the moment?

Solved!
Go to solution

Hi all,

 

I am designing an interface with LabVIEW for uing agilent devices. My work colleagues will use this interface.  I want to determine which devices are used at the moment and if I determine used device, i will add automatically device names to interface's main vi. So all my work colleagues can see on the program which devices are used by another colleague. This devices are connected with GPIB. İ want to learn is there any function on Instrument I/O palette.

 

Thanks,

Omer

 

0 Kudos
Message 1 of 19
(3,522 Views)

Hi Omer,

 

so those devices are connected to the PC with a GPIB connection. Will your collegues run several DAQ programs at the same time?

 

GPIB-devices being controlled by PC don't have a "in use"-signal. They wait for commands, execute them and send an answer. When you start to control them using two programs they may respond to both programs, mixing up settings/measurement values and so on.

 

That being said: In MAX you can see all devices connected to your GPIB port. You could scan the GPIB port using VISA commands in your program. You might even try to access a certain device by it's VISA alias. I really don't know if you will get a "device nopt available" error message when that VISA alias is in use by a different program - but you might do a quick test on your own…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 19
(3,519 Views)

Hi GerdW,

 

 For example, my friend opened the program and he is working with several device (using with his computer). and i open program too (on my computer), i want to see this on the program . program must say to me that this device is used at the moment or device is not avaliable. 

0 Kudos
Message 3 of 19
(3,485 Views)

Hi omer,

 

how is your computer connected with those DAQ devices when they are connected by a GPIB cable with a different computer?

 

How will you fetch the DAQ device state when they aren't connected with your computer?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 19
(3,475 Views)

Devices are connected with GPIB cable to E5810A Gateway. The Gateway is connected our modem. Computers communicate devices with VISA commands. My main vi is like this; 

 

 

0 Kudos
Message 5 of 19
(3,464 Views)

And i want to see this;

0 Kudos
Message 6 of 19
(3,457 Views)

Hi omer,

 

as you use a Keysight LAN/GPIB converter you might ask their support on how to solve that question!

Having a quick check I'm forced to register before I can download any manuals so you need to read them on your own…

 

You might check the RemoteENable state of the GPIB devices. Check their manuals on how the read the current device state! (This check depends on a properly set REN state. Not all GPIB devices require a REN state to accept remote commands…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 19
(3,442 Views)

Thank you GerdW, i will check their manuals. i hope i can find my solution

0 Kudos
Message 8 of 19
(3,415 Views)
So you have the same set of instruments being shared? I don't see how the remote enable will help. Once computer A enables the instrument, it will stay enabled until you manually disable it or one of the programs does.
0 Kudos
Message 9 of 19
(3,404 Views)

Hi Dennis,

 

Once computer A enables the instrument, it will stay enabled until you manually disable it or one of the programs does

 

That's what I had in mind when I wrote:

This check depends on a properly set REN state

Each measurement program in this mixed setup should set REN, when it starts the measurement and should clear it afterwards.

If this isn't the case, then the OP should embed better programming style guides in it's company…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 19
(3,399 Views)