Author Topic: Run-Time Error in Fn#7  (Read 10789 times)

Jane

  • Newbie
  • Posts: 10
  • I'm a llama!
    • View Profile
Run-Time Error in Fn#7
« on: November 18, 2009, 06:57:36 PM »
NO error when complie or test but occur error in the field sometimes.
why occur error? I don't Know.
please. teach me that i mistake or how to way resume next to error.


example)
1.Run-Time Error in Fn#7
   Error:Illegal Opcode-please inform Manufacture
   Fn#7
      I=4   
      SETIO FLAGF_04
      CLRIO FLAGS_04

      M=DM[1000+10*I+1]    K=DM[1000+10*I+2]   
      IF M>0 AND DM[I*10+1]>0 THEN CALL FNF_ONE ENDIF

2.Run-Time Error in Fn#68
   Error:System Variable Index out-of-range


   Fn#68
      DM[503]=9
      IF DM[108]=1 OR DM[108]=2 THEN
         CLRBIT OUTPUT[2],2
      ENDIF
      CLRIO FLAGSBR_08
      SETIO FLAGSBR_09
      DM[411]=DM[411]+1
      DM[514]=DM[514]+1

      IF DM[71]=DM[507] THEN
         DM[507]=0
         I=7   K=13   L=14   M=1   N=1
         IF (DM[I*10+8]=1 OR DM[I*10+8]=2) AND (DM[I*10+5]=1 OR DM[I*10+5]=2) THEN
            DM[I*10+8]=1
            DM[I*10+5]=1
      
               IF DM[I*10+7]=1 THEN
                  SETBIT OUTPUT[M],K
                  CLRBIT OUTPUT[N],L
                  DM[I*10+7]=0
               ELSE
                  SETBIT OUTPUT[N],L
                  CLRBIT OUTPUT[M],K
                  DM[I*10+7]=1
               ENDIF
         ENDIF
         IF (DM[I*10+8]=1 OR DM[I*10+8]=2) AND (DM[I*10+5]=0) THEN
            DM[I*10+8]=1
            SETBIT OUTPUT[M],K
         ENDIF
         IF (DM[I*10+5]=1 OR DM[I*10+5]=2) AND (DM[I*10+8]=0) THEN
            DM[I*10+5]=1
            SETBIT OUTPUT[N],L
         ENDIF
         CLRIO FLAGSBR_09
         SETIO FLAGF_07
         DM[I*10+10]=1
      ELSE
         DM[I*10+10]=0
         DM[503]=0
         IF DM[503]=0 AND TESTBIT(INPUT[2],5)=0 AND TESTBIT(INPUT[2],6)=0 AND TESTIO(FLAG_SBR_L)=0 THEN
            SETIO FLAG_SBR_L
            DM[502]=2
            CALL FNS_06_SBR
         ENDIF
      ENDIF

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Run-Time Error in Fn#7
« Reply #1 on: November 18, 2009, 07:41:48 PM »
Please email to support@tri-plc.com and state the PLC model number, serial number and purchase information. It appears there may be a hardware problem if you see random errors happening and not repeatable.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS