No announcement yet.

Trouble formatting email message

  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble formatting email message

    I'm trying to send multiple lines of data out in an email, and I would like to label each line. But so far it seems I can only send one line of data or one line of text.

    Ideally The email would look something like this.

    total footage
    parts in s1
    footage in s1
    Parts in s2
    footage in s2

    What I have done so far is use the pack string function and inserted all my variable numbers. Then I inserted the string into the message of an email. And when I email it I get the numbers in one line across the top of the page. It looks like this.
    123 17 17 13 26 10 30 10 40 5 25... ect

    does anybody know of how I can get this into the format I want.

  • #2
    I have doníe some more research. And found that I need to do a line feed and carriage return in the pack string instruction.
    But I have run into another issue. I use the copy data instruction to make 0x0d0a into a CRLF integer array. But when I use the copy character instruction it says that the CRLF IntArray tag type is incorrect for source. And Iím not sure what data type it wants.


    • #3
      For your CRLF Int Array Choose a data type of Unsigned Int 8 and load 13 decimal into the first element and 10 decimal into the second element.

      Click image for larger version

Views:	74
Size:	7.7 KB
ID:	121287


      • #4
        That worked! Thank you so much!


        • #5
          Well turns out I have another issue. The message I made exceeds the 128 byte max length for the string. Do I have to send multiple emails in order to get all of the information I need? Or is there a way to attach another string to the email? Or possibly a way to make a longer string?


          • #6
            Or you could use datalogger and attach the log file.


            • #7
              Yeah thatís a good idea. And I tried it earlier, but I had an issue with the email saying it couldnít find the log file. But maybe I should reroute and try it from that angle again.


              • #8
                The above post will format the email using the above mentioned LF and CR. It will also attach the log file.
                Click image for larger version

Name:	Productivity 1000 Series PLC Email and Text Communication 000-min.png
Views:	80
Size:	39.9 KB
ID:	121373