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.

Slow update of PLC

More
11 Oct 2016 10:07 #4443 by andis59
Replied by andis59 on topic Slow update of PLC
I have now tested with the valueType and it does not make any difference. So the problem lies in the OPC Server

Thanks for the help!

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

More
04 Oct 2016 16:12 #4422 by andis59
Replied by andis59 on topic Slow update of PLC
I test with the valueType and see if it makes any difference.
But I agree with you it's probably the Server.

Thanks for your reply!

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

More
04 Oct 2016 11:17 #4420 by support
Replied by support on topic Slow update of PLC
In terms of the code on your side, there is one issue that should be resolved first. It may have negative affect on the speed of Writes, although I would be surprised if that were so big. But it should be improved before we can possibly tell more:

You should also specify the type of the value to be written when creating the UAWriteValueArguments. OPC UA is strict about the types in Write, and it is not reliably possible to derive the UA type from the type of the value you write. Without a given type, the client must first Read the type from the server, which involves another roundtrip.

There are UAWriteValueArguments constructor overloads that accept a Type or a TypeCode as an argument.

I actually think your problem will be in something else, probably in the server, but this is a first point to rule out.

Best regards

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

More
04 Oct 2016 04:56 #4419 by andis59
Slow update of PLC was created by andis59
We have an OPC Client made using QuickOPC-UA and I think it's very slow!
We have the refresh set to 50 ms

The part that seems slow is the write! For every read the client will write the same value in a "new" tag.
E.g. The client reads tag Foo with value 1, it then write to the tag Bar with the same value. A safety thing (I'm told by the programmer which has left the building)

The feeling is that from the time the PLC sets the value to the value is written by the client it takes just about a second!
We have checked the time on the PLC!

We have a subscription on the tag and in the event handler we check that the tag is correct and then write its value to the response tag.

We are using MatrikonOPC UCS with Modbus plug-in and Mitsubishi PLC Plug-in (different machines)

The writing is done like this
SendMultipleValues(new[] { new UAWriteValueArguments(ServerEndPoint, GetNode(OPCSettings.OrvarCavityGrp, OPCSettings.OrvarCavity), value) });
 
public static void SendMultipleValues(UAWriteValueArguments[] arguments)
        {
            try
            {
                var sendResult = EasyUAClientWrite.WriteMultipleValues(arguments);
                if (Settings.Debug < (int)DebugLogLevel.Medium) return;
                var resultString = "OPCWorker - OPC WriteMultipleValues: \n";
                var iterator = 0;
                foreach (var item in sendResult)
                {
                    resultString += arguments[iterator].NodeDescriptor.ToString().Split('/').Last() + " = " + arguments[iterator].Value + " : " + item + "\n";
                    iterator++;
                }
                LogHelper.LogInfo(resultString);
            }
            catch (UAServiceException ex)
            {
                LogHelper.LogError(ex.Message);
                if (Settings.Debug >= (int)DebugLogLevel.Medium)
                    LogHelper.LogInfo("OPCWorker - Reset EasyUAClientWrite");
                EasyUAClientWrite.Reset();
 
                if (Settings.Debug >= (int)DebugLogLevel.Medium)
                    LogHelper.LogInfo("OPCWorker - Try to resend after reset...");
                var sendResult = EasyUAClientWrite.WriteMultipleValues(arguments);
                if (Settings.Debug >= (int)DebugLogLevel.Medium)
                {
                    var resultString = "OPCWorker - OPC WriteMultipleValues: \n";
                    var iterator = 0;
                    foreach (var item in sendResult)
                    {
                        resultString += arguments[iterator].NodeDescriptor.ToString().Split('/').Last() + " = " + arguments[iterator].Value + " : " + item + "\n";
                        iterator++;
                    }
                    LogHelper.LogInfo(resultString);
                }
            }
        }

Can anyone see something that would make the write slow?

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

Moderators: support
Time to create page: 0.047 seconds