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.

Best way of confirming that data has been received - resultArray.exception ?

More
29 Apr 2012 18:31 #838 by support

From: Zbynek Zahradnik
Sent: Saturday, March 24, 2012 9:28 AM
To: P.
Subject: RE: CS713A - Best way of confirming that data has been received - resultArray.exception ?
P.,

Yes, what you intend to do is the right way. Whether the fact that there is no exception actually indicates that the value has made it to the PLC partially depends on the implementation of the specific OPC Server, but for “normal” servers (as I expect the SimaticNET server is), this is indeed how they behave.

Best regards,
Zbynek Zahradnik, OPC Labs

From: P.
Sent: Saturday, March 24, 2012 9:13 AM
To: Zbynek Zahradnik
Subject: CS713A - Best way of confirming that data has been received - resultArray.exception ?

Zbynek

I am using the following code to send several items to a Siemens PLC. I would like to know the best way of confirming that the data had been received - If I were to check the resultArray[].exception property for every item at the end of this code is it a robust way of confirming that each item of data has been sent and received by the PLC?

OperationResult[] resultArray = opcDAClient.WriteMultipleItemValues

(new[]
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.lineSpeed", lineSpeed),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.blankSize", blankSize),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.coilWidth", coilWidth),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.palletSize", palletSize),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.layersToProduceFull", layersToProduceFull),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.coilPitch", coilPitch),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.blankPattern", blankPattern),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.layersToProducePart", layersToProducePart),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.totalLayersToProduce", totalLayersToProduce),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.fullPalletsReqd", fullPalletsReqd),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.coilGauge", coilGauge),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.totalBlanksToProduce", totalBlanksToProduce),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.blanksToPunch", blanksToPunch),
new DAItemValueArguments("", "OPC.SimaticNET.1", "SIMATIC 300 Station.CPU 317-2 PNDP(1).BCS TO PLC.toolPitch", toolPitch)
);


Regards

P.

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

Moderators: support
Time to create page: 0.052 seconds