Go to Post There are simply not enough words to say how much the contributions of Dave and Woodie have given to FIRST, and countless students across the world. - Libby K [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 20-03-2016, 10:15
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
Setting Mechanism Position with Button

Hey guys, I've got a question about triggering some PID loops.

So I built a small VI with a PID control in it that reads the value of a potentiometer and attempts to change it by actuating a motor (the reference voltages for various positions are inputted). I want to trigger moving to a different position using a button.

My plan is to put the VI in periodic tasks inside a case structure, and control it using a boolean that is tied to a joystick button. But I don't want to hold it down continuously while the loop executes. How could I program it to execute on the button press and continue executing (as true, so the code stays active in the loop) until it achieves the desired position (or a position very close to it; when it's in range). I want it to run until its close and then stop.

Thanks!
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:43.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi