Quote:
Originally Posted by byteit101
|
I'm not sure how someone using LV would do it, but I found some code in I think the DefaultCamera example for WR that had functions to adjust camera settings and to take snapshots.
Here is just the snapshot function, not entirely sure what includes it needs however.
Code:
/**
* Store an image on the cRIO
* @param imageName stored on home directory of cRIO ( "/" )
**/
void snapshot(char* imageName)
{
/* this will take one picture and save it to a file
*/
DPRINTF(LOG_DEBUG, "taking a SNAPSHOT ");
Image* cameraImage = frcCreateImage(IMAQ_IMAGE_HSL);
if (!cameraImage) {
dprintf (LOG_INFO,"frcCreateImage failed - errorcode %i",GetLastVisionError());
}
Wait(1.0);
if ( !GetImage (cameraImage,NULL) ) {
dprintf (LOG_INFO,"\nCamera Acquisition failed %i", GetLastVisionError());
} else {
if (!frcWriteImage(cameraImage, imageName) ) {
dprintf (LOG_INFO,"frcWriteImage failed - errorcode %i",GetLastVisionError());
} else {
dprintf (LOG_INFO,"\n>>>>> Saved image to %s", imageName);
// always dispose of image objects when done
frcDispose(cameraImage);
}
}
}
I just tried FTPing to the cRIO with
ftp://10.15.2.2/ with FileZilla and I got the following errors
Code:
Status: Connecting to 10.15.2.2:20...
Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".
Error: Could not connect to server
Status: Waiting to retry...