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.