LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Channel Wires and Sub-vi

Solved!
Go to solution

Q: Is there a simpler way to make a sub vi executable when the sub-vi has a channel wire input?

Currently, when I try and execute a sub-vi stand-alone that has a chanel wire input, I get the error message "This VI contains an unwired channel terminal..." and the vi promptly stops.
My current work around is to put a diagram disable around the terminal plus put a channel wire in a hard coded false case. This is not a very good work-around since you have to remember to remove the diagram disable before releasing the code.
Another work around would be to create a wrapper vi for my sub-vi, but that just seems wrong. However, it is probably "safer" than the first option.
Am I missing something?
(I just started using LV2016 at my new job, previously was using 2013.)

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 1 of 3
(3,551 Views)
Solution
Accepted by topic author Frozen

Channel Wires need to be "fed".  You can pass a Channel into a sub-VI (I do it all the time, pass them out, as well), but you can't have a "naked" Reader or Writer, which means you cannot call a sub-VI with a Channel as an input or an output -- as they say in Pittsburgh, "This Vi Needs Wired".

 

For testing purposes, make a Dummy Top Level VI, put your sub-VI inside it, and Connect Those Channel Wires!

 

Bob "Channel" Schor

0 Kudos
Message 2 of 3
(3,522 Views)

That is too bad. I was looking forward to  using channel wires but it is just not  good fit for this particular project.

Well, there is always next time.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 3 of 3
(3,487 Views)