News:

  • September 03, 2026, 04:26:08 AM

Login with username, password and session length

Author Topic: email truncated  (Read 12205 times)

mhw

  • Hero Member
  • *****
  • Posts: 250
email truncated
« 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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6175
  • Yes Pinky, Do-more will control the world!
Re: email truncated
« Reply #1 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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: email truncated
« Reply #2 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

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: email truncated
« Reply #3 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).

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: email truncated
« Reply #4 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?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: email truncated
« Reply #5 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?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: email truncated
« Reply #6 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.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: email truncated
« Reply #7 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

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: email truncated
« Reply #8 on: April 22, 2024, 06:35:42 PM »
Thanks franji. That gave me the desired results.