From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically generated boolean in loops

I have spent two weeks frustrated, trying to create a program from a VI example from some third party hardware, A velleman usb k8055 board. The hardware has various inputs and outputs. The digital I/O of the example program is translated as boolean which i seem totally unable to use in loops. From what I have searched the programatically generated boolean seems to be of wrong mechanical function to actually be used in labview loops.

 

I have a template VI that was supplied with the hardware and everytime I try and place the boolean output (local variable from an indicator, tunnel wire) it either seems to latch the original output indicator or stop the original code from funtioning and focus' only on the loop.

 

If I replace the programatically created boolean with a standard boolean switch everything functions correctly. I have encounted this many times and sometimes find ways outside of a loop to solve the problem. If possible I would like to know how to use these generated boolean outputs in loops. I have only used labview for two weeks and I have watched both labview basic tutorials and searched all possible combination of my problem on google leading me frequently to these forums, some of which have helped with my problem so far.  I seem to spend a lot of time copying and pasting code, splicing wires in a hope to find a solution to my problem. There is something called Property Node Value Signalling which I am told might help but I have tried and dont know how it works.

 

I can give info on the overall project if no one knows the problem I am encountering. I am really a hardware man and not a programmer.

 

Any advice will be helpful

0 Kudos
Message 1 of 31
(2,851 Views)

I bet we can solve this, but I can't open your file.

 

Can you save it to an earlier version and repost it?

 

Thanks.

0 Kudos
Message 2 of 31
(2,845 Views)

I have the latest version of labview 2012, i have saved in V10 if this helps? Or do you need an earlier version?

 

The velleman k8055 has a single DLL which deals with the hardware calls. But the end boolean is what i am struggling with.

 

Thanks again

Rich

0 Kudos
Message 3 of 31
(2,839 Views)

Okay. I can see it now, but because I don't have your .dll, I can't run it.

 

There is only one type of a boolean value.  They cannot contain information about latch state or anything else.

 

That means that you should just be able to wire the output from your unbundled cluster to your loop.

 

Can you describe what happens when you do this?

0 Kudos
Message 4 of 31
(2,828 Views)

Version 8.5

0 Kudos
Message 5 of 31
(2,826 Views)

When i wire the connection from the cluster (boolean output) to the boolean input loop it doesnt trigger like it does with the boolean switch, It appears to never see a boolean state to trigger. I hope what im saying makes sence as like i say i have very limited labview knowledge.

0 Kudos
Message 6 of 31
(2,825 Views)

The other advice I can give right now is to not use local variables or property nodes.

 

I don't see any reason for those and it looks like it would just make everything more complicated.

 

What I would do it run it in "Highlight Execution" mode.  (The lightbulb button on the block diagram).  This will let you see the program as it is running, show you the values and let you see where it gets hung up.

 

Also, I like to put a whole bunch of extran indicators all over the place so I can makes sure the values I am looking for show up where I expect them.

 

Good luck.

0 Kudos
Message 7 of 31
(2,823 Views)

I tried to use local variables to find a solution to my problem as the programmatically generated boolean in my VI can never be used in any loops (that i have tried)

 

Thanks for your advice.

 

Cheers Rich

0 Kudos
Message 8 of 31
(2,811 Views)

Do you know for a fact that the cluster is being populated?

 

I would put an indicator on it, (right click, create indicator) and wathc it run in highlight mode.

 

What value do you expect to see there? 

0 Kudos
Message 9 of 31
(2,810 Views)

I see the LED indicator confirm True boolean from the cluster when a hardware input is seen? However when i bridge the wire from cluster output to the indicator to a loop it usually SOMEHOW holds the indicator to true and function incorrectly. Where as a boolean switch in place functions normally. I dont understand the difference except one is controlled programtically and the other via UI

0 Kudos
Message 10 of 31
(2,807 Views)