Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Breaker Switches and Buttons to Motors (http://www.chiefdelphi.com/forums/showthread.php?t=112357)

Alan Anderson 04-02-2013 22:00

Re: Breaker Switches and Buttons to Motors
 
I am unable to follow your code from the pictures. The wires are going in strange directions, are occasionally obscured by other things in the block diagram, and some go completely off the screen. There's only a partial view of what's in the Case blocks. You'll have to attach the actual VIs before I can try to figure out what they're doing. Even knowing what they're doing isn't going to help much if I don't know what you want them to do instead. Can you give a simple explanation of what you're trying to accomplish?

And I'll repeat my earlier question: What do you have wired to the DIO pins? Specifically, what are the "Break1" and "Break2" inputs reading?

Quote:

Originally Posted by sthreet (Post 1227420)
...where do I find the things for the logitech gamepad F310?

I don't understand the question. Please try not to use the word "thing" without additional explanation.

sthreet 05-02-2013 01:45

Re: Breaker Switches and Buttons to Motors
 
Quote:

Originally Posted by Alan Anderson (Post 1227653)
I am unable to follow your code from the pictures. The wires are going in strange directions, are occasionally obscured by other things in the block diagram, and some go completely off the screen. There's only a partial view of what's in the Case blocks. You'll have to attach the actual VIs before I can try to figure out what they're doing. Even knowing what they're doing isn't going to help much if I don't know what you want them to do instead. Can you give a simple explanation of what you're trying to accomplish?

And I'll repeat my earlier question: What do you have wired to the DIO pins? Specifically, what are the "Break1" and "Break2" inputs reading?



I don't understand the question. Please try not to use the word "thing" without additional explanation.

Hmm... i'll try a USB drive, we were having problems with internet on that computer for some reason i'm not sure of...

Hmm... now that i understand what you mean by DIO pins better i can check that; so pins are the little box thingies?

The open and close and get for the controller... The VI's... (sorry for use of pronouns)

Alan Anderson 05-02-2013 07:54

Re: Breaker Switches and Buttons to Motors
 
Quote:

Originally Posted by sthreet (Post 1227810)
Hmm... now that i understand what you mean by DIO pins better i can check that; so pins are the little box thingies?

No. Pins are metal pointy things that you physically attach wires to in order to bring signals and power to electrical components. The DIO pins are a long block of pointy metal bits sticking up near one edge of the Digital Sidecar. They come in sets of three, with +5 volts on the center pin, power return (-) on one of the side pins, and a signal (SIG) on the other side pin.

Your code is reading two of them. What is physically connected to those DIO pins on the Digital Sidecar? What are they supposed to make the robot do?

Quote:

The open and close and get for the controller... The VI's... (sorry for use of pronouns)
Gamepads are HID inputs. They are treated just like joysticks by the Driver Station. Use the same VIs that you'd use for a joystick.

sthreet 05-02-2013 16:15

Re: Breaker Switches and Buttons to Motors
 
Wired into the Digital I/O into signal and negative.

Alan Anderson 05-02-2013 16:33

Re: Breaker Switches and Buttons to Motors
 
I'm not able to give useful advice based on half an answer. May I have enough information to understand your goals, please?

What device do you have connected to the DIO pins?

What do you want that device to do? What do you want the robot to do based on that device?



Pretend everything is working the way you want it to and describe in detail what I would see if I were watching it.

sthreet 05-02-2013 18:23

Re: Breaker Switches and Buttons to Motors
 
4 Attachment(s)
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.

Greg McKaskle 05-02-2013 20:43

Re: Breaker Switches and Buttons to Motors
 
1 Attachment(s)
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

sthreet 05-02-2013 22:26

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.

Greg McKaskle 06-02-2013 07:45

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

sthreet 07-02-2013 15:59

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?

Alan Anderson 07-02-2013 16:46

Re: Breaker Switches and Buttons to Motors
 
Quote:

Originally Posted by sthreet (Post 1229478)
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]

sthreet 08-02-2013 15:52

Re: Breaker Switches and Buttons to Motors
 
Quote:

Originally Posted by Alan Anderson (Post 1229511)
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...

sthreet 11-02-2013 10:43

Re: Breaker Switches and Buttons to Motors
 
Quote:

Originally Posted by sthreet (Post 1230034)
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....

sthreet 11-02-2013 22:49

Re: Breaker Switches and Buttons to Motors
 
1 Attachment(s)
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...

Mark McLeod 11-02-2013 23:08

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.


All times are GMT -5. The time now is 01:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi