LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Momentary switches and sequential logic--- seeminly not available in Labview

I wasn't aware that you were asking a question. I thought you had already given up. There are a couple of ways to wire a value to the timeout terminal. You can go to the Numeric palette, pick the Numeric Constant, put it on the diagram, enter a value, and wire it to the terminal. The faster way is to just right click on the terminal and select Create Constant. Then you just have to enter the value you want. All terminals for LabVIEW functions have this feature. You can optionally select Create Control. I think all of this is covered in the Getting Started with LabVIEW document. I thought this came with the evaluation copy (Help>Search the LabVIEW Bookshelf). If it's not, it is available for download here. If you need any other manuals, start your search here.

I really can't recomend a beginner's book. I still think the best method is to find the closest class with certified instructors. Failing that, there is their self-paced training. A kit that covers the Basics I and II classes can be ordered here. It includes an instrument simulator. The cost may be high for an individual but is very reasonable for a company to pay for employee training.
0 Kudos
Message 41 of 63
(3,190 Views)

@Moose Man wrote:
[I] didn't find anything like a "Reply for" button, just the one at the top of the heap.


Using the "Reply" shown at the top left in the attached jpg is what was referred to by tst in an earlier post. By using it, "Quote Post" will quote the post of interest.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 42 of 63
(3,186 Views)
Moose Man:

So you are giving up on Labview because:
1. You got hold of a bad book.
2. No one answered your question about events and timeout before you even asked.
3. No one in this forum told you everything there was to know about Labview in 10 words or less.
4. But the main reason, I suspect, is that you do not have the patience to learn it one piece at a time like the rest of us did.

Did you learn everything there is to know about C++ by reading one book? I didn't think so. Like you said, this is a free country, so you have the right to give up on Labview. While you spend hours writing something in C++, a real ANSI programming language, someone else will be writing the same program in minutes using Labview, a real graphical programming language. That is completely your choice and I support your right to chose.

One final thing. This forum is full of people who VOLUNTEER their time to help others learn about Labivew, one piece at a time. There are many people who visit this forum, I get hundreds of emails a day just on this one forum. That must mean that there are a hell of a lot of people who do like Labview. Its no wonder to anyone who had taken the time to learn it and use it that there are so many people who love Labview. Then you come along and blast Labview and NI to the very people who love it enough to want to help others, including wanting to help you, because you didn't learn it all by reading one book, and you didn't get answers to questions you haven't even asked yet. This is just downright unprofessional and rude. Do us all a big favor, exercise your right to chose and stick with a real language that you already know, and stay off this forum. You won't be changing anyone's opinion of Labview here, and you are only managing to make yourself look like an ass. Unless you are willing to learn to crawl before you learn to run, give it up.
- tbob

Inventor of the WORM Global
Message 43 of 63
(3,177 Views)
No, I wasn't asking for a beginner's book. Quite the contrary. I was looking for a book that described Labview *completely.*
Those classes you mention are great if you're working for some huge aerospace company (and you're in good with the right managers there) that is willing to send you to Austin for a week, put you up for a week in a nice hotel, and so on and so forth. Well, that's mot me. Plus, none of that is really necessary. The information I was looking for could probably be put in 50 pages
0 Kudos
Message 44 of 63
(3,153 Views)
The classes are available on CD and there are many classes given locally - not just Austin. There are so many different ways to apply LabVIEW, that I don't think there is such a thing as a "complete" book. How many "complete" books can you find on C++. The table of contents of a "complete" book would be more than 50 pages.

In no real order- a sample:

Data Acquisition
GPIB
Motion Control
Vision
Database Connectivity
Statistical Process Control
Ethernet
Internet (I have a 600 page book on just this)
Interfacing to MS Excel
Interfacing to MS Word
LabVIEW for FPGA
LabVIEW for DSP
Datalogging and Supervisory Control
Simulation
LabVIEW and MatLab
LabVIEW for PDA
LabVIEW Real-Time
Filter Design
Sound and Vibration
Spectral Analysis
Medical Applications
Aerospace Applications
Automotive Applications
Telecommunications Applications
etc.

