Hi all,
I've written my own image capture application using the Linux SDK to control an ASI120MC. In general everything is working fine, but I have noticed an issue which seems to occur if I take a long exposure (1s or longer) without first commanding the camera to take a short exposure (I'm using 100us). I've tried with Linux SDK versions v0.4.0929 and v0.6.0328 and the problem occurs with both. Here is a summary of what my code does to generate the problem:
ASIOpenCamera(CamNum);
ASIInitCamera(CamNum);
ASISetROIFormat(CamNum, width, height, bin, (ASI_IMG_TYPE)Image_type);
ASISetControlValue(CamNum, ASI_GAMMA, gammavar, ASI_FALSE);
ASISetControlValue(CamNum, ASI_GAIN, gain, ASI_FALSE);
ASISetControlValue(CamNum, ASI_BANDWIDTHOVERLOAD, 40, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_R, wbr, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_B, wbb, ASI_FALSE);
ASISetControlValue(CamNum, ASI_EXPOSURE, 2000000, ASI_FALSE);
ASIStartExposure(CamNum, ASI_FALSE);
usleep(10000);
while((status == ASI_EXP_WORKING)
{
ASIGetExpStatus(CamNum, &status);
}
if(status == ASI_EXP_SUCCESS)
{
ASIGetDataAfterExp(CamNum, (unsigned char*)pRgb->imageData, pRgb->imageSize);
}
This will work fine for a while, but usually after a few minutes it will fails with the status set to ASI_EXP_FAILURE. Now if I do the following instead it will actually work fine:
ASIOpenCamera(CamNum);
ASIInitCamera(CamNum);
ASISetROIFormat(CamNum, width, height, bin, (ASI_IMG_TYPE)Image_type);
ASISetControlValue(CamNum, ASI_GAMMA, gammavar, ASI_FALSE);
ASISetControlValue(CamNum, ASI_GAIN, gain, ASI_FALSE);
ASISetControlValue(CamNum, ASI_BANDWIDTHOVERLOAD, 40, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_R, wbr, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_B, wbb, ASI_FALSE);
ASISetControlValue(CamNum, ASI_EXPOSURE, 100, ASI_FALSE);
ASIStartExposure(CamNum, ASI_FALSE);
usleep(10000);
while((status == ASI_EXP_WORKING)
{
ASIGetExpStatus(CamNum, &status);
}
ASISetControlValue(CamNum, ASI_EXPOSURE, 2000000, ASI_FALSE);
ASIStartExposure(CamNum, ASI_FALSE);
usleep(10000);
while((status == ASI_EXP_WORKING)
{
ASIGetExpStatus(CamNum, &status);
}
if(status == ASI_EXP_SUCCESS)
{
ASIGetDataAfterExp(CamNum, (unsigned char*)pRgb->imageData, pRgb->imageSize);
}
The code above is summarised to show the general order of what I'm doing. Has anybody else seen this behaviour? Any ideas would be appreciated.
Regards
Simon