News:

  • September 26, 2026, 08:40:17 AM

Login with username, password and session length

Author Topic: BRX Email  (Read 8682 times)

JeffS

  • Hero Member
  • *****
  • Posts: 113
BRX Email
« on: March 15, 2021, 12:15:27 PM »
When an email command is initiated and the contents of the email contain variables, when do these variables get captured for the email?

I had a program that has been working fine, but recently some of the variables are coming out wrong like they aren't being captured until a scan or two after the email instruction is initiated.

Basically the email is called and on the next scan some of the variables are reset to zeros.  What I am getting in my emails now are zeros.

I can interlock this reset with the success bit for the email instruction to fix this, but wanted to better understand how the email pulls data as it could affect some other programs of mine.

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: BRX Email
« Reply #1 on: March 15, 2021, 12:23:44 PM »
If you notice the little red triangle in the upper left corner of the instruction is red (DMD0138 I believe is the correct help topic off the top of my head.)

This means it is asynchronous.  It will queue and occur when the driver is able to get to it.  Until that time the instruction is just kinda hanging out waiting.  When it actually gets ahold of the driver or vice versa, the instruction executes, hence the zeros.

It is probably a bit more complicated than this and I am sure Bob can explain it better, but this should give you a layman's idea of what is going on.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: BRX Email
« Reply #2 on: March 15, 2021, 02:32:33 PM »
When an email command is initiated and the contents of the email contain variables, when do these variables get captured for the email?

I had a program that has been working fine, but recently some of the variables are coming out wrong like they aren't being captured until a scan or two after the email instruction is initiated.

Basically the email is called and on the next scan some of the variables are reset to zeros.  What I am getting in my emails now are zeros.

I can interlock this reset with the success bit for the email instruction to fix this, but wanted to better understand how the email pulls data as it could affect some other programs of mine.

Because the buffering of all of the possible strings could be significant, we don't buffer and do use the directly data from the source. So yes, if you start an email and then change the data before completion, it may reflect the new state.
"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

JeffS

  • Hero Member
  • *****
  • Posts: 113
Re: BRX Email
« Reply #3 on: March 15, 2021, 04:30:00 PM »
Ok thanks for this info!

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: BRX Email
« Reply #4 on: March 16, 2021, 12:18:36 AM »
The easy fix would be to print a string when the rising edge of the trigger occurs then simply use that string as the email instruction's body.