05-03-2011 09:49 AM
Thank You. I ll go through the producer/consumer achitecture.
The 3 subvis do not have any data dependencies. Even then I cannot make them run in parallel. If 2 return the correct values, the third one returns 0. I can never have all 3 return the correct data simultaneously, though they work correctly when executed separately.
05-03-2011 09:56 AM - edited 05-03-2011 09:57 AM
for(imstuck) wrote:
A person cannot click the mouse 3 times simultaneously. Therefore, if your subVIs are in the event structure, this is impossible. If you post code, like has been suggested multiple times, I am sure we suggest a way to implement what you are trying to do.
This is not impossible. As a single click is needed to trigger one event. the event being calling 3 subvis. And the boolean data from the click is passed to the 3 subvis.
05-03-2011 09:57 AM
Without seeing the code it would be impossible to give you any suggestions to resolve your issue. Do you have any other dependency between the subVIs? Are they trying to communicate with the same device? Are they sharing any resource? There are lots of reasons you could be experiencing a problem but without code we are simply shooting in the dark.
05-03-2011 10:03 AM
I am sorry i know i have been asked a few times for the code... but I really need permission from my superiors to do that..
Though I will try to post a screen shot. Besides I guess I can see where the problem lies. As has been pointed out, they do share a single com port and they r tryin to communicate with the same device.. Are these restraints the reason behind not being able to carry out simultaneous execution??
05-03-2011 10:18 AM - edited 05-03-2011 10:19 AM
Yes, since they share the same COM port (I assume serial) then they cannot run in parallel. They must be run in some synchronous manner.
As for the code we understand that it is not always possible. However you can also create a simple example that illustrates your problem.
05-03-2011 10:30 AM
they do share a single com port
You can't get there from here then! The com port can only do 1 thing at a time.
05-03-2011 10:36 AM
Thank you very much.
05-03-2011 10:41 AM
Rather than use the sequence structure why not use dataflow to control the order of execution? Use the error wire or the VISA resource name to chain your three subVIs together. This will order the execution for you. As for the speed it could be that the device is slow in responding. The other likely cause is that you are not reading the data correctly (looking for a termination character or reading the number of expected bytes for the response) and running into a timeout. For example, your response is only 10 characters but you call your read VI with a byte count of 100.
05-03-2011 01:24 PM
@Preetisar wrote:
But I am not able to make the 3 different subvis in parallel. When one is running, the others dont.
Can anyone please help.... thanx....
If you're using the same sub vi to read all values i'd wager it's not set to be Reentrant.
If they're reading from the same resource (as through RS232) it's probably a resource limitation.
/Y
05-04-2011 03:23 AM
Rather than use the sequence structure why not use dataflow to control the order of execution? Use the error wire or the VISA resource name to chain your three subVIs together. This will order the execution for you.
I tried with dataflow... I found the speed to be more or less the same(since the code is not very big). Thanx a lot anyways.. 🙂