E: Set Scrap automatically

In the Measurement Sample QC window you want to set the Blockage reason automatically if measurement is wrong:

custom_qs_qsftpos_edit

 

In the following example we check the value only for QC Step "Humidity".

If it is outside the defined measurements, we set the scrap automatically to "OOR".

 

beasscript-logo-small

global function dw_2_item_messwertc_itemchanged
// we ignore all, if not Humidty
if <dw_1.item.qs_id.value> <> Humidty then
  return 1
end if
// read maesurement
setvar=lc_value=<dw_2.item.messwertc.value,#.000000>
// Delete block reason
dw_2.item.sperrgrundid.setvalue=
// check if outside the rang
if <lc_value,#.000000> n< <dw_1.item.minimal.value,#.000000> or <lc_value,#.000000> n> <dw_1.item.maximal.value,#.000000> then
  // check only, if minimal not 0 and value not 9
  if <lc_value,#.000000> n> 0 and <dw_1.item.minimal.value,#.000000> <> 0 then
    dw_2.item.sperrgrundid.setvalue=OOR
  end if
end if
end global