12-09-2014 07:45 PM
12-09-2014 07:55 PM
winterfresh -
the State Machine i've given you can do all of that. Have a go and see what you can make of it.
David.
12-09-2014 07:58 PM
I haven't had a chance to look at it yet as I'm not on my computer that has labview on it, but ill check it out. Thanks!
12-10-2014 01:13 PM
Thanks for the replys David but I'm still using LabView 13 and can't open your file,
12-10-2014 01:39 PM
I can't open LV14 either but here is the very simple case structure method. Whether or not you decide (or need) to use a more advanced architecture like a state machine is irrelevant. You should still understand the basic structures in LabVIEW.
12-10-2014 08:08 PM
ah, okay, not a problem. LV13 saved version attached.
12-11-2014 07:32 AM - edited 12-11-2014 07:35 AM
why are we making this issue so difficult?
12-11-2014 09:08 AM
thanks Apok, I think you have quite nicely proven to us that there are many ways to do the same thing.
12-12-2014 02:27 PM
David this appears to work, but it runs extremely slow for me, the graph moves every few sconds at best. Is that a function of my computer?
12-12-2014 08:13 PM
Hi winterfresh -
The graph is only updated each time that particular case is called, which is when the Timeout event occurs. The timeout event is called when the front panel hasn't generated an interrupt or registered event within a particular timeout period. This period is defined by the number wired to the hour glass on the top left fo the event structure. Currently it is the value you originally used, which 10,000 ms, or 10 seconds.
The most obvious approach to resolve the issue would be to reduce that number right down. If you don't have anything you need to handle in other cases or event then you can make the timeout to be quite quick - say, 100ms. You'll just need to play around a little here.
I don't know the full extent of your code but you do have the option in moving your stepper-motor and peak detection code into the timeout event - thus removing the need to have a separate case to 'get value'. If this is a main part of the program and is something you need to happen every timeout period then it isn't a bad idea.