05-23-2018 04:44 AM
Hi
you will find attached the Principal VI " Read excel file" and also " read excel prb " when i tried to call the Vi in the main in 15.0 LV version.
05-23-2018 05:03 AM
Why do you need a calling VI (Main VI), Which does nothing other than providing Input and Expecting Output (No Explicit Function),
Learn about Property Node (Implicit/Explicit) for updating values in calling VI from sub VI.
Frame your algorithm in such way that "OK" will be triggered from calling VI.
I Personally Feel, you need to learn LabVIEW Basics.
05-23-2018 05:05 AM
Understand how State Machine Works and Implement your Algorithm using LV StateMachine.
05-23-2018 05:12 AM
@Student_LV wrote:
Please does anyone understand the reason why i get nothing in return ?
I believe I know why your routine fails when called as a sub-VI. In my earlier responses to this thread, I repeatedly asked if you had access to the Report Generation Toolkit, and have yet to see a reply to this question. Please answer my question -- do you have the Report Generation Toolkit? [Or, alternatively, do you see a Report Generation Palette when you right-click on your Block Diagram?].
Bob Schor
05-23-2018 05:32 AM
In the main Vi , i will put sub VI i had already done to treat data such as ''mean'', extract specific data from the hole sheet, and many other functions.. So I need to call the VI which read excel data to get the content of each sheet
My problem was how to trigger " select sheet " and "ok button" from the main VI, because they are included into a while loop in the original VI, so their values are not updated in the main and I couldn't create a sub VI from a selection because the while loop containes two controls
It's true that i'm new to labview, i'm doing my best to learn a lot of things each day. I had already framed my algorithm and i learned about state machines, but As long as I posted my problem in the forum , it's that i didn't find a solution my own and wanted a hint or a starting point to solve it
05-23-2018 05:43 AM
hi Bob Schor
I don't have Report Generation Toolkit, I posted My VI to read excel data using activex functions
05-23-2018 06:12 AM
Make Two separate Modules (1.Getting Sheet names, 2. Reading Values of Selected Sheet).
Initially Call Getting Sheet names Module and Display the Sheet Names using Explicit Property Node to get Displayed in Main VI.
Use User Event Function for Triggering Read Values of Selected Sheet. (To Detect the Trigger Function use Event Structure in the subVI with Dynamic Events enabled)
05-23-2018 07:16 AM
Thanks. I believe the problem arises from using "non-standard" Connector Panes (the default, and Standard, is the 4-2-2-4 pattern). If you had used the Standard, you would have Error In, Error Out, and might have noticed that you need to bring in some References (to Excel, for instance) that are currently unwired, hence take their default values, probably "Not a Reference".
See if passing these references in from the Caller fixes things (I'll wager a dime that it does).
Bob Schor
05-23-2018 09:00 AM
I thank you so much for your suggestion
1- I did the first module " get sheets names ", (attached below ), but same thing when i call it in the main VI, i don't get list name however alone i get it, which property node to use other than the ones that i've used ?
2- For the second module " Read Values of Selected Sheet ", I didn't understand very well how to do it using the event structure , can you please explain to me more or any example could help
Thank you very much
05-24-2018 12:30 AM
@Student_LVI am Still using LV 2015 So i am not able to VIEW Your Module But still with the understanding i will give my suggestion
wrote:
1- I did the first module " get sheets names ", (attached below ), but same thing when i call it in the main VI, i don't get list name however alone i get it, which property node to use other than the ones that i've used ?
Are you aware of Implict and Explicit Property Node (Calling Property node via Reference of Control/Indicators), which will help you to update Main VI from subVI
2- For the second module " Read Values of Selected Sheet ", I didn't understand very well how to do it using the event structure , can you please explain to me more or any example could help
Study about basic Event Structures and how it works, then to trigger the event from outside of the VI You need to use User event and need to call the same in Event Structure.
Its Quite simple to provide you an ultimate solution, which you are expecting but still you need to do by your own