Go to Post Andy Baker doesn't go to IRI. IRI comes to Andy Baker. - tim_reiher [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-12-2008, 22:46
CrazyCarl461's Avatar
CrazyCarl461 CrazyCarl461 is offline
Power User
AKA: Carl Agnew
FRC #0461 (Westside Boiler Invasion)
Team Role: Coach
 
Join Date: May 2003
Rookie Year: 2001
Location: West Lafayette, IN
Posts: 189
CrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant future
Send a message via AIM to CrazyCarl461
Axis camera without the cRIO

Does anyone know if it is possible to access the Axis camera inside LabVIEW VIs while the camera is plugged directly into the computer instead of going through the cRIO? When I use the Axis camera VIs in the WPI Library and wire all of the parts (Open, Start, IMAQ Create, Get Image, Stop, Close) to an image display on the front panel, I get a bunch of error dialogs come up. The funny thing is the image display does update successfully, so I know it is at least theoretically possible. The errors look something like this:

Code:
Error 1 occurred at Release Notifier in Camera.lvlib:Acquire Image.vi:3

Possible reason(s):

LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
I am developing code in the Vision Assistant and want to create VIs as per the Image Processing tutorial to test them (as the Vision Assistant does not allow continuously-updating images from the camera). The NI/WPI folks may have disabled direct access to the camera to keep people from abusing their FRC LabVIEW licenses, but I think it would be really useful to test vision code without a cRIO around. Anyone been able to do this?
__________________
My 2011 Build Season Blog
Resistance may be futile, but capacitance has potential!
© All content is protected by the honor system
Reply With Quote
  #2   Spotlight this post!  
Unread 19-12-2008, 22:55
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: Axis camera without the cRIO

Is this what you are looking for? As long as you don't use FPGA dependent VI's, you can run your code. Just be sure to put it under the 'My Computer' target.
Attached Files
File Type: vi QuickCam.vi (48.5 KB, 152 views)
__________________
Jon Mittelman

Senior Judge Advisor New England & Israel 2014-2015
Infinite Loop Mentor 2011-2015
TechnoTicks Mentor 2000-2011
Championship Chairman's Award 2009 Team236 TechnoTicks
Judge 2010-2015 Championships
Senior Judge Advisor New England District Championship 2014-2015
Judge Advisor Tel Aviv Regional 2007-2015
Judge Advisor Pine Tree Regional 2013
Maine Regional Planning Committee
New England District Planning Committee
Lead Inspector Microsoft Tel Aviv Regional 2006-2008
Judge & Lead Inspector GM/Technion Tel Aviv Regional 2006
Judge UTC Hartford Regional 2006
Reply With Quote
  #3   Spotlight this post!  
Unread 19-12-2008, 23:22
CrazyCarl461's Avatar
CrazyCarl461 CrazyCarl461 is offline
Power User
AKA: Carl Agnew
FRC #0461 (Westside Boiler Invasion)
Team Role: Coach
 
Join Date: May 2003
Rookie Year: 2001
Location: West Lafayette, IN
Posts: 189
CrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant future
Send a message via AIM to CrazyCarl461
Re: Axis camera without the cRIO

It must be a problem with my WPI Libraries or configuration because I get the same errors with that VI too. Stuff like:

Code:
Error 66 occurred at TCP Wait On Listener in TCP Listen.vi:6->Camera.lvlib:Send Images To PC.vi:5

LabVIEW:  The network connection was closed by the peer. If you are using the Open VI Reference function on a remote VI Server connection, verify that the machine is allowed access by selecting Tools>>Options>>VI Server:Machine Access on the server side.
However, I did notice (because that VI has a continuous loop) that the errors only come up while the camera is being started. After I close out the initial errors, the image display continues to update fine until I stop the VI.

Hopefully I can find the source of these errors. They may be due to a slow connection to the camera. Thanks for the VI, Jon!
__________________
My 2011 Build Season Blog
Resistance may be futile, but capacitance has potential!
© All content is protected by the honor system
Reply With Quote
  #4   Spotlight this post!  
