LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting vi's to build a dynamic system

I'm trying to follow your example but it's not working correctly. I'm putting my existing program inside the green case structure, along with the while loop that was already in there. When I drag the individual programs onto a new program as subvi's, nothing will connect to them.
Also, how do I get the data in/out to work as well?
0 Kudos
Message 21 of 41
(978 Views)
I'm not too sure, but it sounds like you haven't connected the connector pane. Do you know how to do that? If not, look up the user manual for subvi's. Or zip all your stuff together and post it here, BUT make sure you have full explanations of what you are trying to achieve and what's not working - just type comments straight onto the diagram.
0 Kudos
Message 22 of 41
(978 Views)
I didn't know about the connector pane. I did set that up and that part is fixed now. When I run the program, the first vi successfully executes the second vi, but after that, the data flow does not continue to the third and fourth vi's. I have attached my files. My first program is main.vi, followed by 10lbcalibration.vi, 5lbcalibration.vi, and finally interface.vi. Could someone take a look and figure out what I'm doing wrong, and also see if I have my global variables set up correctly?
0 Kudos
Message 23 of 41
(978 Views)
Here is the code I promised. The first example is the very simple case I described. The advantage s that it's very simple, the disadvantage is that once you start the process you can't stop it early.

The second example is a little mroe complex but shows how to structure things such that you have a but more flexibility. This allow you backup to redo earlier step. There's also no abort button, but once you grasp how the Next and Previous buttons work, Abort should be a snap to add yourself.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Download All
0 Kudos
Message 24 of 41
(989 Views)
Here is the code I promised. The first example is the very simple case I described. The advantage s that it's very simple, the disadvantage is that once you start the process you can't stop it early.

The second example is a little mroe complex but shows how to structure things such that you have a but more flexibility. This allow you backup to redo earlier step. There's also no abort button, but once you grasp how the Next and Previous buttons work, Abort should be a snap to add yourself.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Download All
0 Kudos
Message 25 of 41
(989 Views)
Thank you very much. I think what I've tried to do is similar. I have two variables that I'm running through all the vi's. I've connected them all in the main.vi. When I run the program, the first vi successfully executes the second vi, but after that, the data flow does not continue to the third and fourth vi's. I have attached my files. My first program is main.vi, followed by 10lbcalibration.vi, 5lbcalibration.vi, and finally interface.vi. Can you see what I'm doing wrong, and also, is my global variable set up correctly? Thanks.
0 Kudos
Message 26 of 41
(989 Views)
I'm a little confused. The code ou sent me only has three VIs in it: the two calibration VIs and the interface VI. So I'm not sure what you mean by the third and fourth VIs. If you turn on execution highlighting, does one of the subVIs never stop executing?

In any case, I've looked at you code and it's a little hard to read because you must have a very large monitor that you work on--or very good eyes. In any case, the only thing I would suggest right off hand is to do away with the globals and pass the data values by wires.

Also, don't use the file IO routines you have. They both have error handlers built into them and so are not really suited for being included inside an application such as yours. Th
e thing to do is resave the vi to your private work directory. Next remove the General Error Hangler vi inside it and connect the error IO to terminals.

Mike...

PS: Where are you located? Is it very late there right now, or very early?

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 27 of 41
(989 Views)
It seems to me that in 10lb, angle is read as soon as the vi runs - there is no dataflow control. So that angle will always be empty string. You need to make sure you have an input here before you continue.What data are you trying to pass to 3&4?
0 Kudos
Message 28 of 41
(978 Views)
sorry to do this to you again Mike... could you expand on this please? What sort of apps aren't these file routines suited for? - I'm wondering if my application would be included.
0 Kudos
Message 29 of 41
(989 Views)
I'm trying to pass "physician name" from 1>2>3>4 and angle from 2>3.
0 Kudos
Message 30 of 41
(978 Views)