Go to Post Look guys, I am telling you for the fourth time - you are NEVER going to earn your official "Geek" certificates if you keep spelling "pwned" with an "O" in it! - 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 03-02-2013, 07:40
d4v4 d4v4 is offline
Registered User
FRC #3368
 
Join Date: Jan 2013
Location: Mostar
Posts: 3
d4v4 is an unknown quantity at this point
Relay and window motor

First of all, hello everyone and thank you for reading this

So I am learning LabView on myself for FRC and I got stuck.

I need to make a window motor connected on relay ( Spike ) and then when button 4 is pressed it rotates forward for some time ( for example 1 sec after that he must stop ) and then when button 2 is pressed it goes reverse ( because I need to lift a ramp for discs 4 times and then take it down for new load ) .

Also when I try to open new relay ( relay 2 ) LabView does not enable me to do it ( wire does not connect to Relay open ) , but I really need to use like 3 or 4 relays for my future work with motors...
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2013, 11:51
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,713
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: Relay and window motor

Here is a sample multi-button sequence that goes in Periodic Tasks.vi (NOT Teleop.vi, because of the delays).
The sequences for each button are independent although Button 1 goes first if both buttons are pressed simultaneously.

However, the possibility of the wrong button being pushed must be handled.
What happens if button 1 is pushed twice in a row?
You can add a check that only allows the proper button to be pushed. That's called a state machine.
That might also be handled by adding a limit switch at the bottom as feedback for when it's all the way down, and maybe another to prevent it from going too far up. A limit switch check would then simply replace the timer at the beginning of each of the sequences.

For Opening Relays, if you can get one Open successfully coded, then you can highlight all of it , then copy/paste to get the next one.
Then use the cursor to select a different Relay number.
Attached Thumbnails
Click image for larger version

Name:	Multi-button-sequences.png
Views:	121
Size:	52.5 KB
ID:	13775  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 03-02-2013 at 21:37.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2013, 06:12
d4v4 d4v4 is offline
Registered User
FRC #3368
 
Join Date: Jan 2013
Location: Mostar
Posts: 3
d4v4 is an unknown quantity at this point
Re: Relay and window motor

Quote:
Originally Posted by Mark McLeod View Post
For Opening Relays, if you can get one Open successfully coded, then you can highlight all of it , then copy/paste to get the next one.
Then use the cursor to select a different Relay number.
I really appreciate your help and the way you develop my idea

But I constantly get broken wires when I try to make Forward/Reverse or change relays name as you can see on screenshots :/
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	39
Size:	11.2 KB
ID:	13837  Click image for larger version

Name:	2.jpg
Views:	41
Size:	19.6 KB
ID:	13838  
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2013, 08:35
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,112
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: Relay and window motor

Quote:
Originally Posted by d4v4 View Post
But I constantly get broken wires when I try to make Forward/Reverse or change relays name as you can see on screenshots :/
Even the one with the unbroken wire is telling you something is wrong. That red dot on the function input says there's a mismatch between the type of value you're giving it and what it expects.

To fix them, delete the enum constant (the name in the blue rectangle with the various little triangles around it) and the broken wires. Then right-click on the terminal you want to connect it to and choose Create >> Constant from the menu. Now you can change the constant to whatever value is appropriate for the code.
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 08:56.

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