|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||||
|
|||||
|
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? I don't understand the question. Please try not to use the word "thing" without additional explanation. |
|
#17
|
||||
|
||||
|
Re: Breaker Switches and Buttons to Motors
Quote:
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) |
|
#18
|
|||||
|
|||||
|
Re: Breaker Switches and Buttons to Motors
Quote:
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:
|
|
#19
|
||||
|
||||
|
Re: Breaker Switches and Buttons to Motors
Wired into the Digital I/O into signal and negative.
|
|
#20
|
|||||
|
|||||
|
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. |
|
#21
|
||||
|
||||
|
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. Last edited by sthreet : 05-02-2013 at 18:55. |
|
#22
|
|||
|
|||
|
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 |
|
#23
|
||||
|
||||
|
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.
|
|
#24
|
|||
|
|||
|
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 |
|
#25
|
||||
|
||||
|
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. |
|
#26
|
|||||
|
|||||
|
Re: Breaker Switches and Buttons to Motors
I think you're looking for the Select function.
[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. |
|
#27
|
||||
|
||||
|
Re: Breaker Switches and Buttons to Motors
Quote:
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. |
|
#28
|
||||
|
||||
|
Re: Breaker Switches and Buttons to Motors
Quote:
EDIT: Error not showing up anymore, but code still doesn't work.... Last edited by sthreet : 11-02-2013 at 16:28. |
|
#29
|
||||
|
||||
|
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... |
|
#30
|
|||||
|
|||||
|
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. Last edited by Mark McLeod : 11-02-2013 at 23:22. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|