Author Topic: F1616BA Run Error  (Read 13910 times)

Derek

  • Newbie
  • Posts: 7
  • Coffee! :)
    • View Profile
F1616BA Run Error
« on: October 10, 2011, 10:59:48 AM »
I have an f1616BA with a Kep MMI6050 touch screen running a vertical form/Fill/Seal packaging machine and a net weigh filler for filling 2lb bags of coffee. It's been online now for a few weeks. I love the PLC, it's my first full scale PLC project. I worked through the entire programming process with need for tech support, the manuals are excellent.
I've been making adjustmets to the program. This morning I tried to load my program, with the only change being in a CusF, the counter number in a setcsv statement. After loading, I clicked on re-boot as I always have before, and the run error light came on.  The PLC put on the lcd display Undef Inter. cf12. Being sure the program was ok. I tried to re-load with the same result. I then tried to load an older version of the same program, run error.  Next I tried to load the "blank" program from the samples folder. This time no run error. So I tried loading my program again, run error.   I also tried power off/on in between loading programs, no effect.  Next I loaded "Analog-Timer" from the sampes folder, run error  undef inter. CF10.  CF10 only has a setlcd command.
Next I loaded the blank program again, then my program and no run error, everything is now working normally.

What could be causing this? It happened to me once a few weeks ago, I re-loaded the the program, and it worked fine after that. It didn't happen again until today.  I'm concerned now about loading the program for minor changes, and rendering my machine useless. This is a machine we depend on daily, it can't be down for long.  Any ideas?

Best Regards,
Derek

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:F1616BA Run Error
« Reply #1 on: October 10, 2011, 12:00:46 PM »
It sounds like you have introduced a bug into custom function#12.

There are a class of programming problems that cannot be detected until the program runs.  Examples of this type of run time issue include:
  • Divide by zero
  • Subroutine stack overflow/underflow

You will need to do some detective work to figure out why your program is failing.

If your program can be run under simulation (no real hardware) you may be able to debug your code fairly easily.  If your PLC program cannot function without being loaded onto real hardware then your debugging will be a bit more difficult.

I suggest that you look at the custom function that is being reported as a runtime error.  I would suggest that you "instrument" this custom function so that you can examine what it is doing.  Look at the  TBASIC PAUSE statement for a method to temporarily suspend the PLC program so that you can poke at the PLC internals.  

The use of PAUSE statements may help you isolate the offending bits of programming.  There are many more "tools" that you can use to hunt down the problems.

Good luck,

Gary d

Derek

  • Newbie
  • Posts: 7
  • Coffee! :)
    • View Profile
Re:F1616BA Run Error
« Reply #2 on: October 10, 2011, 12:17:49 PM »
Gary,
As far as I can tell so far, I don't see a problem with the program.  The run error went away without making any changes, other than re-loading it.

Also, in trying to diagnose what the problem was, I loaded the program "Analog-Timer.PC6" from the samples folder.  The PLC indicated a run error in CF10 which contains only this:
SETLCD 2,3, "Timer #1 PV=" + str$(timerPV[1],4)

It all seemed a bit odd, like there's a glitch somewhere. It only happens right after loading a program,only twice after maybe 30 times of loading up programs, and the fix so far has not included any change in code, only re-loading.

Thanks for your input, I've learned a lot from your other posts.

Derek

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:F1616BA Run Error
« Reply #3 on: October 11, 2011, 04:03:58 PM »
1) It sounds like the program was not properly transferred which caused the runtime error. Did the program transfer progress smoothly or it took a long time with some jerkiness in the transfer counter?

2) Did you transfer via serial port or Ethernet port?

3) Please advise the version number of the i-TRiLOGI software and the JRE. You can find the i-TRiLOGI version number by going to "Help" menu and the Java Run time version can be found.

4) You can upgrade to the latest i-TRiLOGI version by following the "Help-> Upgrade TRiLOGI" link in the software. Some earlier software version were found to encounter problems during program transfer on multi-core PC so it is good to upgrade to the latest version.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Derek

  • Newbie
  • Posts: 7
  • Coffee! :)
    • View Profile
Re:F1616BA Run Error
« Reply #4 on: October 11, 2011, 04:44:13 PM »
1.) The transfer went smoothly, and aways has, however the first time I had the run error a few weeks ago, I thought maybe I clicked on "reboot" too quickly when it was finished.

2.) Transfered via the rs232 serial port.  Kep mmi and a thermocouple module are connected to rs485 ports.

3.)i-Trilogi version 6.43 build 01.  JRE 6.0.230, I read the posts about problems with JRE, but I never experienced problems opening TLServer so I haven't been concerned until now. I'm running windows 7 Professional 6.1 32bit.

4.)I did run the upgrade not too long ago.

Derek

  • Newbie
  • Posts: 7
  • Coffee! :)
    • View Profile
Re:F1616BA Run Error
« Reply #5 on: October 11, 2011, 04:59:14 PM »
The Java folder on my computer does contain a folder "j2re1.4.2_19" that was modified the same date I upgraded iTrilogi on 8/19/11 so I suspect that is what's being used when I run iTrilogi and Tlserver.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:F1616BA Run Error
« Reply #6 on: October 11, 2011, 05:15:16 PM »
Did you try to power down the PLC when the runtime error occur and re power on and does the runtime error disappear?

After program transfer try to click on the "Reset" button instead of the "Reboot" button.  When the PLC is conducting serial communication an untimely reboot command could cause a undefined interrupt and the runtime error light will be turned ON.

A software reset will be much more forgiving than a cold reboot. Cold reboot is sometime needed when you have executed say an IP address change command in the PLC and need to restart the PLC with the new IP address. Otherwise most of the time Reset command should be used.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Derek

  • Newbie
  • Posts: 7
  • Coffee! :)
    • View Profile
Re:F1616BA Run Error
« Reply #7 on: October 11, 2011, 05:52:26 PM »
Yes, I tried powering down and back up, the run error light comes back on. The first time it happened a few weeks ago, I just re-loaded the same program again, and the error went away. This week though, re-loading several times, had no effect, error every time. The fix was loading in a blank program, which ran with no error, then re-loading my program.


I'll be sure to use "reset" from now on, will report any further problems.
Thanks for your help.