LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

logic error

Solved!
Go to solution

I am having a problem understanding the operation of the logic in the attached vi.  It is a part of a larger system and I have set the normal inputs to values supplied by the other vi's to test this vi.  What I dont understand is the value of the wire labeled "Increment Output" inside the "Run Off" logic when the increment evaluates during single stepping through the vi (works the same way in the system application).  At this point in the execution the Increment Output is 56 when I expected a value of 1.  (The "Run On" logic above acts the same way when "RunOn/RunOff" boolean is True.)  Also, why, when I probe the "Run Off Counter Out" node wire, is the probe's name "Run Off Counter In"?  I am fairly new to LabView programming and would greatly appreciate any help offered.

 

Thanks, 

Mel

0 Kudos
Message 1 of 4
(2,694 Views)

Hootowl wrote:

I have set the normal inputs to values supplied by the other vi's to test this vi. 


You don't actually need to replace the controls with constants. You can set the values of the controls, and then select Make Current Values Default prior to uploading the VI so we can see what condition you want to run the VI in.

 



Hootowl wrote:

What I dont understand is the value of the wire labeled "Increment Output" inside the "Run Off" logic when the increment evaluates during single stepping through the vi (works the same way in the system application).  At this point in the execution the Increment Output is 56 when I expected a value of 1. 


With the values that you provided it's neither. That's not the case that gets run. I'm assuming you meant when the "Start/Timed Run Flag In" is True, rather than False, as it currently is. The reason for getting a 56 is because you have a wiring error. The input wire to the Increment functon is not coming from the bottom tunnel - it's coming from the top tunnel. Double-click on the input wire and you will see the source. The vertical part of the wire is hidden by the case structure frame. See picture.

 

 

As to the code: it seems awfully complicated.  What exactly are you trying to do? FYI: ANDing a Boolean value with a True is redundant. That's like multiplying a number by 1. 

 

Message Edited by smercurio_fc on 11-22-2009 09:58 PM
0 Kudos
Message 2 of 4
(2,683 Views)
Solution
Accepted by topic author Hootowl

Thanks for the help.  I suspected it was something elementary but I didn't think to check the wiring since the wire appears to go to the desired terminal.  All in all, a dumb mistake.

 


smercurio_fc wrote:

As to the code: it seems awfully complicated.  What exactly are you trying to do? FYI: ANDing a Boolean value with a True is redundant. That's like multiplying a number by 1. 
 ____________________________
Understand ablout the True.  The True replaced a parameter that is set in another vi and referenced here.  I replaced it so I could attach only the one vi.   This vi is part of a much larger application that under some conditions needs to use a 'Run On' time delay and under other conditions use a 'Run Off' time delay.  The magnitude of the two delays is configurable by the user.
 Again, thanks for the help.  I'll re-double my efforts to find this kind of error before posting.
 Problem solved.
 Mel

 


 

0 Kudos
Message 3 of 4
(2,674 Views)
****message deleted*****
Message Edited by muks on 11-23-2009 01:00 PM
0 Kudos
Message 4 of 4
(2,668 Views)