01-14-2013 08:42 AM
I have one big program that Reads form one Excel File and pass the information on to other parts of the program. I am trying to optimize the code and clean it up some by making subVIs.
My Problem:
When I create the subVI there isn't any input. When the program reads from the excel file the data is showing in an 2 Dimensional Array indicator. I need to re arrange the program so it can accept the data coming in and pass it thru the formulas to do the calculations then output the info on the 6 other indicators. This wasn't an issue while in the main program because there wasn't any need for inputs there were all on one program with Notifies to wait until the data is read and pass it to the other parts of the program. The problem is getting that data from the Main program to subvi's that doesn't have any input.
Any suggestions?
01-14-2013 08:53 AM
Have you wired the 2D Array Control on the SubVI's Front Panel to the Connector Pane?
http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/building_connector_pane/
01-14-2013 08:58 AM
Alex,
thanks for the quick reply!
Yes i have but when i place the subVI on a blank VI and look at context help. It shows that 2 D array as an out even though its connected to the left side of the connector panel. when i try to use a local variable form the main program and wire it in it shows an error. Saying that I am trying to wire 1 output into another output.
01-14-2013 09:01 AM
And im guessing its because it was an indicator instead of a control is the reason for this. But i dont know of another way to get the data in from the file. If I turn it from an indicator to a control that will allow me to make it an input but it would cause the program to give another error because that indicator was used to display the data from the excel file
01-14-2013 09:09 AM
Can you share some of your code? I'm having trouble understanding what your problem is. Are you trying to give the option of supplying the information or reading from the Excel file?
01-14-2013 09:10 AM
You're right, connecting an indicator to the CP always creates an output. But I don't see how data you read from an Excel file can be an input... Could you upload (parts of) your program?