Go to Post I think if you talk with mentors of FIRST teams, you will find that they have changed the world. - Bill Moore [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 24-01-2016, 21:14
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Periodic Task Shift Register

Does anyone know the reason for the shift register in time tasked for all the DevRef. From what i can tell it could just be a normal tunnel. Is this true?
__________________
2016 Tesla Division Finalist
2016 Central Illinois Regional Finalist
2015 Newton Division Finalist
2015 Newton Quality Award

Last edited by Bpk9p4 : 24-01-2016 at 21:22.
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2016, 21:27
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Periodic Task Shift Register

It is mostly a habit. If something inside the loop changed the refnum ( the value, not the thing that is referenced ), this wouldn't work without the shift register. For 99% of the cases, the tunnel and shift register are equivalent.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2016, 21:32
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Periodic Task Shift Register

thanks for the quick response. So what would change the changed the refnum in the loop?
__________________
2016 Tesla Division Finalist
2016 Central Illinois Regional Finalist
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2016, 21:38
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Periodic Task Shift Register

The most obvious would be a close followed by open. I'm not sure if any of the I/O VIs will change the cluster, but if they did, the shift register approach is the right one.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 24-01-2016, 21:52
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Periodic Task Shift Register

so is doing something like the picture bellow a bad idea
http://imgur.com/JxM5yiX

Last year we did something like the picture bellow and every time we added a RefNum we had to change all inputs and output names. I was hoping by doing something like the above it would make it easier

http://imgur.com/2M8YjDV
__________________
2016 Tesla Division Finalist
2016 Central Illinois Regional Finalist
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2016, 08:51
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Periodic Task Shift Register

The top picture uses a local variable to hold a refnum instead of passing it by wire. The issue here is that nothing guarantees that the variable has been written to before it is read from.

The bottom image is much more complex code, but I only see one refnum that is in a cluster. If that were a cluster of refnums, you'd add to the cluster and access by name whenever you need it. So I'm not sure I follow.

The code below would be a bit cleaner if the subVIs were modified to take in higher level inputs. So instead of passing in a dozen Booleans, group them in your Var so that they make sense together for passing together. Not sure if that is easy, just seems like it might be applicable here.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 26-01-2016, 08:56
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Periodic Task Shift Register

thanks for the input.

The main problem i am trying to overcome is when you cluster items together and then feed them out of a subvi every time you add anything to that cluster it breaks the line and you have to go in and update all your inputs and outputs. Is there a way to auto up date those?
__________________
2016 Tesla Division Finalist
2016 Central Illinois Regional Finalist
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #8   Spotlight this post!  
Unread 26-01-2016, 10:21
aeastet aeastet is offline
Programming Mentor
AKA: Tim Easterling
FRC #6043 (Allegan Tigers Robotics)
Team Role: Coach
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Holland, MI
Posts: 123
aeastet is an unknown quantity at this point
Re: Periodic Task Shift Register

You need to look into Strict Type Defs. If you use these then they will update in your code anywhere they where used. They are very awesome and will make your life so much easier.
Reply With Quote
  #9   Spotlight this post!  
Unread 26-01-2016, 13:11
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Periodic Task Shift Register

you just made my day. I will look into tonight and give this a try.
__________________
2016 Tesla Division Finalist
2016 Central Illinois Regional Finalist
2015 Newton Division Finalist
2015 Newton Quality Award
Reply With Quote
  #10   Spotlight this post!  
Unread 26-01-2016, 15:11
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Periodic Task Shift Register

I was wondering if that was what you meant by name changes. Typedefs update when the data type of the .ctl file is changed. Strict typedefs update when any aspect changes, and disallow instances from most editing. Strict Typedefs are generally used for UI consistency, and typedefs for type consistency.

Greg McKaskle
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 02:26.

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