|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
So apparently flat sequence structures don't work well in Teleop.
I'm trying to make a button press open and close a motor. Should I make a SubVI to handle the flat sequence structure, move the flat sequence structure to Periodic Tasks, or use some other method to do this? I figured I'd ask here since I'm done wasting time on something that should be a simple task (thanks LabView
). |
|
#2
|
|||||
|
|||||
|
Re: So apparently flat sequence structures don't work well in Teleop.
Best describe the steps you want to take, e.g., what's the sequence you want to have happen when that button is pressed.
Periodic Tasks is usually for sequences, because they often require delays-like push a button, run a motor for 5 seconds, then stop. You can't have any Delay in Teleop. Last edited by Mark McLeod : 08-02-2017 at 17:22. |
|
#3
|
|||
|
|||
|
Re: So apparently flat sequence structures don't work well in Teleop.
-Push a button
-Run motor for x ms (TBD) -Hold motor for x ms and until button is released -Run motor until a limit switch is activated |
|
#4
|
|||||
|
|||||
|
Re: So apparently flat sequence structures don't work well in Teleop.
Here's a similar example that runs in Periodic Tasks: http://www.team358.org/files/program...tofTimedAction
The tie-in of waiting on a button release for the 3rd action step would require another While Loop inside the 3rd sequence frame that keeps checking for button=False, before completing. Something like this, where it waits 1000ms and for button 2 to be False (either one finishes first it waits for the other to complete): Last edited by Mark McLeod : Yesterday at 13:30. |
|
#5
|
|||||
|
|||||
|
Re: So apparently flat sequence structures don't work well in Teleop.
Quote:
|
|
#6
|
|||||
|
|||||
|
Re: So apparently flat sequence structures don't work well in Teleop.
Quote:
Everything in LabVIEW is executed in parallel unless explicitly tied together. You could make a dozen copies of this same code and they'd all be running independently. This is exactly what Periodic Tasks is for. Last edited by Mark McLeod : Yesterday at 14:35. |
|
#7
|
|||
|
|||
|
Re: So apparently flat sequence structures don't work well in Teleop.
I hope that you were able to follow Mark's example code and get it working. If not, please ask a more specific question, perhaps showing your code and/or including what you tried, how it failed to work, etc.
I'm also curious to understand what you expected the flat sequence to do versus what you discovered it to do? Greg McKaskle |
|
#8
|
|||
|
|||
|
Re: So apparently flat sequence structures don't work well in Teleop.
I just didn't expect the flat sequence structure to kill Teleop
![]() |
|
#9
|
|||
|
|||
|
Re: So apparently flat sequence structures don't work well in Teleop.
In the example given above (http://www.team358.org/files/program...ofTimedAction), what is the point of the Feedback Node? I have no clue what that does, and it seems unnecessary.
|
|
#10
|
||||
|
||||
|
Re: So apparently flat sequence structures don't work well in Teleop.
Can't you click on the node (in LabVIEW of course) and get pop-up help which explains what it does?
|
|
#11
|
|||
|
|||
|
Re: So apparently flat sequence structures don't work well in Teleop.
I have before, but I still haven't figured out how that would be useful in that particular situation. Which is where I don't understand its use. The program I made works fine for ours, with the caveat that hitting A at any time the robot isn't enabled requires the limit switch also be hit again to "reset" the cycle by ending the frame diagram. This is likely a non-issue, as the limit switch will always be pressed when our motor-driven gate is closed, although if anybody has some way to avoid this (not activating when not in Teleop, maybe?) we'll take it.
|
|
#12
|
||||
|
||||
|
Re: So apparently flat sequence structures don't work well in Teleop.
What do you mean by "hold motor"
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|