https://www.automationdirect.com/productivity
(VID-P2-0025)
-Productivity has now added Secure PLC Email Messaging with DNS support.
This video details the process of setting up the email Client and triggering a email message from a Productivity PLC using Gmail.
List of Free and Public DNS Servers: https://www.lifewire.com/free-and-public-dns-servers-2626062
Our FREE Practical Guide to Programmable Logic Controllers eBook: https://www.automationdirect.com/ebooks/plc-handbook
Secure PLC Email messaging is now available in the latest version of the Productivity Programming suite. To be able to use this feature you must have installed Productivity programming suite v3.4 or higher and then load the latest firmware to the Productivity CPU. There are 3 parts to this setup. First is DNS. If your email server is using a naming convention, like this, and not a direct IP, you will need to setup DNS. This server is used to resolve the IP address of the name being used. To set it up, go into your hardware configuration and then select the CPU. Select the Ethernet port tab and here enter in the DNS server. I would advise using your ISP providers DNS but if you are unsure of what that is you could always use Google’s public DNS server You can also set this up in the CPU connection window, but I would advise setting it up here, as that makes this part of the PLC Project. Now that you have that setup, select ok. And then select here on the Mail accounts tab. You can have up to 4 accounts setup into your PLC project. If you look here, you will notice there is account templates for some of the more common email servers. If you don’t see your email provider here, select Custom and enter in the information provided by your email provider. I am setting up Gmail, so I will select here. So, give your account a name. This name will be used in the email instruction later. This template has already set up my service name, so if you are doing a custom setup where you will enter this in manually. The encryption and the port number are already set also. I really like these templates it makes this setup so much simpler. This certificate portion is used to verify the identity of the Email server. When we create this account here in our project, this certificate becomes part of our PLC project. When an email instruction is triggered device, the mail server certificates are validated as part of establishing the encrypted connection. Most cases using the Default certificate will work, for your application, especially for the templates provider here. Some organizational email accounts will require you to use a custom Certificate or No verification option. Enter in your user name and password. Hit ok and that completes the Email Client setup. Now let’s create a test email. I will create a triggering bit, for my email. Enter in the email instruction. A point here, before we get started, these fields you can place a tag or direct text. If you do enter in direct text, it must be inside of quotation marks. If it is not inside quotation marks, the software will believe it is a tag. I am going to select to use a structure. When I do this these fields get tags created for them that will be part of the structure like this. Now, select the email client we created before. Here I will enter in the from address as direct text. Making sure to include the quotation marks. I am going select to add the Error and event file and the log file And the Log file. These are the most recent files stored on the CPU’s external memory. For destination addresses I am going to enter in a tag. Now that you have that entered, select ok. I would advise changing all your strings to at least 64 characters. Now, for these I would go ahead and go with the max number of characters and I would also advise to make sure that these are retentive. Now, one thing I want you to make note of, is that both the Message and subject are strings and the max characters for these are 128. You will need to keep this in mind when creating your email messages. Select ok and let’s send this project to your CPU. Now that I have created the message, I am going to select the line the instruction is on and right click and add it to my data view. Give this tab a name. This is a feature I really love in Productivity, it really makes it easy to troubleshoot your code. All of the tags associated with this this rung are then added to this one Data View tab. Now go into your data view and select that tab. I am going to manually enter in the text for my subject, message and destination address. To create your string in ladder code just use the Pack string instruction. Now that I have this information entered I will send that to the PLC. And now Enable the instruction. Now we are going to see our instruction is in progress. And we have a success. If you do have an error this line will instruct you of the error’s cause. If you have any questions or comments on any feature of the Productivity PLC please feel free to comment below or call into our technical support team. Select here to see more videos on the Productivity platform. And make sure to select here to subscribe to our YouTube channel for upcoming products and solutions.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings