|
|
|
![]() |
|
|||||||
|
||||||||
Here's a sample of a simple program that uses while loops, case structures and flat sequence structures.
19-02-2014 11:59
Whippet
I had been told that it wan't possible to use while loops in Teleop. I guess I was wrong. This is cool!
19-02-2014 12:01
cjl2625I'm pretty sure that wouldn't be good for use in teleop
19-02-2014 12:01
notmattlythgoe
|
I had been told that it wan't possible to use while loops in Teleop. I guess I was wrong. This is cool!
|
19-02-2014 12:02
cjl2625
19-02-2014 12:02
nxtmonkeysJust wire something to the Loop Condition terminal so that it can end. While loops are useful for Autonomous too.
19-02-2014 12:42
geomapguyTimed actions are best processed in Periodic Tasks
They will slow down your TeleOp code if placed there
19-02-2014 13:14
Mark McLeod
This example is good for use in Autonomous and Periodic Tasks.
As shown, this example cannot be placed in Teleop.
19-02-2014 13:24
nxtmonkeysI made this program up to help out someone who wanted to know if he did it right. based on all of your posts, I was able to help him a lot more. Thanks a ton!
19-02-2014 13:44
Jay1986That is not the safest way to accomplish that task nor should it ever be in teleop. You should write the inputs from the joysticks to global variables and read them in period tasks in their appropriate loops.
19-02-2014 13:50
nxtmonkeysYeah, I told him that. I haven't gotten a reply yet, though.
19-02-2014 13:56
geomapguy|
That is not the safest way to accomplish that task nor should it ever be in teleop. You should write the inputs from the joysticks to global variables and read them in period tasks in their appropriate loops.
|
19-02-2014 14:01
nxtmonkeysWell, I'M not using the program. I recently uploaded a few pictures of my teleop program.



19-02-2014 14:03
Alpha Beta|
Do you ever have to write them as global variables?
You can just reference the joystick in Periodic Tasks |
19-02-2014 14:13
nxtmonkeysI'm just happy that the code WORKS.
19-02-2014 14:14
Conor Ryan
I have found that when using Labview, Stacked Sequences are insanely helpful for programming autonomous. I haven't seen too many people use them.
19-02-2014 14:16
nxtmonkeysWithout the sequence structures, my autonomous would make my robot die in agony.
19-02-2014 14:17
geomapguy|
You don't have to...
...But if you do you can manipulate those variables in autonomous. |
19-02-2014 14:18
nxtmonkeysI also, must be missing something. Help! 
19-02-2014 14:46
Pault|
I have found that when using Labview, Stacked Sequences are insanely helpful for programming autonomous. I haven't seen too many people use them.
|
19-02-2014 14:47
nxtmonkeys|
Stack sequences are definitely easy, but ideally your gonna want to use a state machine. Even if at first it seems as though using a stacked sequence would have been the better way, you will come to appreciate the ability to control what state comes next as you start to modify your auton and make it more complex.
|
19-02-2014 14:57
markmcgary
19-02-2014 14:59
nxtmonkeysOooooh. Now I understand! Thanks!