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

Trouble Getting Data From a Modicon PLC With Unity Developer's Edition

Industry Automation and Control Forum

This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.

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
  • Industry Automation and Control Forum
  • Trouble Getting Data From a Modicon PLC With Unity Developer's Edition
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
Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
31
LeTomas
Lt. Commander LeTomas Lt. Commander
11
RoozeeR
Lt. Commander RoozeeR Lt. Commander
6
JerryBartlemay
Lieutenant JG JerryBartlemay Lieutenant JG
6
View All
Related Products
product field
Schneider Electric
EcoStruxure™ Control Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Industry Automation and Control Forum
calicontrols
calicontrols
Cadet

Posted: ‎2023-04-27 12:45 PM

0 Likes
0
722
  • 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-04-27 12:45 PM

Trouble Getting Data From a Modicon PLC With Unity Developer's Edition

Hello,

 

I am writing a .NET 6 console application that uses the Unity Developer's Edition (UDE) COM API to automate some Control Expert features. So far I have successfully used UDE to connect to a Modicon M340 PLC over TCP/IP, transfer the PLC's project to my PC, and save the project to my hard drive as an STU file. Next I am trying to save the PLC's data to my PC with UDE's IProject::SaveDataFromPLC method, but this method consistently returns an error.

 

The error is a System.Runtime.InteropServices.COMException that contains no information other than a hexadecimal error code: 0xE8A72CED. I could not find any information about this error code online. Microsoft's Error Lookup Tool returns the following:

 

# No results found for hex 0xe8a72ced / decimal -391697171
# anonymous HRESULT: Severity: FAILURE (1), Facility 0x8a7, Code 0x2ced
# for hex 0x2ced / decimal 11501
WSA_PNRP_CLOUD_NOT_FOUND p2p.h
# 1 matches found for "0xE8A72CED"

 

From my googling, WSA_PNRP_CLOUD_NOT_FOUND is related to peer-to-peer networking, but because the Error Lookup Tool says there were no results found for the full hex, I am unsure whether WSA_PNRP_CLOUD_NOT_FOUND is relevant.

 

My console application is written in C#, and I worry that I am passing invalid arguments to IProject::SaveDataFromPLC. Here is the method I wrote that takes the Control Expert project and a file path as arguments and invokes IProject::SaveDataFromPLC to save the project's data to the file path:

 

public virtual void SaveDataToDisk(IProject project, string resultDtxPath)
{
  int[] saveDataParameters = { 1, 0, 511, 1, 0, 1023, 1, 1 };
  object used;
  project.SaveDataFromPLC(resultDtxPath, saveDataParameters, out used);
}

 

This method is invoked after acquiring the write token to the project and saving the project STU to my hard drive. The error occurs in this method on the line that invokes project.SaveDataFromPLC.

 

Any advice on things I may be doing wrong or on other available methods to automate saving the data from a Modicon M340 PLC would be greatly appreciated.

 

Thank you!

Labels
  • Labels:
  • Smart Design & Engineering
  • Smart Operations
  • Tags:
  • english
Reply

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

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 0
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