|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Servos, cameras, and inverting limit switches
Hello people. Currently our robotics team is working on updating our robot, just to finish what we started last year. I have ran into a few problems that I haven't been able to figure out and any help would be good.
Servos. I can't get them to move, I've tried to set the position and angle to getPosition/Angle and add a decimal or whole number to it. (1 or below.) I've looked at the labVIEW example for servos and tried using buttons to set the angle to a solid number, but haven't been able to figure out. This is all in teliop as I haven't moved all the code to periodic tasks for last years program. (I will probably do that for this year.) Camera. Do I have to add anything to the code? We've tried the configuration software, reset it, used it again, used ethernet cable to connect the camera to the bridge, and made sure it has power. I remember not having to add anything, but i'm not 100% sure. Inverting limit switches. I've tried moving the code from the true case in the case selector I use to the false area and the false code to the true area. I've also tried running the boolean through a not gate before sticking it into the case selector. I tried these at two different times. Both times it worked exactly the same as before. The objective is to use limit switches (already been shrink wrapped) to allow a motor to move in a certain direction only if the limit switch is pressed. We already have it working the other way, but cannot get it to work this way. Thanks for any help and time. |
|
#2
|
|||||
|
|||||
|
Re: Servos, cameras, and inverting limit switches
Servos require a power jumper on the bare pins beside the PWM output the servo uses. This jumper routes power out the PWM, otherwise the servo gets a PWM signal, but no power for it's motor.
The default Dashboard is equipped to handle a camera connected directly to the robot bridge. The camera must be setup using the Axis Camera Utility, and the Dashboard needs the Enable button pushed. Limit Switch direction depends on how it's been wired as well as the code. |
|
#3
|
||||
|
||||
|
Re: Servos, cameras, and inverting limit switches
Sorry about the slow reply.
Quote:
EDIT: My mentor/teacher thinks you are supposed to put all the pins in pwm output section. Is their a way around this that is resonable? Quote:
I know that. they shrink-wrapped the limit switches though, so I figured it would be easier to change the code. however, reversing the code has no change and I'm not sure why. Should I include my code here? Last edited by sthreet : 28-10-2013 at 16:33. |
|
#4
|
|||||
|
|||||
|
Re: Servos, cameras, and inverting limit switches
Quote:
It sounds like you used the right setup procedure. There is a bandwidth limit set by the bridge (Ethernet thing) that will block the camera image. Using the Dashboard controls try lowering the camera resolution and frames per second. That will reduce the bandwidth demand to test if bandwidth might be the problem. Quote:
|
|
#5
|
|||||
|
|||||
|
Re: Servos, cameras, and inverting limit switches
Yes, at least the part you're trying to make work. It would also help to have detailed information on the wiring of your switch, and a brief description of what you want to happen when the switch is pressed vs. not pressed.
Do you know how to use VI snippets? If you don't want to post your full project, select the code you want to share with us and choose "Create VI Snippet from Selection" from the Edit menu. It'll prompt you to save the snippet as a .png file that you can then attach here. Everyone will be able to see it as a picture, and it will become live LabVIEW code when it's dragged into a LabVIEW block diagram. |
|
#6
|
||||||
|
||||||
|
Re: Servos, cameras, and inverting limit switches
The jumper is only required for the PWM channel that drives the servo. It is not required for any other PWM channel.
|
|
#7
|
||||
|
||||
|
Re: Servos, cameras, and inverting limit switches
Heres the code.
I reversed the code for the motors to move in one direction. ("UP") However, their is no difference either direction. On the unshown case all numbers are 0. Both limit switches/motors interact exactly the same. the different numbers for one of the motors is because one of the motors moves faster. I will try lowering camera quality/size. EDIT: Tried camera, didn't work at all. Also tried unplugging it and didn't notice any change. (thought little green dot next to it might change.) Does wireless affect it? For some reason wireless won't connect so I put an ethernet cable in the bridge. EDIT: I didn't understand what you meant about the servos, but when I said "jumpers" my teacher/mentor understood and we got them working now. Not sure why wireless isn't working, changing the f-key that is supposed to toggle wireless doesn't do it, I think wireless might be turned off. How do you turn it on/off on the tiny slow laptop thingy? Last edited by sthreet : 30-10-2013 at 14:45. |
|
#8
|
||||
|
||||
|
Re: Servos, cameras, and inverting limit switches
This is probably the wrong section, but it may be a labview issue.
I get this code when I try to connect to the robot. This is in diagnostics of driver panel. Warning <code> 44001 at modified network configuration Set the object already exists IP is supposed to be 10.xx.yy.z where xxyy is your team number and z is any number within limits, right? (forgot limits for z but 5 and 9 would work, right?) Connecting a cable to the bridge has stopped working as well. |
|
#9
|
|||||
|
|||||
|
Re: Servos, cameras, and inverting limit switches
44001 isn't an error, it's just an informational message.
It's telling you the other devices that it is able to connect to. 10.xx.yy.5 should be your Driver Station PC's Ethernet adapter. 10.xx.yy.9 should be your Driver Station PC's wireless adapter. These can be set automatically when the Driver station is started.
Your wireless connection problem can be due to several things, in addition to an incorrect IP address/netmask.
Last edited by Mark McLeod : 05-11-2013 at 19:33. |
|
#10
|
||||
|
||||
|
Re: Servos, cameras, and inverting limit switches
Quote:
I can see the network, but attempting to connect to it doesn't work. |
|
#11
|
|||||
|
|||||
|
Re: Servos, cameras, and inverting limit switches
It won't mess up the bridge for future competition use, so don't worry about that.
The Bridge Configuration tool actually gets run at each competition before you can connect to the playing field. It gives each team a unique security code. That security code left over from your last competition is why you can see the wireless network, but it won't let you connect. Your PC doesn't know the security code. One other thing to check is that the robot bridge is switched to one of the AP modes. |
|
#12
|
||||
|
||||
|
Re: Servos, cameras, and inverting limit switches
How do I check that? I got it working through ethernet with the configuration, but it doesn't work with wireless.
|
|
#13
|
|||||
|
|||||
|
Re: Servos, cameras, and inverting limit switches
There is a manual switch on the back of the robot's DLink bridge.
Depending on the model you are using, the switch will be marked differently. The Rev A switch will be marked "Bridge", "Auto", "AP" The Rev B switch will be marked "Bridge", AP 2.4GHz", "AP 5GHz" You want either "AP" or "AP 2.4GHz" Don't choose "AP 5GHz" unless you know that you're using a laptop that's 5GHz capable. The FIRST issued Classmates only support 2.4GHz. ![]() |
|
#14
|
||||
|
||||
|
Re: Servos, cameras, and inverting limit switches
Got that right. What else could be causing a problem with wireless but not ethernet?
|
|
#15
|
|||
|
|||
|
Re: Servos, cameras, and inverting limit switches
What I'd do next is connect an ethernet cable between PC and DLink. Open the web page on the DLink -- the FIRST directions tell you how to do this if you are having problems.
Then check what SSID the DLink will use. Team number is what is suggested I believe. Check the security settings and perhaps turn them off if they may be the issue. On that laptop or on another wireless enabled laptop verify that you can see a wifi network with that SSID name and attempt to Connect to it. For the laptops used in FIRST, you may want to set them to auto-connect to it. If you get this working, the programming tools and DS will likely work. If not, then it is an IP issue. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|