Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Unable to write data into S7-1500 PLC using DASSIDirect.

More
04 Jul 2023 07:02 #11868 by support
Hello.

I do not quite see the point of this question. Each system is different, and I do not know what parts your system consists of. Therefore I cannot answer whether there are settings that are relevant. I understand that you are in a position where you are trying to figure it out yourself, but I cannot do it for you.

For OPC DA to work, there are some requirements such as that OPC proxies/stub (OPC Core Components) need to be installed. And, if the communication is remote (client on a different computer from the server), there are DCOM settings (mainly related to security), which is an enormously complex matter. It makes totally no sense to start there, without knowing the error message. The error message might easily point you to a completely different direction/cause.

Regards

Please Log in or Create an account to join the conversation.

More
04 Jul 2023 06:24 #11867 by arunmanuel
Thank you.

I will have a look into that. I was just wondering if there are any settings that need to be done on the OPC side to ensure success. I couldn't find any user interface to view or configure the settings for OPC. Should there be something like that or does OPC just work as intended on installation?

Kinf regards

Please Log in or Create an account to join the conversation.

More
04 Jul 2023 05:41 #11866 by support
Hello.

In your code, there is this part:
            writeResults = OPCDAClient.WriteMultipleItemValues(writeItems)
            If Not writeResults Is Nothing Then
                'iterate through the array
                For i = LBound(writeResults) To UBound(writeResults)
                    If writeResults(i).Succeeded Then
                        'append our message with a "success"
                        strWriteValue.Append("Element " & i & ": success")
                    Else
                        strWriteValue.Append(writeResults(i).ErrorCode & ": " & writeResults(i).ErrorMessage)
                        writeError = True
                    End If
                    'add a carriage-return + linefeed to the message
                    strWriteValue.Append(vbCrLf)
                Next
            End If
 

When there is a problem with writing, the line
strWriteValue.Append(writeResults(i).ErrorCode & ": " & writeResults(i).ErrorMessage)

gets executed.

What we need to troubleshoot is the information from this line (error code and error message, which both get written to strWriteValue). I have not investigated how strWriteValue is used further, that's up to you. You need to debug the program or enhance the code, whatever, to obtain the error code/error message.

Regards

Please Log in or Create an account to join the conversation.

More
03 Jul 2023 23:01 #11865 by arunmanuel
Thank you for your reply.

I am attaching a txt file into which I have copied the code for the Recipe Selector VB Application. I hope this will provide some clarity.

Kind regards
Attachments:

Please Log in or Create an account to join the conversation.

More
03 Jul 2023 08:02 #11859 by support
Hello,

my understanding is that the failure is somewhere in WriteBatchToPLC method, but you only get back 'False' when it fails., There can be literally thousand of reasons for an error, and we need the actual error code/exception that caused it. You need to dig deeper into this method, and find where it calls on the the WriteXXXX methods on the EasyDAClient object. And either there is some code that allows you to obtain the exception details, or you will need to add that code.

If you do not know precisely what to do, try to locate the call to the actual WriteXXXX method on EasyDAClient, and post here the code around it, so that I can inspect how it does the error handling.

Best regards

Please Log in or Create an account to join the conversation.

More
03 Jul 2023 06:40 #11858 by arunmanuel
Hello to all the experts out there,

Hope you're all doing well.

I am pretty new to the concept of OPC and I hope you will forgive me if I say things that don't make sense, but I will try my best to explain my problem and the errors that I come across.

I have a VB Application that is supposed to write contents of a recipes in to datablocks of a S7-1500 PLC using QuickOPC. However, this does not happen, and the write fails whenever it is attempted. Using the EasyOPC.NET Demo Application, I have been able to read and write data to the datablocks in the PLC via ArchestrA.DASSIDirect.3. This PLC program, SCADA screens and VB application were not created by me. It was made by someone 10 years back on the S7-300 and I was tasked with migrating it to the S7-1500. So I may not be able to provide reasons with why the code and other elements are the way they are but I will try my best. I am attaching as many screenshots as I can to make the situation as clear as possible. Please let me know if you would like more information from my end to help me solve this problem.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.056 seconds