04-15-2019 09:59 AM
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 ?
04-15-2019 10:24 AM - edited 04-15-2019 10:24 AM
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
04-15-2019 10:50 AM
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
04-15-2019 11:02 AM
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.
04-15-2019 11:51 AM
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 ?
04-15-2019 12:07 PM
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.
04-15-2019 03:15 PM
I will ask the vendor and I will do some research
I will come with more informations
Thank you for your answers
04-15-2019 03:27 PM
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
04-15-2019 03:30 PM
So you think I can fix it ?
04-15-2019 03:38 PM
If that subVI can be made Re-entrant, yes you can fix it. If you can't, then no.