LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing a VISA instrument handle

Solved!
Go to solution

@richjoh wrote:

@carlos_camargo wrote:

Hi All,

I have an instrument (Agilent N6700) which can host up to four separate power supplies or loads.  These are referred to as channels of the instrument but are for ...

handle when all the clones report they're closed.  This I would know how to do.

 


Your making the problem harder than it appears. Use 1 VISA handle, with 1-4 channels in your "separate instruments" object. Your private data would be VISA handle and channel number 1-4. 

 

Visa handles are usually not instrument shared (meaning 2 instruments using same handle). Software code though may want to use the handle (occurring at the same time) in different parts of the LV code. For this use "VISA Lock Async VI" and "VISA Unlock Async VI". When the resource is locked, the simultaneous VISA Lock will wait till becomes available, execute your LV code, then unlock the resource.


You're right and that is in essence what I've done (shared handle, channel held in each power load object) but with the locking mechanism being the "In-Place" structure as crossrulz suggested.  I am also sharing the handle with a DVR as also suggested by crossrulz.  There is a huge benefit in that method because of the DVR being a single memory location, therefore if the handle breaks because the instrument disconnects (or whatever), I can establish it centrally (at the mainframe object) without having to write code to send it back out to each of the instruments.  So the method implemented is an improvement over  what you're proposing though very similar in essence.

0 Kudos
Message 11 of 13
(484 Views)

Hello,

 

I have a signal generator connected to wi-fi and I can ping its IP address from a remote computer.

 

However, within NI-VISA, I am unable to see the signal generator if I view VISA Interactive Control.

 

Can someone help please?

 

Thank you

0 Kudos
Message 12 of 13
(448 Views)

First of all:

You should start your own thread, you'll get more attention to your question that way.

When you do post more information including the brand and model of your signal generator

as well as your version of LabVIEW, and operating system.

Second:

Can you see it using NI-Max?  If you can't then you might need to install some driver or some such for your instrument.

Can you connect to it using a wired connection?  That would be a good way to start and move to wi-fi once the wired

connection is working.

 

0 Kudos
Message 13 of 13
(427 Views)