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.

I want to write an array in c#.

More
03 Aug 2023 11:24 #11974 by support
Hello,
the code looks OK in principle.

Please post here the exception message you are getting. And, inside the exception object, there will be .InnerException. I need its message as well (and if there is non-null .InnerException, again - recursively).

Best regards

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

More
03 Aug 2023 01:35 - 03 Aug 2023 11:22 #11973 by Shin Hyun Jin
Hello.

I want to write an array.

My Tag is Word array[10] , Tag Name is "dataTest".

The data I want to write is
string[10] data = {"TE", "ST", "12", "34", "56", "78", "9"} // TEST123456789

 
private void WriteValue(string[] data)
{
try
{
opcClient1.WriteValue
(
$@"opc.tcp://localhost:49320/",
$@"ns=2;s=PLC.plc.dataTest",
data
);
}
catch(Exception ex)
{
Console.WriteLine(ex);
}
}
 
 

But I can't write data.
Please let me know if my code is wrong or how to call WriteValue.

Thank you.
Last edit: 03 Aug 2023 11:22 by support.

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

Moderators: support
Time to create page: 0.083 seconds