LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

missing assignment to tunnel

attached is my programme. one file is also needed but can't add moe then 3. Here at the bottom under the "Core of the programme" look for "motion direction". I have defined it outside the loop. and then in the while loop under 0 0 1 case you will see the first occurence of "motion direction" local variable. and then outside the while loop the 2nd occurence of the same variable. Now for this 2nd occurance of local variable. I am getting this error messege:" missing assignment to tunnel".
What could be the reason.
Is it not allowed to use more then once the local variable of the boolean control or indicator?
Download All
0 Kudos
Message 1 of 6
(4,180 Views)
You have a tunnel that is virtually hidden by the case input of your case structure which has no connections and should be deleted. Since this tunnel has no connections it is acting as an output tunnel, thereby giving you the error.
0 Kudos
Message 2 of 6
(4,180 Views)
The immediate problem is that you have an unwired tunnel underneath the case selector. Just move the case selector and you'll see it. The wiring in your program in generalm is a bit sloppy and difficult to follow. You've got wires going underneath structures in several places, making it very difficult to trace the flow of data. The convention is wires go from left to right and top to bottom. I also don't understand the purpose of most of the sequence structures. You use in some cases, local variables for error in/error out when directly connecting the functions will enforce data flow without hiding part of your program. Using event structures and a state machine architecture will greatly improve the readability, maitainability, and flexibility of your pr
ogram.
Message 3 of 6
(4,180 Views)
... In addition to what has been already said:

Just double-click the error in the error window, and LabVIEW will highlight exactly where the problem is.
0 Kudos
Message 4 of 6
(4,180 Views)
Hi,

Click the case selector, move it down, you will see a tunnel which is not used. Delete this tunnel if not to be used.

Tunnel could be used for passing your values to parameter such as Min Speed & Max speed. Instead of using 2 local variables, you can use one single local variable by putting it outside the case, wire values from TRUE/FALSE case to these local variables.

Also Instead of Local variables, you can use property nodes to optimize memory use. Its always better to minimize the use of local variables even property nodes also bcoz too many parameter eat the processor performance along with memory & running speed issues.

Also in your vi, there could be lot many optimizations which could simply enhance the performance of your vi.


I m including a vi which shows use of tunnels in a case in a simplified way.

Hope it helps. Your feedbacks are welcome.

Best Regards,
Nirmal Sharma
India

Best regards,
Nirmal Sharma
India
0 Kudos
Message 5 of 6
(4,180 Views)
... and more addition:

Single-click the the error in the error window and read the details section. It explains the error and (sometimes)actions you might take to correct the error.
0 Kudos
Message 6 of 6
(4,179 Views)