01-10-2014 12:40 AM
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
Solved! Go to Solution.
01-12-2014 10:04 AM
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.
01-13-2014 12:45 AM
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
01-13-2014 01:24 AM - edited 01-13-2014 01:26 AM
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
01-13-2014 05:25 AM
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.
01-13-2014 05:51 AM
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
01-15-2014 06:19 AM
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.
01-24-2014 01:03 AM
Thank you ThiCop for your help.
I'll check into NI Examples and see what I can do with examples.
Anthony
01-30-2014 03:11 AM
Hello Anthony,
Were you succesful in using the examples?