Announcement

Collapse
No announcement yet.

e mail keeps sending me the same email

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • e mail keeps sending me the same email

    hello again guys. So we have traveled further down the yellow brick road. Now im obviously able to send myself emails from my plc. But the problem is it keeps sendiing me the exact same data. Is there some way to clear the copy data source value after sending the email? I feel like that is where my problem is. Please keep in mind that i am a worm at this so keep it basic please. thanks for any help ahead of time. I am attaching my program and anything else you need please let me know. Ok...maybe not. Cant upload files with the extension adpro.... Its been a long day. I guess let me know what i need to convert the file to in order to send it to you
    Attached Files

  • #2
    You should be able to zip it all and upload that.

    Comment


    • #3
      Yes Sir. thank you
      Attached Files

      Comment


      • #4
        You may have a problem with EMAIL.Message being in the source and destination of your PKS.
        I have had issues building strings from S32 tags without using intermediate tags to store intermediate results.

        Comment


        • #5
          First thing I notice is that right here you are telling the email to send twice, two seconds apart from each other:

          Click image for larger version  Name:	SendEmail.png Views:	0 Size:	2.4 KB ID:	130012

          You only need the main part of that rung to initiate sending the email. The email is also an edge trigger instruction, so the best way to trigger it would be to use a "set" instead of an "out" on the send email tag. Then use a "rst" on the send email once you receive a success or error confirmation from the email instruction. If the error goes on, use that to also notify you and to copy your error response data into an error log for viewing. If success, then reset and continue to run as normal.


          Or if I am reading it all wrong because its too early, changing your normally open contact of "send email" tag in the run for sending the email to a rising edge contact may solve your issue since it would only activate the rung for a single scan.
          Last edited by MikeN; 04-03-2020, 09:52 AM.

          Comment


          • #6
            I removed it from the source side of the PKS and same result. Still sending the original email. Doesnt make much sense to me. Its gotta be copying the same data over and over. In theory im gonna have it send the email once a day at a designated time. Would it be possible to set up a copy reset for a few seconds later?

            Comment


            • #7
              Originally posted by MikeN View Post
              First thing I notice is that right here you are telling the email to send twice, two seconds apart from each other:

              Click image for larger version Name:	SendEmail.png Views:	0 Size:	2.4 KB ID:	130012

              You only need the main part of that rung to initiate sending the email. The email is also an edge trigger instruction, so the best way to trigger it would be to use a "set" instead of an "out" on the send email tag. Then use a "rst" on the send email once you receive a success or error confirmation from the email instruction. If the error goes on, use that to also notify you and to copy your error response data into an error log for viewing. If success, then reset and continue to run as normal.


              Or if I am reading it all wrong because its too early, changing your normally open contact of "send email" tag in the run for sending the email to a rising edge contact may solve your issue since it would only activate the rung for a single scan.
              i was attempting to reset the out coil 2 secs later since my scan time is a little more than a sec. but rising edge trigger may be the way to go. im going to implement the set rst for the email out

              Comment


              • #8
                Originally posted by MikeN View Post
                First thing I notice is that right here you are telling the email to send twice, two seconds apart from each other:

                Click image for larger version Name:	SendEmail.png Views:	0 Size:	2.4 KB ID:	130012

                You only need the main part of that rung to initiate sending the email. The email is also an edge trigger instruction, so the best way to trigger it would be to use a "set" instead of an "out" on the send email tag. Then use a "rst" on the send email once you receive a success or error confirmation from the email instruction. If the error goes on, use that to also notify you and to copy your error response data into an error log for viewing. If success, then reset and continue to run as normal.


                Or if I am reading it all wrong because its too early, changing your normally open contact of "send email" tag in the run for sending the email to a rising edge contact may solve your issue since it would only activate the rung for a single scan.
                That rung doesn't trigger the 'send email' anyway, the next rung has the same OUT, but is controlled by DI-0.1.2.8

                Considering that, and the low CPU load, it may very well be sending the correct email, just that the scan values are always consistently low.
                Put a Total Scan Count 1 or 2 tag in your PKS to see if it is really sending the exact same email.

                I am missing something, why is CRLF 64 size? It appears to be 0x0d0a
                Last edited by kewakl; 04-03-2020, 10:11 AM.

                Comment


                • #9
                  Originally posted by kewakl View Post

                  That rung doesn't trigger the 'send email' anyway, the next rung has the same OUT, but is controlled by DI-0.1.2.8

                  Considering that, and the low CPU load, it may very well be sending the correct email, just that the scan values are always consistently low.
                  Put a Total Scan Count 1 or 2 tag in your PKS to see if it is really sending the exact same email.

                  I am missing something, why is CRLF 64 size? It appears to be 0x0d0a
                  I was using the simulator to trigger the email while i work out these issues. thats the DI-0.1.2.8. just a temp trigger. And the CLRF being 64 is because I have no idea what I am doing. As aforementioned.....I am really new to this. Been watching videos and playing along until I get some decent results. This my first time dealing with copy character.....copy data....pack string...and email.

                  Comment


                  • #10
                    Originally posted by James Ferguson View Post

                    I was using the simulator to trigger the email while i work out these issues. thats the DI-0.1.2.8. just a temp trigger. And the CLRF being 64 is because I have no idea what I am doing. As aforementioned.....I am really new to this. Been watching videos and playing along until I get some decent results. This my first time dealing with copy character.....copy data....pack s tring...and email.
                    No problem.


                    The simulator card switch is a fine way to trigger that. I was just trying to clear up the 2 second rung above it.
                    CRLF should be 2 characters. The CR is 0x0d the LF is 0d0a - combined they make up CRLF or 0x0d0a. ASCII 13 and ASCII 10
                    Have you had a chance to put an incrementing/changing value into your email to check that we see something that MUST change.

                    I'm curious if INT32 is good for the terminator. It may be fine, I'm unsure.
                    I have always used int16 for my ascii storage. (however that is one byte larger than necessary.)
                    I also store my CR separate from the LF, just in case I have to talk with devices with different terminator requirements.
                    The attached snippet is part of my comms with a TDK powersupply.
                    Attached Files
                    Last edited by kewakl; 04-03-2020, 12:10 PM.

                    Comment


                    • #11
                      So......I deleted all the old log files off of the sd card and now it is sending the newest log file. Made several new files this morning to check it out and it will send the old file first then create a new file. So far its working properly. Thanks for all your help.

                      Comment


                      • #12
                        Thanks for the update.

                        Remember to check back to your post (#11) if this happens again.
                        It may not, but, hey!!!

                        Comment

                        Working...
                        X