Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Extra Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=68)
-   -   pic: Programming is as easy as you make it. (http://www.chiefdelphi.com/forums/showthread.php?t=126847)

nxtmonkeys 19-02-2014 11:58

pic: Programming is as easy as you make it.
 




Anyone need help with their programming?

Whippet 19-02-2014 11:59

Re: pic: Programming is as easy as you make it.
 
I had been told that it wan't possible to use while loops in Teleop. I guess I was wrong. This is cool!

cjl2625 19-02-2014 12:01

Re: pic: Programming is as easy as you make it.
 
I'm pretty sure that wouldn't be good for use in teleop

notmattlythgoe 19-02-2014 12:01

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by Whippet (Post 1346060)
I had been told that it wan't possible to use while loops in Teleop. I guess I was wrong. This is cool!

As long as it is in a separate thread its fine.

cjl2625 19-02-2014 12:02

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by notmattlythgoe (Post 1346062)
As long as it is in a separate thread its fine.


Oh, well I guess you could do that then

nxtmonkeys 19-02-2014 12:02

Re: pic: Programming is as easy as you make it.
 
Just wire something to the Loop Condition terminal so that it can end. While loops are useful for Autonomous too.

geomapguy 19-02-2014 12:42

Re: pic: Programming is as easy as you make it.
 
Timed actions are best processed in Periodic Tasks

They will slow down your TeleOp code if placed there

Mark McLeod 19-02-2014 13:14

Re: pic: Programming is as easy as you make it.
 
This example is good for use in Autonomous and Periodic Tasks.
As shown, this example cannot be placed in Teleop.

nxtmonkeys 19-02-2014 13:24

Re: pic: Programming is as easy as you make it.
 
I 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!:)

Jay1986 19-02-2014 13:44

Re: pic: Programming is as easy as you make it.
 
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.

nxtmonkeys 19-02-2014 13:50

Re: pic: Programming is as easy as you make it.
 
Yeah, I told him that. I haven't gotten a reply yet, though.

geomapguy 19-02-2014 13:56

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by Jay1986 (Post 1346174)
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.

Do you ever have to write them as global variables?

You can just reference the joystick in Periodic Tasks

nxtmonkeys 19-02-2014 14:01

Re: pic: Programming is as easy as you make it.
 
Well, I'M not using the program. I recently uploaded a few pictures of my teleop program.






Alpha Beta 19-02-2014 14:03

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by geomapguy (Post 1346191)
Do you ever have to write them as global variables?

You can just reference the joystick in Periodic Tasks

You don't have to...
...But if you do you can manipulate those variables in autonomous.

nxtmonkeys 19-02-2014 14:13

Re: pic: Programming is as easy as you make it.
 
I'm just happy that the code WORKS.

Conor Ryan 19-02-2014 14:14

Re: pic: Programming is as easy as you make it.
 
I have found that when using Labview, Stacked Sequences are insanely helpful for programming autonomous. I haven't seen too many people use them.

nxtmonkeys 19-02-2014 14:16

Re: pic: Programming is as easy as you make it.
 
Without the sequence structures, my autonomous would make my robot die in agony.

geomapguy 19-02-2014 14:17

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by Alpha Beta (Post 1346201)
You don't have to...
...But if you do you can manipulate those variables in autonomous.

But you can still manipulate the variables in auto mode..

I must be missing something

nxtmonkeys 19-02-2014 14:18

Re: pic: Programming is as easy as you make it.
 
I also, must be missing something. Help! :confused:

Pault 19-02-2014 14:46

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by Conor Ryan (Post 1346220)
I have found that when using Labview, Stacked Sequences are insanely helpful for programming autonomous. I haven't seen too many people use them.

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.

nxtmonkeys 19-02-2014 14:47

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by Pault (Post 1346259)
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.


What is a state machine?

markmcgary 19-02-2014 14:57

Re: pic: Programming is as easy as you make it.
 
Quote:

Originally Posted by nxtmonkeys (Post 1346260)
What is a state machine?

LabVIEW Wiki State Machine

Wikipedia Finite State Machine

nxtmonkeys 19-02-2014 14:59

Re: pic: Programming is as easy as you make it.
 
Oooooh. Now I understand! Thanks!


All times are GMT -5. The time now is 03:10.

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