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.

It seems writing a DateTime with with EasyDAClient.WriteItem() is not supported

More
28 Nov 2023 16:32 #12418 by ScottEwine
That was it, working now! Thank you very much!
The following user(s) said Thank You: support

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

More
28 Nov 2023 16:14 #12417 by support
Hello.

The DateTime you pass into this method must be in UTC: Use ToUniversalTime or SpecifyKind method as needed.

The error message is not good enough, and we will fix in the next version.

Best regards
The following user(s) said Thank You: ScottEwine

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

More
28 Nov 2023 13:13 #12414 by ScottEwine
I am trying to write a value to my historian with a DateTime (which I guess makes it HDA, not DA) and it gives an obscure error.

Message: "timestamp"

I guess this means writing a date/time with the value is not supported, as that would be HDA? Do you have a tool that supports HDA?

static DAVtq WriteOPCDAVtq(string MachineName, string ServerName, string ItemID, object value, DateTime dateTime)
{
EasyDAClient easyDAClient1 = new EasyDAClient();

try
{
easyDAClient1.WriteItem(MachineName, ServerName, ItemID, value, dateTime, 192);
}
catch (Exception Ex)
{
Console.WriteLine(Ex.Message);

LogError(Ex);
}

return null;
}




Attachments:

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

Moderators: support
Time to create page: 0.061 seconds