JavaLikeCalc.JavaScript
var cnl = arg1.toInt();
if(cnl < 1 || cnl > 4) { rez = -1; return; }
SYS.DAQ.ModBus.PLC1["VP"+(5+cnl)].com.set(true);
SYS.DAQ.ModBus.PLC1["VF"+cnl].varIn.set(arg2);
if(SYS.DAQ.ModBus.PLC1["VF"+cnl].var.get() > (arg2.toReal()*0.99) && 
  SYS.DAQ.ModBus.PLC1["VF"+cnl].var.get() < (arg2.toReal()*1.01)) rez = true;