Unread 20-12-2008, 01:42
koo_04 koo_04 is offline
Registered User
FRC #2493
 
Join Date: Dec 2008
Location: California
Posts: 47
koo_04 will become famous soon enough
Re: Axis camera without the cRIO

Hello,
I was trying to use the VI to test the camera, but when ever I try to run it. I get a bunch of errors.

Error 60 occurred at TCP Create Listener in Internecine Avoider.vi->TCP Listen.vi:2->Camera.lvlib:Send Images To PC.vi:1

And more.
I dont know if its because I am running on vista? But I would lik esome help. Thanks!
Reply With Quote
  #5   Spotlight this post!  
Unread 20-12-2008, 07:56
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Axis camera without the cRIO

Nothing was disabled, but the WPI libraries are specifically built to work on the cRIO and allow stuff to be sent back to the dashboard. I think the errors you are seeing are just the Back to Dashboard stuff being confused.

If you set your computer up to be on a 102.168.0.x subnet, with x something other than 90 because that is the camera, and you have an account on the camera, I believe the VIs will work. I may look at modifications so that they don't produce errors.

If you want to modify them, you can temporarily disable launching the Back to PC stuff. Let me know and I'll help.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 20-12-2008, 09:44
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,749
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
Re: Axis camera without the cRIO

Quote:
If you set your computer up to be on a 102.168.0.x subnet, with x something other than 90 because that is the camera, and you have an account on the camera, I believe the VIs will work. I may look at modifications so that they don't produce errors.
I think you meant to set the IP address to 192.168.0.x, right?
Reply With Quote
  #7   Spotlight this post!  
Unread 20-12-2008, 10:23
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Axis camera without the cRIO

Yep, 192. Oh I miss DHCP.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 20-12-2008, 13:41
CrazyCarl461's Avatar
CrazyCarl461 CrazyCarl461 is offline
Power User
AKA: Carl Agnew
FRC #0461 (Westside Boiler Invasion)
Team Role: Coach
 
Join Date: May 2003
Rookie Year: 2001
Location: West Lafayette, IN
Posts: 189
CrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant futureCrazyCarl461 has a brilliant future
Send a message via AIM to CrazyCarl461
Re: Axis camera without the cRIO

Quote:
Originally Posted by Greg McKaskle View Post
If you set your computer up to be on a 192.168.0.x subnet, with x something other than 90 because that is the camera, and you have an account on the camera, I believe the VIs will work.
The camera does work on DHCP but explicitly specifying the computer's IP address and subnet does seem to get rid of all the TCP errors like you say. This leaves only the Error 1 occurred at Release Notifier in Camera.lvlib:Acquire Image.vi message about an invalid input parameter.

This topic does seem to be double-threaded now, but maybe it means we'll resolve it twice as fast!
__________________
My 2011 Build Season Blog
Resistance may be futile, but capacitance has potential!
© All content is protected by the honor system
Reply With Quote
  #9   Spotlight this post!  
Unread 22-12-2008, 11:23
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: Axis camera without the cRIO

Here's another example. By taking the ServoCamera example in the FRC distribution, I simply got rid of the servo control loop (good reason to have it separate from the camera loop) and retained the reference to the servos by changing a control to an indicator. I also try to translate the gyro output into motor control inputs.
Attached Files
File Type: vi LaptopServo Camera.vi (83.4 KB, 95 views)
__________________
Jon Mittelman

Senior Judge Advisor New England & Israel 2014-2015
Infinite Loop Mentor 2011-2015
TechnoTicks Mentor 2000-2011
Championship Chairman's Award 2009 Team236 TechnoTicks
Judge 2010-2015 Championships
Senior Judge Advisor New England District Championship 2014-2015
Judge Advisor Tel Aviv Regional 2007-2015
Judge Advisor Pine Tree Regional 2013
Maine Regional Planning Committee
New England District Planning Committee
Lead Inspector Microsoft Tel Aviv Regional 2006-2008
Judge & Lead Inspector GM/Technion Tel Aviv Regional 2006
Judge UTC Hartford Regional 2006
Reply With Quote
  #10   Spotlight this post!  
