/
6K Troubleshooting - How do I Know what Error Started the Error Program
6K Troubleshooting - How do I Know what Error Started the Error Program
The ERRORP and ERROR commands allow the 6000 or 6K program to goto an error program when an error occurs. The ERROR command enables which errors you will be monitoring and which ones will cause it to run the error program. The ERRORP command defines which program will run when the error occurs(be sure to use set the ERRORP command before the ERROR command). You can enable several errors to cause it to run the ERRORP program, but you can only define one ERRORP program. To determine what error caused the ERRORP program to run, you can capture the error into a binary variable. The command would be VARB1=ER. Please refer to the example below.
DEL MAIN ;Deletes previous MAIN program
DEF MAIN ;Defines new MAIN program
ERRORP FAULT ;Defines FAULT as the ERROR program
ERROR111111111111111111 ;enable all errors to run to ERRORP
END
DEL FAULT ;Deletes previous FAULT program
DEF FAULT ;Defines new FAULT program
VARB1=ER ;Places ER bits into VARB1
ERROR000000000000000000 ;Disable error checking. This is
;so the FAULT program will not
;continuously run because of the
;original error
VARB1 ;Prints VARB1 to terminal screen
JUMP MAIN ;Jump back to MAIN program
END
, multiple selections available,
Related content
6K Troubleshooting - Memory Errors in Stand-Alone Products
6K Troubleshooting - Memory Errors in Stand-Alone Products
More like this
6K Troubleshooting - My 6K Stops When I Cut Power to My EVM32
6K Troubleshooting - My 6K Stops When I Cut Power to My EVM32
More like this
6K Troubleshooting - My 6K Locks Up During a Download
6K Troubleshooting - My 6K Locks Up During a Download
More like this
6K Troubleshooting - TASX BIT 5 -- Encoder Failure
6K Troubleshooting - TASX BIT 5 -- Encoder Failure
More like this
6K Troubleshooting - No Remote Panel Error or Power-Up SEQUENCE FAILURE
6K Troubleshooting - No Remote Panel Error or Power-Up SEQUENCE FAILURE
More like this
6K Troubleshooting - My .TLB File Does Not Work (COM6SRVR)
6K Troubleshooting - My .TLB File Does Not Work (COM6SRVR)
More like this