Author Topic: CALL function causes Runtime Err #19  (Read 11022 times)

jchoca

  • Newbie
  • Posts: 3
  • I'm a llama!
    • View Profile
CALL function causes Runtime Err #19
« on: June 29, 2012, 10:08:12 AM »
I have a statement in a custom function that says the following:

IF S = 41 THEN
CALL UpdateDisp2
ENDIF

UpdateDisp2 is custom function #37, and is empty (i.e., should do nothing).

When the program reaches this point (i.e., S = 41), the LCD displays

Runtime Err #19
CF #0037:7E10

How can CF #37 cause a runtime error if it is empty? Thanks in advance.

jchoca

  • Newbie
  • Posts: 3
  • I'm a llama!
    • View Profile
Re:CALL function causes Runtime Err #19
« Reply #1 on: June 29, 2012, 11:47:00 AM »
I think the problem might be that I want to create a custom function that is not in the ladder logic (i.e., that exists, but is only called by another function and is not activated by a coil).  How do I do this so that the program/plc knows that the function exists?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:CALL function causes Runtime Err #19
« Reply #2 on: June 29, 2012, 11:55:11 AM »
Which version of i-TRiLOGI do you have? In the much older i-TRiLOGI software CF that are not used on the ladder program may not be compiled and that could cause a run time error when another CF tries to call it.

You could upgrade to the latest i-TRiLOGI software (current version 6.43) which should compile the CF that is not called from within a ladder program.

If you prefer to stay with your current version of software instead of ugprading to a newer version, then you can force the program to compile the CF by using an unused internal relay to activate the CF in a ladder program. E.g. Internal relay #512 may not be used and you can construct a ladder circuit to run the CF using {dCusF} function. Since the relay 512 is not used the function will not be activated in the ladder program but will be compiled and therefore your other CF can call it.
« Last Edit: June 29, 2012, 11:55:41 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

jchoca

  • Newbie
  • Posts: 3
  • I'm a llama!
    • View Profile
Re:CALL function causes Runtime Err #19
« Reply #3 on: June 29, 2012, 12:08:20 PM »
Thanks for your reply.  I have version 6.3.  Is it possible that I'm just not creating the CF properly? What would be the procedure for creating the CF, assuming it won't be connected to a relay and my version will compile it?