Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: JeffS 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.
-
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.
-
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.
-
Ok thanks for this info!
-
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.