请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
visionpro加载toolblock实例
void Subject_Ran(object sender, EventArgs e)
{
// This method executes each time the TB runs
if ((bool)(cogToolBlockEditV21.Subject.Outputs["InspectionPassed"].Value) == true)
numPass ;
else
numFail ;
// Update the label with pass and fail
nPass.Text = numPass.ToString();
nFail.Text = numFail.ToString();
// Update the CogDisplayRecord with the image and the lastRunRecord
cogRecordDisplay1.Image = cogToolBlockEditV21.Subject.Inputs["Image"].Value as CogImage8Grey;
CogBlobTool mBlobTool = cogToolBlockEditV21.Subject.Tools["CogBlobTool1"] as CogBlobTool;
cogRecordDisplay1.Record = mBlobTool.CreateLastRunRecord();
cogRecordDisplay1.Fit(true);
}