06-06-2007 12:00 PM
06-06-2007 03:52 PM
06-06-2007 08:13 PM
06-07-2007 09:35 AM
@Rosencrantz wrote:
Thanks for your advice and sample vi, but I could not read it. Could you send ti again in version 8.0 or lower?
I have attached a sample vi of what i am trying to do. I am getting an error that comes from the sample clock on the ai side. Is there a better way I write this program? I am not familiar with synchronization and clock timing, so any advice would be appreciated. I cna get the output to do what I want, but the input waveform/graph just hangs.
06-11-2007 01:56 PM
06-13-2007 06:28 AM - edited 06-13-2007 06:28 AM
Hi,
Instead of using a sequence structure you could use a state machine architecture to allow you to stop in the middle without having to run every step. Here is a tutorial for creating and understanding state machines in LabVIEW. You do not necessarily need the State Diagram Toolkit, though it may make it easier. There is a template built into LabVIEW that can give you a starting point for creating your own state machine. Under the File»New... menu, you can choose the state machine template under VI»From Template»Frameworks»Design Patterns»Standard State Machine template. You would have each of the actions you perform in the sequence structure be a state and normally transition from one state to the next. If the user presses stop, the code could stop after the current step completes. If you do not have a shut down state, you could have the stop button outside of the case structure and the user could stop the loop immediately after the current state. With this, you can have your shut down code outside of the while loop (and dependent on the while loop completing).
I hope this helps!
Regards,
Message Edited by MissyD on 06-13-2007 06:32 AM
06-13-2007 07:04 AM
06-18-2007 10:34 AM