Thang Nguyen Posted June 20, 2008 Report Posted June 20, 2008 Hi, I have a situation which I need your recommendation. I have a main VI A which has a subpanel. I have 2 subVI B1 and B2. First of all, I load B1 into the subpanel of A. Now inside the B1 VI, I have a button which call for B2. What I want is when I click on this button, the VI A will load the B2 VI into the subpanel. There is also another button on this B2 VI to turn back to the B1 VI. My solution is I pass a reference of one trigger button on the main VI, and I try to generate the signal form the B1 VI to inform main VI close the B1 VI itself and load the B2 VI. I don't know if this solution is a right way to do or not. I am looking for a smatter solution. Currently I am still working on my solution. There is something wrong about the reference and I also get this error message: "The VI is not in a state compatible with this operation." So I hope you can help me. THank you so much, Thang Nguyen Quote
Francois Normandin Posted June 20, 2008 Report Posted June 20, 2008 QUOTE (Thang Nguyen @ Jun 19 2008, 10:55 AM) Hi,I have a situation which I need your recommendation. I have a main VI A which has a subpanel. I have 2 subVI B1 and B2. First of all, I load B1 into the subpanel of A. Now inside the B1 VI, I have a button which call for B2. What I want is when I click on this button, the VI A will load the B2 VI into the subpanel. There is also another button on this B2 VI to turn back to the B1 VI. My solution is I pass a reference of one trigger button on the main VI, and I try to generate the signal form the B1 VI to inform main VI close the B1 VI itself and load the B2 VI. I don't know if this solution is a right way to do or not. I am looking for a smatter solution. Currently I am still working on my solution. There is something wrong about the reference and I also get this error message: "The VI is not in a state compatible with this operation." So I hope you can help me. THank you so much, Thang Nguyen Hello Thang, I'm not sure the reason why you get this error (incompatible state). I usually see errors with subpanels whenever I have not closed the subvi's front panel prior to attaching to subpanel, but that's not this particular error... Without your code, I can only guess why you have the error. I've attached some VI's that might help you figure out where the error comes from in your code. http://lavag.org/old_files/post-10515-1213891871.zip'>Download File:post-10515-1213891871.zip (saved for LabView 8.2) Quote
Thang Nguyen Posted June 20, 2008 Author Report Posted June 20, 2008 QUOTE (normandinf @ Jun 19 2008, 11:12 AM) Hello Thang, I'm not sure the reason why you get this error (incompatible state). I usually see errors with subpanels whenever I have not closed the subvi's front panel prior to attaching to subpanel, but that's not this particular error... Without your code, I can only guess why you have the error. I've attached some VI's that might help you figure out where the error comes from in your code. http://lavag.org/old_files/post-10515-1213891871.zip'>Download File:post-10515-1213891871.zip (saved for LabView 8.2) Thank Normandinf. I haven't thought about passing the Subpanel reference. Quote
Neville D Posted June 21, 2008 Report Posted June 21, 2008 QUOTE (Thang Nguyen @ Jun 19 2008, 07:55 AM) I don't know if this solution is a right way to do or not. I am looking for a smatter solution. Currently I am still working on my solution. There is something wrong about the reference and I also get this error message: "The VI is not in a state compatible with this operation." You usually get this error when the VI is already opened (or called as a subVI) and/or it is already running. I would suggest you simplify your architecture as a first step. Neville. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.