Go to Post This is a benefit of the district model. It brings the events back into the schools. - ezygmont708 [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 09-02-2011, 21:09
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Exclamation Changing default values

I am having problem with changing default values!

I right-clicked on the constant and chose Make the current value default but it seems it doesnt work.
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2011, 22:01
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Changing default values

I'm not sure what your talking about maybe take a screenshot. What I think is happening is that you need to put a constant coming off of whatever port your using.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	13
Size:	2.4 KB
ID:	10044  
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2011, 22:10
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Re: Changing default values

Quote:
Originally Posted by j.cole View Post
I'm not sure what your talking about maybe take a screenshot. What I think is happening is that you need to put a constant coming off of whatever port your using.
The problem is when I have 2 victors in the code and I want one of them to be connected to Pwm port 5 and the other to Pwm port 6. What happens in the code is instead taking the values I ve given to the Motors Pwm ports it takes the default values and because of that I should make the constant or control value I ve given the default value. ı thought ı could just make it by right clicking on the value and choosing data operation and then make the cureent value as default.

It seems when I run the code I couldnt do that because just one of the motors works!
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2011, 23:17
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: Changing default values

Quote:
Originally Posted by cilginbilgin View Post
The problem is...
Your description doesn't seem to be giving us enough information. Can you attach a copy of your vi, or at least show us a picture of your program so we can look at it?
Reply With Quote
  #5   Spotlight this post!  
Unread 10-02-2011, 00:08
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Re: Changing default values

Quote:
Originally Posted by Alan Anderson View Post
Your description doesn't seem to be giving us enough information. Can you attach a copy of your vi, or at least show us a picture of your program so we can look at it?
This is the begin.vi of my code.
I double click on one of the victors and change its PWM channel and set that as the default value from that window. Also the other victors PWM default value changes. How can I solve this problem.
Attached Files
File Type: vi Begin.vi (31.5 KB, 8 views)
Reply With Quote
  #6   Spotlight this post!  
Unread 10-02-2011, 00:47
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Changing default values

Quote:
Originally Posted by cilginbilgin View Post
This is the begin.vi of my code.
I double click on one of the victors and change its PWM channel and set that as the default value from that window. Also the other victors PWM default value changes. How can I solve this problem.
I only see one victor open in the begin.vi you posted. Maybe that's why only one victor works.
Reply With Quote
  #7   Spotlight this post!  
Unread 10-02-2011, 00:57
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Re: Changing default values

Quote:
Originally Posted by Joe Ross View Post
I only see one victor open in the begin.vi you posted. Maybe that's why only one victor works.
Sorry I uploaded the wrong code! We figured out that one of the victors was burnt out.
Reply With Quote
  #8   Spotlight this post!  
Unread 10-02-2011, 01:06
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Changing default values

Your code looks perfect. There's no reason to make the values "default", wiring up constants is fine.

(You might want to have your motor names be more description than "motora" though)
Reply With Quote
  #9   Spotlight this post!  
Unread 10-02-2011, 15:32
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Changing default values

Quote:
Originally Posted by cilginbilgin View Post
This is the begin.vi of my code.
I double click on one of the victors and change its PWM channel and set that as the default value from that window. Also the other victors PWM default value changes. How can I solve this problem.
This is because these vi's are not reentrant. For a more detailed explanation of reentrant behaviour, start here: http://labviewwiki.org/Reentrant_VI

What you need to do is set these values to constants in your Begin.vi, in the same manner that the Default Framework does.
__________________
Reply With Quote
  #10   Spotlight this post!  
Unread 10-02-2011, 16:26
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: Changing default values

Oh! Thanks, David, now I see what he's talking about.

To change the PWM channel assigned to a Victor, you don't mess with anything inside the Motor Open vi. You change the value of the constant wired to its PWM channel input terminal. Hover the cursor over the constant until it turns into a hand icon, then you can use the constant as a popup menu and select the channel you want to use.

As a general rule, you should never be changing anything inside the library VI functions.
Reply With Quote
  #11   Spotlight this post!  
Unread 15-02-2011, 00:04
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Changing default values

Quote:
Originally Posted by Alan Anderson View Post
As a general rule, you should never be changing anything inside the library VI functions.
This is a good quote.
__________________
Reply With Quote
  #12   Spotlight this post!  
Unread 15-02-2011, 00:05
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Changing default values

Quote:
Originally Posted by cilginbilgin View Post
I double click on one of the victors
And FYI, this was the clue.
__________________
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 20:37.

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