Unread 22-12-2008, 20:59
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Axis camera without the cRIO

Looking into this a bit further, you will likely see an error on startup and another on shutdown. These errors are running through code that is ensuring that a reference isn't left open, and is in turn producing an error that it wasn't ignoring on the desktop version.

These errors will disappear with the next update.

Another point I'll make regarding the PC vision. You should keep in mind that algorithms and tests developed on the PC may cause you to be far too ambitious. In general, I find that a PC is eight to ten times faster than the cRIO at vision processing. This is expected when looking at clock rates and computer architecture, but this is good to keep in mind when writing code destined for a different platform.

Greg McKaskle
Reply With Quote
  #11   Spotlight this post!  
Unread 22-12-2008, 21:05
Jon236's Avatar
Jon236 Jon236 is offline
Registered User
AKA: Jon Mittelman
FRC #2648 (Infinite Loop)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Windsor, Maine
Posts: 741
Jon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond reputeJon236 has a reputation beyond repute
Re: Axis camera without the cRIO

Quote:
Originally Posted by Greg McKaskle View Post

Another point I'll make regarding the PC vision. You should keep in mind that algorithms and tests developed on the PC may cause you to be far too ambitious. In general, I find that a PC is eight to ten times faster than the cRIO at vision processing. This is expected when looking at clock rates and computer architecture, but this is good to keep in mind when writing code destined for a different platform.

Greg McKaskle
Greg. would you suggest adding a wait until timing vi then? what sort of delay for each loop, 100 ms?
__________________
Jon Mittelman

Senior Judge Advisor New England & Israel 2014-2015
Infinite Loop Mentor 2011-2015
TechnoTicks Mentor 2000-2011
Championship Chairman's Award 2009 Team236 TechnoTicks
Judge 2010-2015 Championships
Senior Judge Advisor New England District Championship 2014-2015
Judge Advisor Tel Aviv Regional 2007-2015
Judge Advisor Pine Tree Regional 2013
Maine Regional Planning Committee
New England District Planning Committee
Lead Inspector Microsoft Tel Aviv Regional 2006-2008
Judge & Lead Inspector GM/Technion Tel Aviv Regional 2006
Judge UTC Hartford Regional 2006
Reply With Quote
  #12   Spotlight this post!  
Unread 22-12-2008, 21:29
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Axis camera without the cRIO

Quote:
Originally Posted by Jon236 View Post
Greg. would you suggest adding a wait until timing vi then? what sort of delay for each loop, 100 ms?
What I've done is simply to time the processing and apply a multiple. Note that the camera frame rate is controlled by the camera settings and lighting, and not by the processor speed of the cRIO.

Greg McKaskle
Reply With Quote
  #13   Spotlight this post!  
Unread 17-01-2009, 10:53
EMill09's Avatar
EMill09 EMill09 is offline
Argos Software Member
AKA: Essence
FRC #1756 (Argos)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Illinois
Posts: 9
EMill09 is an unknown quantity at this point
Re: Axis camera without the cRIO

I am having the exact opposite problem with the Axis and the Dashboard
The camera images will not show up on dashbaord when hooked up to the cRio I get this error:

TCP Close Connection in Camera.lvlib:Get Image From Controller.vi->Dashboard Main.vi
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
axis camera - problem s0crates FRC Control System 11 16-12-2008 09:34
24v Power Conector to from the PDB to the cRIO mcf747 Electrical 14 01-12-2008 19:19
Camera without servos kiettyyyy Programming 17 10-04-2006 21:45
Trying to import Camera code into program without. Kingofl337 Programming 1 18-02-2005 00:43
Reversing the joystick axis JBotAlan Programming 3 09-02-2005 19:47


All times are GMT -5. The time now is 05:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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