Go to Post School cannot teach everything you need to know so they teach you how to learn. - kstl99 [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-03-2012, 01:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: LV Not Responding to Variable Assignments

Without seeing your code, it's hard to imagine what might be wrong. I can't quite follow your explanation of what you're trying to do. Can you show us what you're talking about so we can look it over for possible problems?

The comment about "normally" starting an encoder and reading it in the same loop doesn't seem right at all, but I'm not sure whether the problem is with the way you're describing it or whether you're actually doing what it sounds like.
Reply With Quote
  #2   Spotlight this post!  
Unread 21-03-2012, 23:17
ablahblah ablahblah is offline
The Blaghh!
AKA: Alex
FRC #4404 (The Nuts 'N Colts)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2009
Location: USA
Posts: 27
ablahblah is an unknown quantity at this point
Re: LV Not Responding to Variable Assignments

Ah...actually, I figured out what was happening.

I was causing the entire while loop in the Robot Main VI to lag up because I was trying to stick a sequence with delays in Teleop.

Tried to put it in Periodic Tasks, caused the entire thing to lag up.

Changed that out, and wrote out some code with timers and some crazy Boolean logic in Teleop; to me, it seems like it acts as if it was its own loop operating independently from the while loop that the Teleop VI is in (it's essentially a loop being executed sequentially). Which is precisely what I wanted it to do, heh.

Solution posted below in 4 parts to describe case structures:





Progression of the interior case structure inside the rightmost larger case structure is 3, 2, 1; it is dependant on time via the Timers.

The outputs are going outside of the pic to feed to case structures that cause our launcher to actuate by itself. I was debating using variables for ease of programming, but used direct LabView wiring for now. Doing that also allows me to put in an emergency cutoff in case the reload goes haywire on the field. Of course, the outputs are turned on or off as dictated by the progression of time. The timer is located in the Periodic Tasks VI, having 1 added to it constantly within a while loop that loops at 10ms intervals (I thought 1ms might be excessive cRIO strain).

I lost track of what I was actually doing after a bit, and I think I could increase its reliability and efficiency for sure by putting in sequential frame structures to use. Any attempt to modify it though, broke its continuity. However, it currently works the way I want it to (initializing the timer in Begin and Disabled and setting the current time variable to the threshhold in Disabled to prevent re-execution on enable), and I'm currently keeping it as is, unless someone can think of better
Heck, I dunno if something like that was already built into LV. I was kinda confused by the whole Timed Loop thing >.>

Last edited by ablahblah : 21-03-2012 at 23:25.
Reply With Quote
Reply


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 22:12.

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