Jump to content

Hopper Filling/Emptying vi


Recommended Posts

Download File:post-15725-1243439508.doc

Hi all,

I am a mature student and very new to labview, I also have very little experience programming in any language so any help here would be great. My problem is that I have been working on trying to get a VI to operate in the sequence that I want for a few days now with little or no success. My hope is to get a hopper to start filling when I switch the "inlet valve open/close" switch on, then when the hopper is full I would hope that the "inlet valve open/close" would switch off and the "outlet valve open/close" would enable thus getting the hopper to empty. When the hopper empties I would like to be able to start the process over again by resetting the "inlet valve open/close" switch again. I have enclosed screenshots of both the front panel and block diagram of the VI. I also know that you guys will spot plenty of errors in the code so dont be surprised when you do. Again any help on this would be greatly appreciated and also if anyone could recommend a good book for Labview beginners written in simple english that would also be a great help.

Thanks alot

David

Link to comment

QUOTE (Rock4 @ May 27 2009, 11:54 AM)

I am a mature student and very new to labview, I also have very little experience programming in any language so any help here would be great. My problem is that I have been working on trying to get a VI to operate in the sequence that I want for a few days now with little or no success. My hope is to get a hopper to start filling when I switch the "inlet valve open/close" switch on, then when the hopper is full I would hope that the "inlet valve open/close" would switch off and the "outlet valve open/close" would enable thus getting the hopper to empty. When the hopper empties I would like to be able to start the process over again by resetting the "inlet valve open/close" switch again. I have enclosed screenshots of both the front panel and block diagram of the VI. I also know that you guys will spot plenty of errors in the code so dont be surprised when you do. Again any help on this would be greatly appreciated and also if anyone could recommend a good book for Labview beginners written in simple english that would also be a great help.

Thanks alot

David

Thank you for mentioning you're a student and trying something first.

You'd be better off attaching the VI rather than the Word document; the Word document is a little hard to read.

Yes, you have a lot of bugs in your code. To specifically address your issue, the value of the Inlet Valve Open/Close control is only read once since it is not inside any loops. For what you're doing, you should only need one or two while loops and not the overall loop. I'd recommend turning on highlighted execution and watching how the data flows on the block diagram and what happens to the data using probes... you'll learn a lot from doing that.

There's a lot of books out there. I haven't read any, but there is a list at http://sthmac.magnet.fsu.edu/labview/basic_labviewbooks.html. I expect there'll be a few opinions on good books.

Tim

Link to comment

I can't look at your screenshots now, but my book recommendation would LabVIEW for Everyone by Jeffery Travis & Jim Kring. Also, you shouldn't post screenshots in a Word doc - just save them off as an actual image (using Microsoft Paint, if that's all you've got) or maybe even upload your actual VIs.

Link to comment

Thank you for your replies and apologies for the screenshots, won't happen again,

I have now uploaded the vi with the original overall while loop removed. I am still at a loss as to how to get this to run in the sequence that I am looking for, so any pointers in the right direction would be a massive help and very much appreciated. Also thank you for the advice on books, I have just ordered a copy of "Labview for everyone" from Amazon so would hope to be solving little problems like this for myself in the coming weeks.

regards

David

Download File:post-15725-1243522221.vi

Link to comment

QUOTE (Rock4 @ May 28 2009, 10:58 AM)

I have now uploaded the vi with the original overall while loop removed. I am still at a loss as to how to get this to run in the sequence that I am looking for, so any pointers in the right direction would be a massive help and very much appreciated. Also thank you for the advice on books, I have just ordered a copy of "Labview for everyone" from Amazon so would hope to be solving little problems like this for myself in the coming weeks.

It sounds as if you're having more fundamental generic programming questions then you are having problems with LabVIEW. I think you're best bet is to look at fundamental programming tutorials and speak with someone one-on-one. I'd recommend doing that and read through "LabVIEW for Everyone".

Tim

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
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.