Help - Search - Members - Calendar
Full Version: ControlLogix and Sending Emails
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
BobLfoot
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?


JeffKiper
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.

BobLfoot
QUOTE(JAK @ Nov 26 2008, 06:34 PM) [snapback]76274[/snapback]

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.


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.


Contr_Conn
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.