LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add boolean command

Hi,

 

I'm new in LabVIEW and being mini project, I got template before, but I don't know how to add next sequence command.

Attached screen capture and vi files for easy review and comment.

 

Many thanks for help!

Download All
0 Kudos
Message 1 of 20
(4,159 Views)

That's not a "command", these are local variables. You can make copies by ctrl+dragging them but try to find a better architecture.

 

Your curent architecture is very poor. You can do the same without sequences and local variables. Think "state machine"! Look at the design templates that ship with LabVIEW.

0 Kudos
Message 2 of 20
(4,138 Views)
Please take the tone for one of the several free LabVIEW tutorials. Your code is overly complicated. You could simply copy the existing local variables and paste to the new frame but eliminate the sequence structure and use a for loop with an array of Booleans that you pass from the outside.
0 Kudos
Message 3 of 20
(4,136 Views)

Easiest would be to use an array of boolean, e.g. as attached.

 

See if it can give you some ideas.

0 Kudos
Message 4 of 20
(4,129 Views)

Hi Altenbach,

 

Thanks for your help.

My mini-project is simulate current flow condition in power protection scheme,

I have no idea use sequence or array function simulate attached schematic.

Could you help me advise comment on it.

 

Thanks!

Download All
0 Kudos
Message 5 of 20
(4,102 Views)

What does the attached schematic have to do with the "simulation"? How should the LEDs behave as a function of time?

The VI is currently broken because you show the enable terminal of the feedback node, but it is not wired.

You still have way too much duplicate code. Why do you think you need to convert the same number to a boolean array twice in parallel? Once is enough! You can branch the boolean wire after the conversion and wire it to the two indicators

It might be simpler to initialize the shift register with a boolean array containing one true and 15 false, then simply use "rotate array" in the loop. Now you have more flexibility in the boolean pattern.

 

It is not clear what kind of help you want/need.

 

 

 

0 Kudos
Message 6 of 20
(4,087 Views)

Hi altenbach,

 

Many thanks for your comment.

My purpose of mini project is use LEDs to simulate current flowing, then LEDs will be overlap wiring position of schematic, flashing alternately from left to right, signaling from protective device run to controller, as well as current and signals are flowing on wiring schematic. Like a block diagram when running progamme, I click the icon "Highlight Execution" which will showing the signal "running" on the wiring, but I would like to done this condition on Front Panel. Simply, use LEDs sketch schematic and show the current flow condition.

 

Thanks for your help

0 Kudos
Message 7 of 20
(4,075 Views)

Hi altenbach,

 

I attached vi file which is I wanted to do (not yet completed) for your easy comment.

 

Thanks your time to help me.

0 Kudos
Message 8 of 20
(4,059 Views)

@ikchan wrote:

Hi altenbach,

 

I attached vi file which is I wanted to do (not yet completed) for your easy comment.

 

Thanks your time to help me.


OK, Perhaps another thing you should consider.  A whole bunch of boolean scalar indicators might not be the "Best" way of displaying information to your users.

 

Just to get you thinking about other options, think on this codeSmiley Wink

Capture.PNG

That is a "Snipette" drag n drop to a blank LabVIEW Block Diagram and you can run the code.  (On some Windows Platforms you may have to drag to the desktop first then drag to the LabVIEW BD)


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 20
(4,047 Views)

@ikchan wrote:

I attached vi file which is I wanted to do (not yet completed) for your easy comment.

 


The code you have attached does not explain what you want to do.

 

Why dod you go back to individual LEDs? An array of  LEDs seems much more reasonable. (look at your diagram! 80% of the diagram space is taken up by terminals!) You can use one array per trace, some vertical and some horizontal.

 

What is the purpose of the timing source, relay, and timed inner loop? Why do you think you need to create the timing source with every iteration of the outer loop? Wouldn't once be sufficient? And yes, I have no idea why you would need that.

Your timed loop will never work because you wire a hardcoded error into it. Why?

0 Kudos
Message 10 of 20
(4,038 Views)