//Script to set the match string for an OCR tool from a register. //If you're using character fielding, this would be the only option for updating the pass string and the OCV parameters. //Sensor1 is the OCR SoftSensor that is being changed. //The match string is stored in register 200 as a string. //I called my script SoftSensor test_params. One note - it's important to make sure this script runs before the Sensor1 SoftSensor. //I had to create a position reference from the OCR tool to the script, //then remove it to cause the OCR tool to run later in the inspection. class ChangeOCRMatchString { public void inspect() { Sensor MatchIt; String NewMatch=""; MatchIt=GetSensorByName("Sensor1"); if (MatchIt!=null) { NewMatch=RegisterReadString(200); MatchIt.SetParams("12"+NewMatch); } } }