LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i do this? Help me.

Hello dear user, 

I learn the Labview but i can't to this. How can i do this? Thank you.

 

sslabview.png

0 Kudos
Message 1 of 6
(2,785 Views)

@emirgumus wrote:

Hello dear user, 

I learn the Labview but i can't to this. How can i do this? Thank you.

 

sslabview.png


We can help you with your homework, but we won't do it for you.  You should have the knowledge to at lest begin to code it.  Let's see what you have so far.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(2,756 Views)

Where is your hang-up?  Are you having trouble designing the Front Panel?  Have you looked at the Indicators available on the Numeric Palette?  Have you placed a Control and "played" with it?  Right-click a Control and look at its Properties, especially those shown on the first page.  Play with them.  Experiment.  Pretend you are an Engineer, poking and prodding and figuring out How Things Work.  Wire some things together and see what happens.  Teach yourself ...

 

Bob Schor

0 Kudos
Message 3 of 6
(2,739 Views)

I had previously opened a topic on this topic but i got a few warnings and was able to do them on the program. What is wrong this code, can you help? 

 

sslabview.png

 

0 Kudos
Message 4 of 6
(2,651 Views)

@emirgumus wrote:

What is wrong this code, can you help?


What do you observe is wrong?  What is it doing that is shouldn't?  What is it not doing that is should?

 

I see lots of local variables, which is a huge red flag to me.  The other major red flag is the Sequence Structure.  Perhaps you really should look into making a State Machine instead of several loops in series.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(2,633 Views)

That's actually a pretty good start for someone new to LabVIEW!

 

Now let's talk about dataflow.  Simply put, "a node executes only when data is available at all of its input terminals and supplies data to the output terminals only when the node finishes execution".  This goes for structures, as well.

 

So let's look at your program.  I see two big structures, the sequence structure and the while loop sitting all there by its lonesome.  Which executes first?  What restrictions do dataflow place on them?  Let's apply dataflow.  In your sequence file, the next frame won't execute until everything in the frame before has completed.  In your lonely while loop, it will execute until it is done, also.  But how does dataflow determine which executes first?  Let's consult the pertinent part of the rule above: a node executes only when data is available at all of its input terminals.  Since both the sequence file and the lonely while loop both satisfy that condition, they can, and do (for all practical purposes), execute at the same time.  But I guess you've already noticed that.

 

Because you're a beginner, let's ignore - for now - the fact that you are using local variables when you probably don't need to.  Let's even ignore the fact that you don't need to use a sequence structure if you do things right.  There are more pressing issues to take care of, like: Why is that while loop sitting there by its lonesome?  Shouldn't it be included as one of your steps inside the sequence structure?

 

And here's something no one ever tells you about: The "run continuously" button is intended only to be used as a troubleshooting tool, not as a substitute for a proper while loop to get things to repeat.  You should be able to click the "run" button and have it run over and over until you tell it to stop (usually using a stop button that you have created).

 

Fix those things, then we will talk about how to program in a more efficient, less "dangerous" way.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(2,597 Views)