I'm working on my first karel program, a pretty basic data logger. My basic idea is like this:
Existing karel program reads bar code and calls appropriate PNS program
PNS program runs my datalogger
datalogger starts a cycle timer and grabs barcode data from existing karel program
datalogger waits on semaphore from TP production program
PNS program calls production program
production program does it's thing
production program ends and sets semaphore
datalogger stops cycle timer, grabs the value of a half dozen or so registers, writes timestamped entry to log file
I've figured out how to do all this (although if there's a better way I'll take any suggestions anyone has), my problem is how to deal with an abort between when the datalogger starts and the production program ends? I still want to log the attempt at production including all the register values as well as what triggered the abort (eg; condition handler, FNCT > Abort (all), limit error) but I'm not sure how to set up a listener for this.