Go to Post I feel like I need to rinse out my brain with drain cleaner - dlavery [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 05-02-2013, 18:23
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Breaker Switches and Buttons to Motors

Sorry, will try to get code on usb drive right now, we are attempting to get the breaker switches to disable a motor when pushed.

The buttons we push should activate the motor but when we push the limit switch the motor should not move in one direction.

The Breaker switch is wired to the DIO of the Crio.

Not 100% sure what you are asking...

EDIT: How do i get part of the code into a USB/flash drive?
EDIT: Nevermind, google helped me this time.
EDIT: Ya, uploaded them.
Attached Thumbnails
Click image for larger version

Name:	begin.png
Views:	13
Size:	22.0 KB
ID:	13816  Click image for larger version

Name:	finishbig.png
Views:	13
Size:	95.3 KB
ID:	13817  Click image for larger version

Name:	finishsmall.png
Views:	12
Size:	41.0 KB
ID:	13818  Click image for larger version

Name:	teliop.png
Views:	13
Size:	69.6 KB
ID:	13819  

Last edited by sthreet : 05-02-2013 at 18:55.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2013, 20:43
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,756
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: Breaker Switches and Buttons to Motors

In the attached code, it would not update the motor unless the digital switch was open. I think what you really intended was update it all the time, but to the correct value based on switch and joystick. The attached code requires for the switch to be FALSE and the joystick to be TRUE. It is missing the Get Refs and such but has the logic basics in place.

Also, the little broom icon at the top of the LV diagram is the cleanup button. If your diagram has overlapping nodes and wires going in many directions, you may want to try the button. You can always undo if you don't like it.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Clipboard 1.png
Views:	18
Size:	26.1 KB
ID:	13823  
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2013, 22:26
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Breaker Switches and Buttons to Motors

I'm not sure I understand what you said but i'll try the symbols I haven't seen anywhere but labview and see if it works, thanks I guess.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2013, 07:45
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,756
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: Breaker Switches and Buttons to Motors

If you can't find them, please ask. Hint, if they take in two Boolean wires and return a Boolean, they are typically logic such as AND or OR. Engineers often use these symbols instead of the words.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 07-02-2013, 15:59
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Breaker Switches and Buttons to Motors

I like || and &&...

EDIT: Can't find the ?tf thingy...

EDIT: Any example of one-button controlled air cylinder?

Last edited by sthreet : 07-02-2013 at 16:37.
Reply With Quote
  #6   Spotlight this post!  
Unread 07-02-2013, 16:46
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: Breaker Switches and Buttons to Motors

Quote:
Originally Posted by sthreet View Post
EDIT: Can't find the ?tf thingy...
I think you're looking for the Select function. It's in the Boolean palette, with the rest of the Boolean functions.

[edit]Actually, as you found, it's in the Comparison palette. My mistake.[/edit]

Last edited by Alan Anderson : 08-02-2013 at 15:59.
Reply With Quote
  #7   Spotlight this post!  
Unread 08-02-2013, 15:52
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Breaker Switches and Buttons to Motors

Quote:
Originally Posted by Alan Anderson View Post
I think you're looking for the Select function. It's in the Boolean palette, with the rest of the Boolean functions.
I don't know why I didn't find it before but its under the comparison section palette...

EDIT: How to get blue '1'?
EDIT: Found blue '1'...

EDIT: Code doesn't work to run the motor with breaker switches but when i start it up unless i look at the empty error list it says something is null...

Last edited by sthreet : 08-02-2013 at 18:15.
Reply With Quote
  #8   Spotlight this post!  
Unread 11-02-2013, 10:43
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Breaker Switches and Buttons to Motors

Quote:
Originally Posted by sthreet View Post
Code doesn't work to run the motor with breaker switches but when i start it up unless i look at the empty error list it says something is null...
Common reasons for things being null? Do i need to copy the exact error? (Will at lunch today... if no reply by then)
EDIT: Error not showing up anymore, but code still doesn't work....

Last edited by sthreet : 11-02-2013 at 16:28.
Reply With Quote
  #9   Spotlight this post!  
Unread 11-02-2013, 22:49
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Breaker Switches and Buttons to Motors

Ok, I can't figure out how to get servos to work, copied and pasted the code from the example (was running out of options...), used a basic set angle, set position... Nothing...

Also the attached code isn't working as intended (trying to get motor run when breaker switches aren't pushed) and the motor never runs unless i switch around the blue one and the orange zero... When I do that it always runs...
Attached Thumbnails
Click image for larger version

Name:	doen't work....png
Views:	10
Size:	31.1 KB
ID:	13949  
Reply With Quote
  #10   Spotlight this post!  
Unread 11-02-2013, 23:08
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,926
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Breaker Switches and Buttons to Motors

Servos require a jumper on the Digital Sidecar, beside the PWM that the servo is attached to.
That jumper feeds the servo it's power.

Your posted code is setting the same motor (Motorsingle 1) in two different places at the same time.
That's never good.
You need to combine or choose between the competing Buttons and decide on an order of who goes first.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 11-02-2013 at 23:22.
Reply With Quote
  #11   Spotlight this post!  
Unread 12-02-2013, 10:05
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: Breaker Switches and Buttons to Motors

I'm still not sure what a "breaker switch" is in your description. I would normally understand it as the robot's main power switch, but that's obviously not what you're talking about. You mentioned limit switches once, so I'll assume that's what you mean.

Mark has already pointed out that you can't have two separate Motor Set functions next to each other and expect things to work, so I'll let that go for now.

With the logic in your code, the "break" input will prevent the button press from being recognized when it is True. That means you have to have a switch closed from SIG to (-) on the DIO pins in order for the button to make the motor run. How are your switches wired? There are typically three terminals on a limit switch; which terminal are you connecting to each pin on the Digital Sidecar?
Reply With Quote
  #12   Spotlight this post!  
Unread 12-02-2013, 10:10
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Breaker Switches and Buttons to Motors

To guy from other page: Ok, i'll try to figure out how to do that, i would use another and maybe?
Quote:
Originally Posted by Alan Anderson View Post
I'm still not sure what a "breaker switch" is in your description. I would normally understand it as the robot's main power switch, but that's obviously not what you're talking about. You mentioned limit switches once, so I'll assume that's what you mean.
Sorry about that, limit switches, don't know why i got that they are breaker switches...
Quote:
Originally Posted by Alan Anderson View Post
Mark has already pointed out that you can't have two separate Motor Set functions next to each other and expect things to work, so I'll let that go for now.
Ok, will try something at lunch today.
Quote:
Originally Posted by Alan Anderson View Post
With the logic in your code, the "break" input will prevent the button press from being recognized when it is True. That means you have to have a switch closed from SIG to (-) on the DIO pins in order for the button to make the motor run. How are your switches wired? There are typically three terminals on a limit switch; which terminal are you connecting to each pin on the Digital Sidecar?
I just remember two but i will check... Thought i posed somewhere else earlier...

EDIT:
Quote:
Originally Posted by sthreet View Post
Wired into the Digital I/O into signal and negative.
Will check again though... Not sure what you mean by three terminals... But should I get rid of the not also?

Last edited by sthreet : 12-02-2013 at 10:12.
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 05:01.

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