08-08-2018 05:14 AM
Hi,
I am having the same problem by trying to synchronize two loops. Basically my producer needs to wait for a response from the consumer before queuing other tasks for them. Can you explain a bit more what do you mean by queuing reference?
I also had the idea of using semaphores.
thnx
08-08-2018 05:23 AM
Hi crossrulz,
I have the same issue as the one mentioned in this post. So if I understood you correctly, you suggest to create a subvi (nonreentrant) that sends messages to the queue and waits for a response. I am not really sure how would that subVI look like. Can you give a quick example pls, of a subvi that would send a message from the producer loop and then wait for a response. As it is nonreentrant means you cant have two instances running simultaneously. Sorry for bothering you, I am just a bit confused.
thank you very much for your help.
08-08-2018 06:16 AM - edited 08-08-2018 06:17 AM
@jcswright wrote: As it is nonreentrant means you cant have two instances running simultaneously.
If you were going the Semaphore route, then non-reentrant VI does the same thing but more efficiently.
@jcswright wrote: Can you give a quick example pls, of a subvi that would send a message from the producer loop and then wait for a response.
Here is an image of some actual code I have running around.
