Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   cRIO unable to connect to camera (http://www.chiefdelphi.com/forums/showthread.php?t=100005)

TofuRama 13-01-2012 00:31

cRIO unable to connect to camera
 
My team is using C++ and we're trying to get our cRIO to communicate with our camera. We have the Axis 206 and an 8-slot cRIO. We have used the axis camera setup tool to set the camera up for going into the second port. We are using a crossover cable and we have been able to get video feed from our computer through a direct connection. Below is our code:

Quote:

AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCameraParams::kResoluti on_640x480);
camera.WriteBrightness(0);
camera.WriteCompression(20);
We have also tried passing in the camera's ip address to GetInstance(). Whenever we run our code we get the following error message in the driver station:

Quote:

ERROR: S_errno_ECONNREFUSED (0x0000003D): Failed to connect to the camera ...in CreateCameraSocket() in C:/WindRiver/workspace/WPILib/Vision/AxisCameraParams.cpp at line 457
Right now we don't know what we're doing wrong and we really need help. Thanks in advance!

Alan Anderson 13-01-2012 23:11

Re: cRIO unable to connect to camera
 
Quote:

Originally Posted by TofuRama (Post 1104165)
We have also tried passing in the camera's ip address to GetInstance().

What IP address is the camera using? If you want the cRIO to talk to it, the address should be 10.24.84.11.

scottbot95 14-01-2012 01:18

Re: cRIO unable to connect to camera
 
Quote:

Originally Posted by Alan Anderson (Post 1104982)
What IP address is the camera using? If you want the cRIO to talk to it, the address should be 10.24.84.11.

That's only true if It's plugged into the bridge, isn't it? I thought that if you had the Camera plugged straight into the second port on the 8-module models that the IP should be 192.168.0.90.

BradAMiller 14-01-2012 07:01

The default IP address for the camera has changed this year from the 192 address using the 2nd Ethernet port to .11 on the team subnet with the camera plugged into the switch. This is because we'd like to encourage all teams to do it consistently so it's easier to help in cases like this and the cRIO II doesn't have a second port.

So try setting the cameras IP address to 10.x.y.11 (x and y are your team number) and plugging it into the switch. Or if you want to leave it in the second port, call AxisCamera::GetInstance with a string parameter of the IP address.

Brad


All times are GMT -5. The time now is 17:42.

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