02-23-2012 11:04 AM
Hi,
I want to see indicator values (indicator is in a while loop and while loop is in a sub vi). I want to see indicator values on main vi. But the problem i am facing is that the indicator value is not updated on the main vi. Although it is updated in the sub vi. Please help me so that the indicator is updated.
02-23-2012 11:15 AM
To do what you want to do will require some effort. Remember there are two (and only two) rules governing execution within LV.
To accomplish what you want, you will need two things:
Mike...
02-23-2012 11:34 AM
You can place the indicator on the main VI and wire a reference to it to the subVI. Inside the subVI, you can update the value of the main indicator using a value property node.
It would be much easier for us to help if you could attach a simplified version of your code.
02-23-2012 11:45 AM - edited 02-23-2012 11:47 AM
What he said...
altenbach wrote:
You can place the indicator on the main VI and wire a reference to it to the subVI. Inside the subVI, you can update the value of the main indicator using a value property node.
It would be much easier for us to help if you could attach a simplified version of your code.
Another way would be to pass a reference to the Main VI's indicator to the Sub VI and update it with a Property Node. This removes the requirement of the Main VI to wait while the Sub VI is running. I expect that it adds some overhead that you might not find acceptable
.
03-29-2012 09:40 AM
Hi,
I have a similar problem as well as a question or two about running subVI's. Basically, I am trying to create a project that will use both syringe pump injections and the opening and closing of valves to transport a fluid. As of now, I have a program written for the syringe pump that I was able to modify from an instrument driver from the manufactuer of the syringe. The goal is to just have the operator press a single run button, as all volume and flow rate conditions will stay the same from trial to trial. I created two separate syringe pump suvbVI's, one injects 1mL of fluid at 1mL/min and the second injects 2mL of fluid at 1mL/min.
I want to use the flat sequence structure to run these two subVI's sequentially, which I am having some difficulty with. I set this up so that the operator must press an "OK" button in order for the case structre to read "true" and begin the operations in the flat sequence. Both subVI's work correctly if operated on their own. However, when I use the highlight data flow function (lightbulb on block diagram) I can see that pressing the OK button causes the case structure to read true, and the program to engage the first subVI. Upon opening the block diagram of the first subVI and using the same lightbulb tool, I noticed that the information is getting stuck in the first while loop and repeating itself endlessly. Any suggestions as to why this may be the case? (I did go into each subVI and changed the VISA resource name to the correct COM port)
Also, once I figure out how to get the information to flow correctly, I do want my main VI front panel to display some of the front panel indicators on the syringe pump VI's, such as the volume dispense and tank. I would like to know more information about how to reference a wire to the subVI as previously mentioned in this thread.
Sorry this was such a long post! I attached the main VI with the embedded syringe pump subVI's that I was talking about. Any suggestions would be greatly appreciated!
Thanks
03-29-2012 09:48 AM
03-29-2012 10:25 AM
Thanks for your reply. I created a new post like you recommended under the labview board. Also, here are the two subVI's as well as the main VI posted again (I posted these links on the new board I created as well)
Thanks