Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Connect a PLC M262 with AWS (Amazon Web Services) or any other cloud service

Modicon PAC Forum

A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Industrial Automation
  • Modicon PAC Forum
  • Connect a PLC M262 with AWS (Amazon Web Services) or any other cloud service
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
MatthewM
Lt. Commander MatthewM
8
RoozeeR
Lt. Commander RoozeeR Lt. Commander
7
Trinxs1
Lt. Commander Trinxs1 Lt. Commander
6
ciupol
Lieutenant ciupol
6
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Modicon PAC Forum
ltorraka
Crewman ltorraka
Crewman

Posted: ‎2022-05-24 10:11 AM

2 Likes
12
4999
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-05-24 10:11 AM

Connect a PLC M262 with AWS (Amazon Web Services) or any other cloud service

Hello automation community, in the last days I have been trying to connect a PLC M262 to the amazon cloud  (AWS) using the protocol MQTT. 

 

I already have succes communicating the PLC M262 with a local server using Node Red via MQTT protocol. However when I try to connect directly to the cloud (AWS) it won't work. 

 

Can someone help me! I will appreciate your help.

 

Regards.

Labels
  • Labels:
  • Cybersecurity
  • Smart Design & Engineering
  • Tags:
  • english
  • español
  • mqtt
  • server
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 12
SteveAndjic
Ensign SteveAndjic Ensign
Ensign

Posted: ‎2022-06-30 03:09 PM

1 Like
10
4738
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-30 03:09 PM

Hello

 

When you are trying to connect are you using the MQTT client in the M262. If so what type of error are you getting?

 

To connect to AWS it will require you to have a current digital certificate. Same will be with AZURE and other cloud services. You will need to make sure the certificates are not sitting in the quarantine section of your PLC and copy them into the trusted section. 

 

I have a few sample templates available also that can connect to Cloud services and MQTT brokers, but some will still require you to have the digital certificate.

 

If you like you can send me you email and I can email some How to's

 

Regards

 

Steve

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

ltorraka
Crewman ltorraka
Crewman

Posted: ‎2022-07-13 01:00 PM

In response to SteveAndjic
0 Likes
5
4714
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-07-13 01:00 PM

Hi Steve,

 

I'm using the MQTT Handling Example and I enter the data to visu_main,
image.png
 
I'm using the TrustedOnly certificate verification (TLS) . I copy the certificates from AWS into the trusted section in the security screen. Also I copy the RootCA1, public and private key in the trusted section.
 
I need to know how to get the ip address from AWS to introduce it to the MQTT Client block or how to introduce the end point in the MQTT client block from AWS, an example in the next picture.
 
5478fc6b-84c9-4f52-b93a-963cba2e5d67.png
I believe that my problem is in the ip address, however AWS does not give me an Ip Address, instead an endpoint (URL).
 
Thank you for your help
Regards
 
Lennin.
  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

SteveAndjic
Ensign SteveAndjic Ensign
Ensign

Posted: ‎2022-07-13 11:00 PM

In response to ltorraka
1 Like
4
4703
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-07-13 11:00 PM

Hi Lennin

 

You will need to use the DNS client in Machine Expert. Make sure you have the library loaded.

 

I have built one with structed Text but you can use the Function block version

 

My working DNS

 

// DNS CLIENT
fbDnsClient : TCPUDP.FB_DnsClient;
xEnableDnsClient : BOOL := TRUE;
xFirstCycle : BOOL := FALSE;
xExecuteDnsClient : BOOL := FALSE;
sDnsServerIpAdr : STRING(15) := '8.8.8.8';
uiDnsServerPort : UINT := 53;
sDomainName : STRING(255) := 'cnm-ih-na.azure-devices.net';
sIpAdrMapping : STRING(15);
dwDnsTTL : DWORD;

 

 

xExecuteDnsClient := xFirstCycle;
fbDnsClient
(
i_xEnable := xEnableDnsClient,
i_xExecute := xExecuteDnsClient,
i_sDnsServerIP := sDnsServerIpAdr,
i_uiDnsServerPort := uiDnsServerPort,
i_sDomainName := sDomainName
);

xFirstCycle := TRUE;

IF fbDnsClient.q_xDone THEN
xFirstCycle := FALSE;
xExecuteDnsClient := FALSE;
END_IF

IF fbDnsClient.q_xError THEN
xEnableDnsClient := FALSE;
ELSE
xEnableDnsClient := TRUE;
END_IF

sIpAdrMapping := fbDnsClient.q_astDnsAddressInfo[0].sIpAddress;
dwDnsTTL := fbDnsClient.q_astDnsAddressInfo[0].dwTTL;

 

This will resolve your URL and give you an IP address.

 

I also have a template for MQTT to cloud services with inbuilt DNS available if you need it but it doesn't use the example file you have used.

 

Regards

 

Steve

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

ltorraka
Crewman ltorraka
Crewman

Posted: ‎2022-07-14 08:36 AM

