Email and Red Lion G308

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Hi all,
I have a customer that wants me to send a email based on a specific event. I have created a trigger that creates a Data File based on that event. Is there any way to email that file out after it is created?

If not is there a way to include that tag info in the body of a email?

My Set Up:
HMI: G308
PLC: 1769-L33ER
Communicating via Ethernet

Thanks for any help!!
 
You can do either. You can use the SendFile or SendFileEx commands to send the file. you just need to know the file name. You can also put tag into in as the body of the email.

Thanks
Jeremy
 
I don't have an example but if you type the name of the tag in the sendmail command, the value of the tag will be sent.

Thanks
Jeremy
 
Jeremy,
What is the syntax if I have more than one tag to email out at one time? I have looked up the SendMail command in the manual and it looks pretty straight forward but it doesn't explain how to send more than one tag. I want to avoid sending several emails with one tag in each email.

Thanks for the help.
 
Jeremy,
A couple more questions have come to mind. First: The email will be sent to some office personnel so I would like to make it as easy to read as possible. I would like to do something like this:
Batch Number: (Numeric_Tag1)
User Name: (String_Tag1)
Tank 5W Status: (Flag_Tag1)
Tank 5E Status: (Flag_Tag2)

So to be able to add text to the email would this be the correct syntax?:
SendMail(1,"Tank Switch Report","Date:" Numeric_Tag1+"User Name:"String_Tag1+"Tank 5W Status:"Flag_Tag1+"Tank 5E Status:"Flag_Tag2)

Next: To implement this I would just create a program with this syntax in it? Then I would call this program every time I need it. Correct?

Sorry for all the questions. I don't have a unit to test unit anymore so what ever I do will be live on the customers unit. I just want to make sure that I have it at least close when I go to install the update.
Thanks for the help!!
 
Your close but it would look like this

SendMail(1,"Tank Switch Report","Date:"+Numeric_Tag1+"User Name:"+String_Tag1+"Tank 5W Status:"+Flag_Tag1+"Tank 5E Status:"+Flag_Tag2)

Yes you can put this in a program and call it whenever you need it
 
Jeremy,
I couldn't get it to Translate unless I did this:
SendMail(1,"Tank Switch Report","Date:"+"Numeric_Tag1"+"User Name:"+"String_Tag1"+"Tank 5W Status:"+"Flag_Tag1"+"Tank 5E Status:"+"Flag_Tag2")
Will putting "" around the tag name have any effect on what is displayed in the email?

Also one more question: I want to trigger the email off of a bit in the PLC that will go high for 5 sec every time a tank switch is made. So what I did was in the tag for that bit on the triggers tab I put the action to call the EMAIL() program after a 100ms delay. Is that how you call programs to run from a tag status? If you have a better way please let me know.

I have attached my Database for you to review if you have a chance. I have more work to do on the email set up. I am waiting for the customer to get back to me on the info. I just want to make sure I have the "hard stuff" down.

Thanks for all your help.
 
You can't put "" around the tags or you will only get the tag name and not the value. I have altered your file and attached

Thanks
Jeremy
 

Similar Topics

Hi everyone, I have a Red Lion CR3000 HMI that I am trying to set up to send a email when there are certain alarms. So far I have had no luck...
Replies
8
Views
4,450
Hi Everyone, I'm using a small program to generate emails when certain conditions are met like when a counter exceeds a value. I was hoping that...
Replies
1
Views
2,001
Greetings All Need pointing in the right direction. Been a few days, configured G3 email feature with no success. Checked IP addresses or all...
Replies
3
Views
2,578
Trying to send an email of one var. got the email part working but cant seem to get the var embeded in the email. below is my code. can anyone...
Replies
7
Views
3,020
Anybody using the G3 email feature? I have tried a few things but haven't been able to get it to send me an email. I'm sure (well pretty sure) it...
Replies
12
Views
8,378
Back
Top Bottom