LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

got input to input error when using subvi to connect another subvi

I want to connect two subvi, one is a serial port setup and the other is serial control, I use a third subvi, connect.vi, to connect two visa reference name together, but I got error" You have connected an inout of subvi to an input of subvil".  

However, if I define a visa reference name in the connect.vi and connect to serial control, no complain.

What did I dio wrong? Please see the attached vi file.

Thanks

Download All
0 Kudos
Message 1 of 8
(3,443 Views)

Well, of course you have no error when you connect the constant. That wire between the two VIs needs a source. If you ha a VISA Resource out from sbVI 1, then you could wire that to the resource input of subVI 2. That's basic dataflow - connect a data source to a data sink.

0 Kudos
Message 2 of 8
(3,430 Views)

Here is my problem, I don't want to display any of the controls in connect.vi, all the controls are in setup.vi where my source should be in.

How am I able to serial_ctrl.vi without showing all of those controls in the main vi(connect.vi)?

0 Kudos
Message 3 of 8
(3,414 Views)
In other word. how do I change all the controls in setup.vi to output?
0 Kudos
Message 4 of 8
(3,413 Views)

cguan wrote:
In other word. how do I change all the controls in setup.vi to output?

 

You would have to change the control to an indicator, each one individually.  Right click on the control and select Change to Indicator.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 8
(3,404 Views)
I'm confused as to what you're actually trying to write. Did you actually write the "serail_ctrl" [SIC] VI? I doubt it, considering the question you're asking. That has a serial port setup in it, though it's poorly configured as fas as the connector pane.
0 Kudos
Message 6 of 8
(3,395 Views)

I can add indicators for each of the controls and the hide them from the front panels, that work-around can solve the problem.

Actually, what I really want  to create a wizard to run setup.vi first, then click a next button to goto another dialog to run serial vi.

Any examples? 

Thanks

0 Kudos
Message 7 of 8
(3,384 Views)
I did wirte the serial_ctrl.vi which is my first labview code, it is not quite prety
0 Kudos
Message 8 of 8
(3,382 Views)