Sign in to follow this  
Followers 0
BobLfoot

ControlLogix and Sending Emails

5 posts in this topic

I am using a 1756-L63 version 16 and a 1756-ENBT/A rev 4.7 to send status emails to my inbox from a PLC. I am using the multiple message design laid out by RA. MSG1 - Set SMTP Server - CIP Generic Set Attribute Single Class 32f Instance 1 Attribute 5 MSG2 - Set From Address - CIP Generic Set Attribute Single Class 32f Instance 1 Attribute 3 MSG3 - Set to Address - CIP Generic Set Attribute Single Class 32f Instance 1 Attribute 2 MSG4 - Set Subject - CIP Generic Set Attribute Single Class 32f Instance 1 Attribute 4 MSG5 - Send text mail - CIP Generic Service Code 4b Class 32f Instance 1 Attribute 0 This works real nice. I even went ahead and placed the mailing logic in an ADD-On Instruction. One drawback is that you need message tagsat the program or controller scope to connect to the messages in the Add-ON. Can't make message a local tag. Anybody else used the email function of the ENBT or EWEB?

Share this post


Link to post
Share on other sites
Bob can you share the logix or an example? I have not done any ADD-On yet so I would be interested in breaking it down to understand it better.

Share this post


Link to post
Share on other sites
If you have an RA subscription then answer id 30937 will provide two examples. What I did is modify this by adding a roll your own sequencer to fire the messages in succession. The whole concept is predicated on using two new User Data Types: EmailString is a String of length 520 String_255 is a String of length 255 You need 6 String Type Tags mine were as follows: NAME: TYPE: Email_SMTP_Server_Address String_255 Email_to_Address String_255 Email_from_Address String_255 Email_Subject String_255 Email_Body_Text EmailString Email_resp_from_Server EmailString You'll need load data into the string tags either with RSlogix or with DTOS and ConCatenate instructions You will need 5 Message Tags Set_SMTP_MSG1 Set_From_Address_MSG2 Set_to_Address_MSG3 Set_Subject_MSG4 Send_Body_Text_MSG5 I also added a Blank_Body_Text of type EmailString. You then insert the 5 messages one per rung and use your code to trigger them in succession. Each message is pointed at the ENBT or EWEB Module by browsing to it. MSG1 - Set SMTP Server - CIP Generic Set Attribute Single Service Code 10 Class 32f Instance 1 Attribute 5 Source TAG Email_SMTP_SERver_Address MSG2 - Set From Address - CIP Generic Set Attribute Single Service Code 10 Class 32f Instance 1 Attribute 3 Source TAG Email_From_Address MSG3 - Set to Address - CIP Generic Set Attribute Single Service Code 10 Class 32f Instance 1 Attribute 2 Source TAG Email_To_Address MSG4 - Set Subject - CIP Generic Set Attribute Single Service Code 10 Class 32f Instance 1 Attribute 4 Source TAG Email_Subject MSG5 - Send text mail - CIP Generic Custom Service Code 4b Class 32f Instance 1 Attribute 0 Source TAG Email_Body_Text The one trick seems to be to add 4 to the String Data Length and Place in it in the MSG tag Req length variable. I am off for a couple of days and don't have access to Logix, the above is what I can recall.

Share this post


Link to post
Share on other sites
Bob, Unfortunately MSG and AIOs are not very friendly as you found, you must have external messgae tag that technically kills its purpose as you have to configure this tag externally. Here is a "Workaround" for this, I really don't like it, but this is the best solution so far. - Create AOI with message, do not export it to L5X - Create a rung of logix with this AOI, including MSG tag and configure it - Select this rung (or rungs) and exprot them to L5X. It will save all backing tags, definitions, AOIs etc. Next time you need AOI, import whole rung instead of single AOI, it will create all data types and tags for you. Take a look at TN 50122 - it is not EWEB EMAIL related, but shows how use MSG in AOIs Edited by Contr_Conn
1 person likes this

Share this post


Link to post
Share on other sites
Exporting and importing is definitely the way to go with Message instructions. When doing this, I find it useful to predicate all the tags with ReplaceMe_ and then I can do a quick replace. I also add a ReplaceMe_Version DINT with my version number to help manage revisions.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0