Ed,
You may have broken the Nano-10 firmware. I'm sure the guys at TRI will get a hold of you.
But if the error message that you are seeing on the LCD display, is consistent:
Undef.Interrupt..
CF #0004:01AE
Then you may be able to figure out what is causing the error.
I got the hint from Leon Yew at TRI. The "CF #0004:01AE" part of the error message is a hint as to where the undefined interrupt happened.
The "CF #0004" indicates that the PLC was executing custom function #4.
The "01AE" is an address of the PLC instruction that may have triggered the Interrupt.
Open up your custom function #4 for editing and press the <F8> key. A new window will open labeled "Listing of Custom Function #11". The left side of the screen will have 4 digit hex numbers. These numbers correspond to addresses in the executable code for each line of code. Figure out where your 01AE address falls in the listing.
The TBASIC line before the 01AE value is probably what has caused the exception. Look very carefully at these lines of TBASIC around the 01AE address and you may find something in your code that can and will fail to compute.
There are many exceptions that can only be caught at run time. These include:
- Dividing by 0
- Breaking the subroutine stack (it is limited to 5 levels and you nest subroutines deeper than 5 you will get an error). If you execute a RETURN statement from code that was not called as a subroutine you will get screamed at.
- Accessing DM[] with an impossible index, say DM[12345678]
- And a bunch of other things
All of those things will show up on the 4x20 display and cause the PLC to PAUSE. Unfortunately, I have no insight into what can cause an "Undef.Interrupt..". This is where you will need help from the TRI guys.
Gary D*ickinson