In response to SteveAndjic
0 Likes
3
4691
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-07-14 08:36 AM

Hi Steve,

 

I really appreciate your help. I will follow the steps and let you know if it works. Can you send me the template for MQTT to cloud services with inbuilt DNS?

 

Here is my email: ltorraka@falconingenieria.com

 

Regards

Lennin

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

SteveAndjic
Ensign SteveAndjic Ensign
Ensign

Posted: ‎2022-07-17 03:22 PM

In response to ltorraka
0 Likes
2
4626
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-07-17 03:22 PM

Hi Lennin

 

I have sent you an email with the template. AS mentioned in the email this template is used to connect to AZURE for our Machine Advisor platform.

 

You will only need to change your credentials to suit your login and the URL in the DNS client to resolve an IP. It will automatically load the IP into the MQTT client

 

Regards

 

Steve

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Luke_
Luke_
Cadet

Posted: ‎2022-11-22 09:15 PM

In response to SteveAndjic
0 Likes
1
4234
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-11-22 09:15 PM

Hi Steve,

 

Thank you for providing that information, would you mind also sending me a copy of that Azure template?

 

I have direct messaged you my email.

 

I would really appreciate it.

 

Thank you,

 

Luke.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

SteveAndjic
Ensign SteveAndjic Ensign
Ensign

Posted: ‎2022-11-22 09:39 PM

In response to Luke_
0 Likes
0
4228
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-11-22 09:39 PM

Hi Luke

 

Email has been sent

 

regards

 

Steve

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

ksBOT
Crewman ksBOT
Crewman

Posted: ‎2023-05-03 11:54 PM

In response to SteveAndjic
0 Likes
3
3603
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-05-03 11:54 PM

Hi,

Does this mean that you can connect and publish to server using Server certificate, cleint key and client certificate, or do you still rely on username/password?

Can you email your MQTT to cloud services template aswell?

email: ks@blueoceantechnology.no

 

For context:
I am using Machine Expert 2.0 SWP 1.
I have used the MQTT example from Schneider and modified it so that it does not require an IP address and accepts the server certificate and client certificate.
I do not know where to place the client key and the error message I get is "CertificateNoKey".

 

Best regards

 

Kristoffer

  • Tags:
  • AWS
  • certificate
  • key
  • M262
  • ME2.0
  • mqtt
Reply

Link copied. Please paste this link to share this article on your social media post.

SteveAndjic
Ensign SteveAndjic Ensign
Ensign

Posted: ‎2023-05-07 03:30 PM

In response to ksBOT
0 Likes
2
3584
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-05-07 03:30 PM

Hi Kristoffer 

 

what MQTT port are you using? port 1883 or 8883?

 

Also you need to make sure your certificates are not getting quarantined. If so you will need to make them trusted in the PLC

 

Regards

 

Steve

Reply

Link copied. Please paste this link to share this article on your social media post.

ksBOT
Crewman ksBOT
Crewman

Posted: ‎2023-05-07 11:29 PM

In response to SteveAndjic
0 Likes
1
3567
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-05-07 11:29 PM

Hi,

 

I am using port 8883 as this is specified by customer.

 

I have put the Server certificate in the Trusted folder and the client certificate in Own certificates folder.

no certificates in the quarantined folder.

I will try placing both certificates in trusted folder.
Client key is not accepted in any of these folders.

 

Best regards,

Kristoffer

Reply

Link copied. Please paste this link to share this article on your social media post.

SteveAndjic
Ensign SteveAndjic Ensign
Ensign

Posted: ‎2023-05-07 11:48 PM

In response to ksBOT
0 Likes
0
3563
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-05-07 11:48 PM

Hi Kristoffer

 

I haven't played much with AWS but I dont think it would be much different to AZURE. The Client key needs to be authenticated in the MQTT credentials for the MQTT client.

 

You will need to create a variable that will allow you to enter the Client Key, or Client ID

SteveAndjic_0-1683528433304.png

Regards

 

Steve

Reply

Link copied. Please paste this link to share this article on your social media post.

aliyualhassan
aliyualhassan
Cadet

Posted: ‎2023-05-22 09:01 AM . Last Modified: ‎2023-05-26 03:15 AM

0 Likes
0
3459
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2023-05-22 09:01 AM . Last Modified: ‎2023-05-26 03:15 AM

I've been diving into the world of PLCs and cloud services myself, so I understand the excitement and challenges you're facing. Connecting a PLC M262 to AWS using MQTT sounds like an interesting project.
From your description, it seems like you've successfully connected the PLC M262 to a local server using Node Red and MQTT. However, when attempting a direct connection to AWS, you're facing some issues. It can be a bit tricky, but fear not!
One suggestion is to double-check your AWS setup, including the security groups, IAM roles, and MQTT configuration. It's also worth looking into AWS IoT Core, as it provides features specifically designed for IoT device connections.
By the way, since you're exploring AWS, I recently stumbled across some cool AWS certified courses online. They might come in handy for expanding your knowledge.

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of