LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

several USB connection

Hi,

I use two Conex CC (controller) for command my stages (X and Y), so I added the library CONEX. I created one connection for each controller (Connect Newport Instrument.vi) but my problem is my connection is not in parallel, I have two loop one for each controller but I can't run the both loop in the same time. I would like to know how I can run these loop in the same time ?

0 Kudos
Message 1 of 12
(2,642 Views)

Attach your VI!  We can only guess at what is wrong.

 

My guess, you have a wire dependency leading from one to the other.  Get rid of wires running from one to the other, then the loops will run in parallel.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

0 Kudos
Message 2 of 12
(2,627 Views)

Hi,

My graphics don't have the good Axes : In X axe it is iterations and Y axe it is the time in ms 

For the right graph you can see I have 25 ms at the begining and when i start the second loop I Had 50 ms

Download All
0 Kudos
Message 3 of 12
(2,613 Views)

I don't have your subVI's so I can't look into them.

 

You said you have several USB connections, so to me that means  you are using different VISA connections.  So you shouldn't have any conflicts there.

 

But do these subVI's have calls to dll's?  Are they reentrant?  It is possible that the 2nd loop is waiting for the subVI to be finished running in the first loop before it can be called.  That would certainly happen if the subVI is non-reentrant.  If those subVI's call a dll, it is possible the dll is blocking the call.

Message 4 of 12
(2,605 Views)

Yes I think my second loop is waiting for the subVI to be finished running in the first loop, but i don't understand what is dll ? 

If the dll is blocking the call can I do something for change it ?

0 Kudos
Message 5 of 12
(2,598 Views)

https://en.wikipedia.org/wiki/Dynamic-link_library  Dynamic LInk Library.  You must be very new to computers if you haven't heard of that term before.

 

I don't know.  I don't know if it uses a dll, and if it does, I don't know how it is written.  You'd have to ask the vendor who supplied those LabVIEW drivers.

0 Kudos
Message 6 of 12
(2,591 Views)

I will ask the vendor and I will do some research 

I will come with more informations

 

Thank you for your answers

0 Kudos
Message 7 of 12
(2,573 Views)

I think RavensFan has identified the problem.  Your code shows that the Conex functions work with a Cluster that contains the VISA information as well as the Controller address, which is passed to other Conex functions to do the Reads and Writes.  Unless these are coded to spawn parallel controller-specific codes (or have some way of otherwise handling multiple Controllers in parallel), this will serve as a "scarce resource" that will prevent parallel processing.  [There's a technical name for this problem that I can't remember right now ...].

 

Bob Schor

0 Kudos
Message 8 of 12
(2,571 Views)

So you think I can fix it ?

0 Kudos
Message 9 of 12
(2,569 Views)

If that subVI can be made Re-entrant, yes you can fix it.  If you can't, then no.

0 Kudos
Message 10 of 12
(2,564 Views)