Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: mhw on April 22, 2024, 11:27:35 AM

Title: email truncated
Post by: mhw on April 22, 2024, 11:27:35 AM
I am trying to send an email with a BRX PLC. There are 87 SL strings in the send email box. It will truncate the 18th SL and not send the remaining SLs. The success bit for the email box turns on. What am I doing wrong and how can I fix it?

Thank You, Mike
Title: Re: email truncated
Post by: BobO on April 22, 2024, 11:32:23 AM
I am trying to send an email with a BRX PLC. There are 87 SL strings in the send email box. It will truncate the 18th SL and not send the remaining SLs. The success bit for the email box turns on. What am I doing wrong and how can I fix it?

Thank You, Mike

The email body (the output of the print script) is limited to 1K. You are probably exceeding that. The attachment doesn't have a size limitation.

The PLC should be giving a warning indicating the overrun.
Title: Re: email truncated
Post by: mhw on April 22, 2024, 12:20:39 PM
Quote
The PLC should be giving a warning indicating the overrun.
It will only indicate the overrun if I included too many SL addresses. However, I see that the data in the SLs exceeds the 1k at the 18th SL.
I will try to log it to a file.

Thanks
Title: Re: email truncated
Post by: franji1 on April 22, 2024, 12:41:14 PM
Use the RAM Drive (no SD card necessary - faster too).  You can flag the attachment for deletion by the EMAIL instruction to keep the RAM Drive lean (it will fill up if not cleaned up).
Title: Re: email truncated
Post by: mhw on April 22, 2024, 01:16:53 PM
Quote
Use the RAM Drive (no SD card necessary - faster too).
The RAM drive appears to have the same 1K limit.

The txt file contains all of the PLC addresses and tag names on the first line. Is there a way to prevent this?
Title: Re: email truncated
Post by: franji1 on April 22, 2024, 01:34:01 PM
Quote
Use the RAM Drive (no SD card necessary - faster too).
The RAM drive appears to have the same 1K limit.

The txt file contains all of the PLC addresses and tag names on the first line. Is there a way to prevent this?
It's 780K.

Where did you see 1K limit?
Title: Re: email truncated
Post by: franji1 on April 22, 2024, 01:35:53 PM
I think I know
You must use a different FILEWRITE PER SL.

You cannot write more than 1K to a file at a time.  But you can have MULTIPLE FILEWRITEs.
Title: Re: email truncated
Post by: franji1 on April 22, 2024, 01:41:23 PM
If you want to write it generically, use STAGE

WriteAttachment

SG S0
MOVE 0 V99
FILEOPEN OnSuccess JMP S1

SG S1
FILEWRITE SL[V99] OnSuccess JMP S2

SG S2
INC V99

STRGE V99 87 (index is 0..86)
EXIT  // this exits IMMEDIATELY

// if got this far, JMP back to S1 with new V99 index
JMP S1
Title: Re: email truncated
Post by: mhw on April 22, 2024, 06:35:42 PM
Thanks franji. That gave me the desired results.