What "complete" information are you looking for? A couple of posts might be enough to get you past this initial hurdle.
Message 45 of 63
(3,143 Views)

@Moose Man wrote:
"Learning with Labview 7 Express by Robert H. Bishop is the official text book for the Labview 7 Express Student Edition"... Reading it does not give you enough information to write anything but trivial applications.


Well, since I didn't read the book there is no point in debating this. As a point, I believe most students don't write any really big apps, and only want a basic introduction. That's no excuse for a bad book, but if that's what most students want, I guess that's what they get. Just forget the book. If you wish to warn others, that's fine. I don't care.
In my opinion, if that's the case the book reflects badly on NI and not LV, and before you jump in to say the LV IS NI, there is more to LV than NI. It has a rich user community, which also supplies materials for those interested.


What I had really hoped was that someone might recommend a book that was both concise and complete--- and didn't just throw a bunch of examples at you. One that really explained how it all worked.


I learned everything I know about the event structure from tutorials and postings on this site and others, from reading the LV help and from experience. No books and no courses. LV has the advantage of being consistent and polymorphic. Once you know how things work (for example the right-click>>Create>>Constant trick, which is really most of the most basic things in LV), they work the same everywhere. Once you realize a case structure accepts strings as a condition, you will find out it accepts all kinds of other data types.

Once again, it's quite possible that no one has a produced a book that explains everything simply ("both concise and complete", that's a bit of an oxymoron). Not all people are on the same level and many would just like to know what's the fastest way to write this small program they need.
I know I had a hard time when I started, and even the aforementioned Create>>Constant trick confused me for a while when I first saw it, but after a couple of weeks (which you may not have, but no one can help you with that) I started writing my first program (under partial guidance) which did some periodic file reading and analysis combined with a straight forward UI and communication with other programs (which still works today without a hitch).


Labview, I've concluded, isn't a programming language at all, it's a religion.

Well, it's nice to see you've managed to conclude that even though, by your own admittance, you don't understand how it works. As many have told you, LV IS a programming language and it IS relatively very easy to learn. There are some hurdles to overcome, especially if you know text based languages.
No one is denying that it has disadvantages (for example, the tight coupling of the UI and the code, which allows you to skip the annoying variable definition part of other languages, also means that having a dynamic UI is harder), but in general, it's good and easy to learn and you should not mix the topics of good tutorials and the language structure.

Unfortunately, for some very good reasons, NI does not promote G as a general purpose language, but as a language which is very versatile but directed mainly at industrial\medical\military markets and so on. In other words, a professional tool and not a new C. As long as they do that, they have the right to use their own courses as a main tool for teaching the people buying it how to properly use it. Admittedly, that sucks (and there are other ways to learn) but that's probably the best way and it is their right. Others have suggested a book you can read. I told you there are many tutorials you can find on this site (each on a different subject). You can do what you want with that knowledge.

