Rock4 Posted May 28, 2009 Report Share Posted May 28, 2009 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 Quote Link to comment
Tim_S Posted May 28, 2009 Report Share Posted May 28, 2009 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 Quote Link to comment
asbo Posted May 28, 2009 Report Share Posted May 28, 2009 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. Quote Link to comment
Rock4 Posted May 29, 2009 Author Report Share Posted May 29, 2009 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 Quote Link to comment
Tim_S Posted May 31, 2009 Report Share Posted May 31, 2009 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 Quote Link to comment
ShaunR Posted May 31, 2009 Report Share Posted May 31, 2009 This would be a good starting point. LabVIEW 8.6\examples\apps\tankmntr.llb Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.