![]() |
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. |
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. |
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:
Quote:
|
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:
|
Re: Servos, cameras, and inverting limit switches
Quote:
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. |
Re: Servos, cameras, and inverting limit switches
Quote:
|
Re: Servos, cameras, and inverting limit switches
1 Attachment(s)
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? |
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. |
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.
|
Re: Servos, cameras, and inverting limit switches
Quote:
I can see the network, but attempting to connect to it doesn't work. |
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. |
Re: Servos, cameras, and inverting limit switches
Quote:
|
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. ![]() |
Re: Servos, cameras, and inverting limit switches
Quote:
|
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 |
Re: Servos, cameras, and inverting limit switches
Quote:
I can't connect to the network except in the driver station, if that matters. Also I'm having another problem similar to the true/false one, I'm changing the speed of a motor and it doesn't change how fast the motor actually moves. How does changing the speed of a motor work in the programming? |
Re: Servos, cameras, and inverting limit switches
Use a web browser and type 10.46.92.1
That browses to the DLink. The login is admin and the password is blank. Find "Setup" then "wireless" and look at the settings for wireless. |
Re: Servos, cameras, and inverting limit switches
http://www.usfirst.org/sites/default...trolSystem.pdf
The directions are on page 23, though I was wrong, they don't tell you to log in. They tell you to use the config utility. Greg McKaskle |
Re: Servos, cameras, and inverting limit switches
Ok, I figured out how to get to the Dlink. However Security settings are "none", does wireless type matter? Wireless is set to always.
Also out of curiosity if you are connected to a router how do you find the IP? I know what it is for this, but for general purpose. |
Re: Servos, cameras, and inverting limit switches
To see the devices connected to your laptop, open a Windows command window (go to Start and type "cmd" into the search at the bottom) and type:
arp -avThe wireless AP will show up connected to your PC's wireless adaptor. Wireless settings should be:
|
Re: Servos, cameras, and inverting limit switches
Quote:
|
Re: Servos, cameras, and inverting limit switches
1 Attachment(s)
This is what the menu should look like, unless you have one of the Rev A Bridge/APs instead of the current Rev B.
Note that "dlink" for the SSID would be your team number if you used the Utility. The FRC Bridge Configuration Utility would have made all the correct settings. |
Re: Servos, cameras, and inverting limit switches
Quote:
|
| All times are GMT -5. The time now is 20:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi