E: Set Scrap automatically

In  Measurement window you want to set the Block reason automatically, if measurement is wrong

custom_qs_qsftpos_edit

 

In follow example we check the value only for QC Step "Humidty"

if outside 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