A customer has written a small C# program to validate a communication with a Siemens SIMOTION D445 PLC.
This PLC is communicating through an OPC DA XML Server.
In its script, the customer explained me that he had to add an authentication in order to read the test variable:
System.Net.ICredentials myCredentials = new System.Net.NetworkCredential("simotion", "simotion");
He wants to use PcVue 12.0.10 to communicate with this PLC. Connection is working but mapping only display the first level of branches without any tags, probably because of authentication which is missing.
Do you know if there is a way to properly connect PcVue to an OPC server which requires authentication?
I can paste its C# code here for the example:
Service miniWebService = new Service();
RequestOptions requestOptions = new RequestOptions();
requestOptions.ClientRequestHandle = "";
requestOptions.LocaleID = "DE–AT";
requestOptions.RequestDeadlineSpecified = false;
requestOptions.ReturnDiagnosticInfo = false;
requestOptions.ReturnErrorText = false;
requestOptions.ReturnItemName = false;
requestOptions.ReturnItemPath = false;
requestOptions.ReturnItemTime = false;
ReadRequestItemList readRequestItemList = new ReadRequestItemList();
ReadRequestItem[] readRequestItems = new ReadRequestItem[1];
ReadRequestItem readRequestItem = new ReadRequestItem();
readRequestItem.ItemPath = "SIMOTION";
//nom de la variable disponible :
readRequestItem.ItemName = "unit/Global_Variable.Ex.Inf.ALM[1].G7.Name";
readRequestItems[0] = readRequestItem;
readRequestItemList.Items = readRequestItems;
ReplyItemList replyItemList;
OPCError[] OPCErrorList;
//serveur opcxml da :
miniWebService.Url = "http://169.254.11.22/soap/opcxml";
//user et mot de passe
System.Net.ICredentials myCredentials = new System.Net.NetworkCredential("simotion", "simotion");
miniWebService.Credentials = myCredentials;
miniWebService.PreAuthenticate = true;
System.Net.ServicePointManager.Expect100Continue = false;
//requete de lecture envoyée :
miniWebService.Read(requestOptions, readRequestItemList, out replyItemList, out OPCErrorList);
Do you know if there is a way to properly connect PcVue to an OPC server which requires authentication?
Hi Ludo,
If I understand correctly and if I read your code correctly you are asking for HTTP Basic Authentication or similar authentication types.
By now it is not implemented. See SPR #65932 for details.
Thank you for the SPR, it is exactly that.


