View Single Post
  #6   Spotlight this post!  
Unread 19-02-2013, 10:52
AquaMorph's Avatar
AquaMorph AquaMorph is offline
Alumnus of 2059
AKA: Christian Colglazier
FRC #2642 (Pitt Pirates)
Team Role: Mentor
 
Join Date: Jun 2010
Rookie Year: 2008
Location: Cary
Posts: 78
AquaMorph is on a distinguished road
Re: Running Loop in Parallel

Quote:
Originally Posted by Omar View Post
Agree about the state machine!

But so for your code, I not sure you have it quite right.

Is the code with the two while loops "Move Down until limit switch" and "Angle" inside the "Set Angle Preset 1" subVI?

Do you expect the "Disable Limit" Boolean input to change while looping around the "Move Down until limit switch" loop? If so that will not work because "Disable Limit" will only have the value passed in when the subVI was called and not any new value from the joystick. To update from the joystick as it loops, you will need to put a Joystick Get inside the "Move Down until limit switch"

I'm not too sure just how this angle setting is to work. It seems you have a 'home' position (Top Angle Limit) that you move to start and then iterate around a 10+ms loop a number of times read from the Dashboard until you HOPE to be at the angle you desire.
You are correct on how the angle adjustment is going to work. It goes up until it hits the limit switch then goes down for a set amount of time. I am hoping to replace the time function with a gyro but I have been unable to get a good reading from the gyro.

I am currently not too worried about the "Disable Limit" not working but I may change it if need be but I believe it worked in its current state.
__________________
FRC Drive: Play Store FRC Manager: Play Store
Reply With Quote