PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: Thomas Bock on February 20, 2020, 10:02:52 AM

Title: strange error 11 with KEC
Post by: Thomas Bock on February 20, 2020, 10:02:52 AM
Today we received an error 11 with the KEC function two times. *ufac reported no errors and after these two crashes everthing worked fine again.
The code below shows what the program basically does. Does someone has an idea what causes this?

Code: [Select]
begin
KEYED "demofile",["PLAN":1:1:24]+[2:1:2]+[3:1:10],["QSKRITERIUM":3:1:10]+[1:1:24]+[2:1:2],["WERKZEUG":20:1:7:"+U"],0,-640,BSZ=3,OPT="X0",SEP=$8A$
open (1)"demofile"
dim rec$:IOLIST QPLAN_NR$:[LEN(SEP,SIZ=24)],SEQUENZ$:[LEN(SEP,SIZ=2)],QSK_NR$:[LEN(SEP,SIZ=10)],BEZ$,TYP$,ZUSTEXT$,SOLL,M_TOLERANZ,P_TOLERANZ,ME_NR$:[LEN(2)],DURCHSCHNITT,PUNKTE,ANL_DAT,ANL_BEN$,AEND_DAT,AEND_BEN$,LOE_DAT,LOE_BEN$,DOK_PFLICHT,PASSIV,WKZ_ID$:[LEN(7)],FEHLERKLASSE$,FESTMENGE,MEDIA_DATEI$,NENNWERT$
rec.qplan_nr$ = "123"
rec.qsk_nr$ = "987"
for i = 1 to 10
      rec.sequenz$ = str(i:"00")
      write record (1, dom = *next) rec$
      if not(tcb(2)) {
            print kec(1,kno="WERKZEUG"); ! <--- error 11
      }
next
close(1)
end