Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: dmoyer on January 13, 2014, 03:28:48 PM

Title: Email Error
Post by: dmoyer on January 13, 2014, 03:28:48 PM
Using Logger I get the following when attempting to send an Email.

*Device instruction terminated before completion @0000007E*
*Connecting to SMTP server...*

Can anyone give me some insight as to why the instruction may be terminating?

I'm trying to send an Email to my gmail account.  It's a ASII string and a variable.
SMTP server: smtp.gmail.com = 173.194.68.109
Port: 465
Title: Re: Email Error
Post by: Greg on January 13, 2014, 06:27:49 PM
If the EMAIL instruction is in a Stage that is getting jumped out of before it has run to completion (i.e. gotten a Success or Error) it can cause this error. Other than that, I don't know specifically what else can cause it. How are you executing the EMAIL instruction and how are you terminating it? Can you give us details?
Title: Re: Email Error
Post by: BobO on January 13, 2014, 10:06:01 PM
It specifically means that the instruction is contained with a program block, task block, or stage that has run its termination logic while the instruction was still active. Program blocks run termination on the scan following the EXIT or HALT that stopped it. Task blocks run termination on the scan following completion if run once, or on the scan following the ENTASK enable dropping if run continuously. Stages run termination on the scan following a jump to another stage.

There are probably some other special cases I can't remember off the top of my head, but the key point is that the EMAIL is in a code element that has been allowed to terminate before it was completed. Once you start an EMAIL, don't allow the containing code to terminate until either the Complete bit or Error bit turns on (or the stage transitions for complete and error).