___________________
Try to take over the world!
0 Kudos
Message 46 of 63
(3,156 Views)
1. No, I am not giving up on Labview because I got ahold of a bad book. I am giving up on it because 1) there *isn't* a "good" book on Labview and (2) because there *is* a better alternative-- Matlab with the data aquisition and instrumentation tookboxes. No, Matlab doesn't look better to the final user, and Mathworks isn't an easier company to deal with than NI. It simply has a more intelligible programming language that doesn't use strange and meaningless symbols that are left unexplained.
2. My original question: how do you do sequential logic in Labview? (I think I even used the example of a coin vending machine to illustrate what I meant by sequential logic). Obviously, the answer is: Event-drive structures. I know that now, but I didn't know that when I initiated this thread. Are you telling me I *should* have known that? If I did, why would I have made the post in the first place? Please don't tell me I was expectaning an answer to a question that wasn't asked, because as the Brits like to say, that's just rubbish.
3. Not sure where you got the figure "10 words." That phrase is yours, not mine. But the answer to my initial question (to the best of my recollection, the only real question I have asked in this thread), as I have since figured out for myself, didn't even need 10 words, it only needed 3. I didn't chose those 3 words, NI did. The words are: event-driven programming. If someone had simply told me that, weeks ago, I could have quickly moived on from there. But why didn't anyone tell me? Not because nobody wanted to help, but because nobody who read my post understood Labview well enough to realize that was the answer. Why didn't they? Because *nobody* really understands Labview. A number of people know how to use it, yes, but nobody really understands it. Like the formula for Coca Cola, no one person knows it entirely. Anybody can guzzle the stuff down, but no one person (at least such is the lore) knows how to make the stuff.
This also is why neither Prof. Bishop nor anyone else has written a "good book" on Labview. THAT is the problem. Contrast this with Matlab, for which the algorithms are very well understood by a number of people, including outstanding mathematicians such as Prof. Higham in the UK. What is more, the algorithms are known to be extremely stable, and this is known in large part to Mathwork's open policy with respect to their algorithms.
4. No, it's not that I refuse to put in the time the rest of you did. I've put in a lot of time. It's just that I will not accept the "don't ask why, just accept the fact that it works" attitude that the rest of you seem to have accepted. Why not? Because I'm not a pragmatist? Quite the contrary. It is rather for the very practical reason that when some day, something doesn't work, I'll be up a tree, or as some would say, up a certain kind of creek without a paddle.
0 Kudos
Message 47 of 63
(3,138 Views)
There is some confusion on what you are calling sequential logic. One of the earlier (much earlier) posts mentions the state machine. This architecture is what is used to implement your vending machine logic. Go back through all the posts and I think you'll find that your question was answered a long time ago. The event structure is there primarily to handle user events (button clicks. etc.). It can be combined with a state machine. A state machine as implemented in LabVIEW is a case statement surrounded by a while loop. There can be a shift register to hold the next state(s) or you can write to a queue. There are shipping examples. Just type "state machine" into the Find Examples search.
0 Kudos
Message 48 of 63
(3,133 Views)
Well, when someone puts a coin into a machine, isn't thata "user event?"
There are a few basic ways you could implement such logic. When I was a kid in the early 1950s, the Coke and Pepsi machines (the ones that dispensed 7 oz. glass bottles) that my father had in his gas station, I am sure, used "relay logic." 25 or so years later, the same basic job was probably being done with 74107 JK flip flops. You could still do it that way, I suppose. Or, you could use a low cost microcontroller microprocessor. Or, you could implement in hardware your own microprogrammable "state machine," where you define your own microinstruction word, address sequencing, and so forth. All you need to do this is some D flip flops to latch the output of the PROM, a clock oscillator, a few gates, and a PROM to hold your microcode. (Note that by "microcode" I do not here mean microprocessor code. I'm talking about a level of programming lower than assembler--- the one at which assembler instructions in the VAX, for example, were implented. The MC 68000 as I recall was similarly microprogrammed--- but only at the factory. I don't think users had any capability of doing this.
Still, I don't see what difference it makes, for purposes of this discussion, how you implement your Coke machine. The idea of "user events" caused by a user depositing, a nickle, a dime, a penny, or whatever, is the same. In this example, the data driven paradigm really doesn't work. Nor does it work for a good number of other real world applications--- any application in which a user presses a "begin test" or "abort test" button. From version 6 on, NI recognized this by providing event structures.
This is precisely what I wanted the "momentary switch" for. I wanted to be able to start a test process and let it go--- not be constantly restarting the test. At the same time, if the device under test began smoking or arcing, I wanted the user to have the capability of immediatly halting the test.
0 Kudos
Message 49 of 63
(3,128 Views)
Just for the record, I want to remark on my general experience here.
Never in my life have I encountered such a barrage of attacks on my intelligence and preofessional competence as I have here. I have been belittled, mocked, and talked down to--- as though I were a 10 year old child. In reality, none of this says anything at all about me, but it says a great deal about those who have mounted these attacks against me, both professionally and personally. In retrospect, it was a mistake on my part to waste as much time as I did defending myself against this constant barrage of attacks. It was an even bigger mistake to post here in the first place.
Message 50 of 63
(3,144 Views)