Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Read multiple GPIB instruments

Solved!
Go to solution

Hello,

 

I have a time issue when I want to read simultanously GPIB instruments (from 1 to 24 instruments with 2 GPIB cards - GPIB0 and GPIB1).  The user can choose the nomber of instruments he's gonna read.

 

For 17 instruments choosed for example, there's is an array of 17 rows wired to a for loop where the read GPIB is done (See TestVi and For Loop.jpeg). It took about 5 sec to get all data.

But If I juste copy 17 times the read Vi (configured as a reentrant) in a simple vi like in Untitled2.vi, it tool about 1.5 sec to get all data for the same conifguration!!! (See Without For loop.jpeg)

 

How could I read as fast than in Untitled 2.vi with a for loop or something else to allow users to set more or less instruments without copying the read Vi any time the configuration changed ?

 

I tryed to use Call a VI dynamically but it didn't worked.

 

Thank you for your help

0 Kudos
Message 1 of 9
(5,638 Views)

Hi

Realize that a command to an instrument starts an action on that instrument and the read reads the data from that action.

So depending on the instruments you can send out all the requests and then read the fastest instrument first and the slowest latest.

Only problem is what is a slow and a fast command on each instrument.

greetings from the Netherlands
0 Kudos
Message 2 of 9
(5,533 Views)

Thank you for your reply.

 

In fact, the problem is which instruments are the slowest.You mean I should write the commands to all instruments first and then read all the reponse after?

Should that worked in a for loop ? Is that won't send an error not to wait the response just after the write command?

 

Thank You Albert

0 Kudos
Message 3 of 9
(5,504 Views)

I'm sorry, I've added the wrong SubVI!!

So instead of untitled 2, it is untitled1.vi where I've just copied 17 times the vis and that took only 1.5sec...

 

The untitled2.vi is te try with Call a vi dynamically

 

0 Kudos
Message 4 of 9
(5,500 Views)

Hello Anthony,

 

If the VIs you're using are reentrant and there is no dependency between subsequent iterations, then you could try to parallellize your for loop.
This could already create a performance increase.

Which version(s) of LabVIEW do you have at your disposal?

 

Can it be that you are confusing the concept dynamic calls and asynchronous calls?

 

Dynamic calls will allow you to dynamically decide which VI to call.
Asynchronous calls can (for example) allow you to call a VI (provide it with its inputs) and not wait until the first one is done before calling a second one.

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 9
(5,472 Views)

Hello ThiCop,

Thank you for your help.

Most of the time I use LabVIEW8.6 but I alse have the license for LabVIEW2012.

Thank you for your explanations... You're right I tryed to do asynchronous calls with dynamic calls.

 

How could I easily do asynchronous calls in my application?

 

Regards,

 

Anthony

0 Kudos
Message 6 of 9
(5,467 Views)
Solution
Accepted by topic author Anthony_Chartier

Hello Anthony,

 

You should be able to find examples in the NI Example Finder (Help > NI Example Finder in LabVIEW)  by searching for the term "Asynchronous".

 

In 2013 there are some examples located in the place illustrated in my sceenshot.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 7 of 9
(5,383 Views)

Thank you ThiCop for your help.

 

I'll check into NI Examples and see what I can do with examples.

 

Anthony

0 Kudos
Message 8 of 9
(5,230 Views)

Hello Anthony,

 

Were you succesful in using the examples?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 9 of 9
(5,178 Views)