Jump to content

Fibonachi


Recommended Posts

Hello, im new to labview.

I'm trying to program those beginner programs like outputing the first 100 Fibonachi numbers.

But it seems that the variables in Labview are either read-only or write-only.

Am I right?

Wellcome to LAVA, then ...

you are right, but it seems you are using the local variables in a way which they are not intended to. I guess, you have done some programming in C or other text-oriented languages, so you are used to declare some variables before you implement your algorithm. If you programm in labview, forget any variables, think in wires. The wire is the variable. You don't have to declare it or create it, just drag your wire from the input to the output ...

What you need, to accomplish your task, is a while-loop, and one or more shift registers. Maybe you want to take a look at the LabVIEW fundamentals manual, or take a look at the examples, shipped with your copy. There is a nice tool, called example finder, which is started by clicking Help --> find examples, in LabVIEW, which presents the examples with some explanation in a tree menu.

cheers,

CB

Link to comment
Thanks for your reply. :worship:

I used the shift registers as you said, and it worked.

I guess I need to make a little switch from text languages and change my programming concepts.

you're wellcome.

I would not call it a little switch from text languages to labview. I can only talk for myself, but I needed some hours :blink::rolleyes: of developing experience in LabVIEW before I really understood the data-flow paradigm, and it's a sort of extra burden, if you are used to programm in text oriented languages (as I was before I got stuck in LabVIEW).

But if you have fun with your first steps in LV, I'm sure, you don't want to give it up again. 1. advantage: you'll never have to search for missing semicolons or parenthesis again ;) [except: you use the formula node ...] Ok, you'll start searching coercion dots and wrong connected "bundle" nodes instead, but that's a complete different storry ;)

cheers,

CB

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.