dathlin / opcuahelper Goto Github PK
View Code? Open in Web Editor NEW一个通用的opc ua客户端类库,基于.net 4.6.1创建,基于官方opc ua基金会跨平台库创建,封装了节点读写,批量节点读写,引用读取,特性读取,历史数据读取,方法调用,节点订阅,批量订阅等操作。还提供了一个节点浏览器工具。
License: GNU Lesser General Public License v3.0
一个通用的opc ua客户端类库,基于.net 4.6.1创建,基于官方opc ua基金会跨平台库创建,封装了节点读写,批量节点读写,引用读取,特性读取,历史数据读取,方法调用,节点订阅,批量订阅等操作。还提供了一个节点浏览器工具。
License: GNU Lesser General Public License v3.0
请问如何生成客户端的证书,找不到证书在哪,代码里的哪部分可以生成证书
找不到方法:“Opc.Ua.StatusCode Opc.Ua.Client.Session.Close(Int32)”。
IsConnected属性只是对连接调用的一个记忆,不能实时反应服务器的状态,
建议添加:ServerState属性
在 private void Session_KeepAlive(Session session, KeepAliveEventArgs e)函数中添加或修改:
if (e != null && m_session != null)
{
ServerState = e.CurrentState;//设置服务器状态
if (ServiceResult.IsBad(e.Status))
...
opcUaClient.AddSubscription("A", tags[0], SubCallback); opcUaClient.AddSubscription("B", tags[1], SubCallback); var subs = opcUaClient.Session.Subscriptions; subs.First().MonitoredItems.First().SamplingInterval = 1000; subs.First().PublishingInterval = 1000;
设置 Subscription的PublishingInterval属性 或者 MonitoredItem的SamplingInterval属性都不管用,请问下如何解决?
using (OpcUaHelper.Forms.FormBrowseServer form = new FormBrowseServer())
{
form.ShowDialog();
}
在地址上填上我本地的OPC UA server 地址,点击Connect(我的OPC server是Prosys OPC UA Simulation Server), 出现以下错误,请帮忙看看,谢谢!!
System.Reflection.TargetInvocationException
HResult=0x80131604
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at WindowsFormsApp.Form1.Button1_Click(Object sender, EventArgs e) in C:\Users\bingdeng tan\source\repos\WindowsFormsApp1\WindowsFormsApp1\Form1.cs:line 90
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WindowsFormsApp.Program.Main() in C:\Users\bingdeng tan\source\repos\WindowsFormsApp1\WindowsFormsApp1\Program.cs:line 19
Inner Exception 1:
InvalidCastException: Cannot cast an absolute ExpandedNodeId to a NodeId. Use
ExpandedNodeId.ToNodeId instead.
请问下再demo项目里面 订阅后,没有执行callback回调,会是什么原因呢
获取子节点过多会陷入死循环,OpcUaHelper.FormUtils第487行:
‘revisedContiuationPoints = continuationPoints;’
应该改为:
‘continuationPoints = revisedContiuationPoints’
如何获取所有节点数据类型
没有添加节点的方法吗
连接kepware server 时无法连接,报错:
ApplicationCertificate must be specified.
请大神分析一下原因,谢谢
订阅数据,客户端应该怎么设置订阅刷新的频率?
应修改为:
public override string ToString()
{
return (Error ? "[异常]" : "[正常]") + Time.ToString(" yyyy-MM-dd HH:mm:ss ") + Text;
}
如题,我使用ReadNoteAttributes() 方法,读取 说明,总是为空值,应该怎么处理
您好:
在使用OpcUaHelper.Tool查詢variable的時候發現如果opc server的variable太多
會無法讀取,測試了一下超過50個以上就會出現這個狀況
想問一下有沒有什麼解法?
照著說明寫了一個方法去遍歷節點嘗試
public static void fore(OpcUaClient m_OpcUaClient,string opcid)
{
try
{
ReferenceDescription[] references = m_OpcUaClient.BrowseNodeReference(opcid);
ReferenceDescription[] reff = m_OpcUaClient.BrowseNodeReference("");
foreach (var item in references)
{
if (item.NodeClass.ToString() == "Object")
{
i++;
Console.WriteLine(i);
Console.Write(string.Format("{0,-30}", item.NodeClass));
Console.Write(string.Format("{0,-30}", item.BrowseName));
Console.Write(string.Format("{0,-20}", item.DisplayName));
Console.WriteLine(string.Format("{0,-20}", item.NodeId.ToString()));
fore(m_OpcUaClient, item.NodeId.ToString());
}
else if(item.NodeClass.ToString() == "Variable")
{
i++;
Console.WriteLine(i);
Console.Write(string.Format("{0,-30}", item.NodeClass));
Console.Write(string.Format("{0,-30}", item.BrowseName));
Console.Write(string.Format("{0,-20}", item.DisplayName));
Console.WriteLine(string.Format("{0,-20}", item.NodeId.ToString()));
}
else { Console.WriteLine("未知的class"); }
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
出現了以下錯誤
System.NullReferenceException: 並未將物件參考設定為物件的執行個體。 於 OpcUaHelper.OpcUaClient.BrowseNodeReference(String tag) 於 ConsoleApp1.Program.fore(OpcUaClient m_OpcUaClient, String opcid) 於 D:\wo rkspace\OpcUaHelper-master\ConsoleApp1\Program.cs: 行 72
为什么订阅的时候 内存一直增加?
EXCEPTION (ServiceResultException) |
BadSecureChannelClosed |
SERVICE RESULT (BadSecureChannelClosed) |
SERVICE RESULT (BadTcpSecureChannelUnknown) |
Could not verify security on response. |
SERVICE RESULT (BadTcpSecureChannelUnknown) |
Token #13 has expired. Lifetime=03:51:43.500 |
Hello dathlin:
非常感谢你提供的 OPC UA库,对于学习和开发非常有帮助。有一个问题想请教一下
我在使用 UaExpert(一款常用的OPC UA 软件) 作为Opc Ua client 测试时,发现他会提供一个Event View的窗口,具体功能如下:
“ This document type can be used to subscribe to events and alarms of the UA server. It supports the selection of event fields and can acknowledge and confirm alarms. It also supports reading of historical event data for a given time period.”
通过这个窗口,我可以抓取到所连接的设备的报警,提示等信息。
我想问下 目前 OpcUaHelper 是否也提供了 Event &Alarm 的开发接口或者方法那? 如果有 可否提供一些 reference 作参考
非常感谢
就是对一组数据的批量刷新,批量更新的类,譬如在实际的客户端,在某一个当前页面,可能只更新30个特定变量,在另一个页面又是另一些特定变量,用组对数据进行管理可进一步简化读写操作。
我在本项目的基础上实现了一个简单的,思路类似如下:
DataItem.cs用于存储当前读取到的单个变量,最重要的是public void Refresh(DataValue dataValue)
DataGroup.cs对批量数据进行管理:
public DataGroupBase(List<string> keyList, List<string> tagList, OpcUaClient opcUaClient)
存储变量:
public Dictionary<string,DataItemBindable> Data { get;private set; }
而
public virtual async Task<FeedbackInfo> ReadAsync()
和
public virtual async Task<FeedbackInfo> WriteAsync()
对Data进行批量操作
而订阅更新的关键代码:
Data[itemKey].Refresh(notification.Value);
外部访问 Data[keyName]
目前这种方式用在WPF中非常方便,DataItem实现了数据通知(NET Standard不能实现,必须另创建一个库),在XAML中的控件只需要简单的
进行绑定,并指向KeyName即可(Word1为变量在字典中的Key):
<TextBox Text="{Binding Data[Word1].Value,Mode=TwoWay}"/>
希望公开一个可以读取并转换自定义数据ExtensionObject的方法 ,https://github.com/OPCFoundation/UA-.NETStandard/blob/master/Stack/Opc.Ua.Core/Types/Encoders/BinaryDecoder.cs
首先向大佬致敬,另外想请教一下NoId中的ns是什么样一个规则?用的是KepServer做OPC UA的服务器;
Hi:
我开发了一款客户端软件,连接的OPCUA server是使用labview编写的。我在程序启动时,建立了单态的opcua 客户端,在程序运行时出现此错误。这并未触发ReconnectStarting事件,与此同时在使用Uaexpert客户端进行测试时并未出现此问题。
06/06/2023 17:33:04.253 KEEP ALIVE LATE: 0.0102529s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5271
06/06/2023 17:33:04.269 KEEP ALIVE LATE: 0.0097328s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5292
06/06/2023 17:33:04.284 KEEP ALIVE LATE: 0.0079604s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5313
06/06/2023 17:33:04.314 KEEP ALIVE LATE: 0.0089844s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5355
06/06/2023 17:33:04.330 KEEP ALIVE LATE: 0.0080157s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5376
06/06/2023 17:33:04.335 Session: Unexpected error invoking KeepAliveCallback.
MissingMethodException '找不到方法:“Void Opc.Ua.Client.SessionReconnectHandler..ctor()”。'
06/06/2023 17:33:04.346 KEEP ALIVE LATE: 0.0073916s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5397
06/06/2023 17:33:04.361 KEEP ALIVE LATE: 0.0040681s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5418
06/06/2023 17:33:04.377 KEEP ALIVE LATE: 0.0110701s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5439
06/06/2023 17:33:04.393 Session RECONNECT starting.
06/06/2023 17:33:04.393 KEEP ALIVE LATE: 0.0093491s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5460
06/06/2023 17:33:04.393 Session REPLACING channel.
06/06/2023 17:33:04.395 TransportChannel RECONNECT: Reconnecting to opc.tcp://192.168.110.31:8888/.
06/06/2023 17:33:04.395 ChannelId 0: in Connecting state.
06/06/2023 17:33:04.401 ChannelId 0: in Opening state.
06/06/2023 17:33:04.401 ChannelId 0: Token #0 created. CreatedAt=09:33:04.401. Lifetime=-1.
06/06/2023 17:33:04.404 Security Policy: http://opcfoundation.org/UA/SecurityPolicy#None
06/06/2023 17:33:04.405 Sender Certificate: (none)
06/06/2023 17:33:04.405 SECURE CHANNEL CREATED [.NET Standard ClientChannel UA-TCP 1.4.371.91] [ID=55] Connected To: opc.tcp://192.168.110.31:8888/ [None/None/Binary]
06/06/2023 17:33:04.405 ChannelId 55: Token #1 activated. CreatedAt=09:33:04.401. Lifetime=3600000.
06/06/2023 17:33:04.406 ChannelId 55: in Open state.
06/06/2023 17:33:04.406 ChannelId 55: Token Expiry 06/06/2023 10:33:04, renewal scheduled in 2699996 ms.
06/06/2023 17:33:04.406 CLIENTCHANNEL SOCKET CONNECTED: 0086B698, ChannelId=55
06/06/2023 17:33:04.406 ChannelId 54: in Closing state.
06/06/2023 17:33:04.409 ChannelId 54: Force reconnect reason=BadConnectionClosed 'Remote side closed connection'
06/06/2023 17:33:04.410 Publish #278906, Reconnecting=True, Error: BadSecureChannelClosed
06/06/2023 17:33:04.411 Publish abandoned after error due to reconnect: BadSecureChannelClosed
略
06/06/2023 17:33:05.028 Publish #279430, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:05.027 Publish #279429, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:04.941 KEEP ALIVE LATE: 0.3378851s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=42/5076
06/06/2023 17:33:09.108 Publish #284353, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.109 Publish #284354, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.111 Publish #284358, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.112 Publish #284364, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.113 Publish #284359, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.113 Publish #284365, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.112 Publish #284363, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.112 Publish #284361, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.101 Publish #284344, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.110 Publish #284357, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.108 KEEP ALIVE LATE: 4.5045293s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=34/287
06/06/2023 17:33:09.112 Publish #284360, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.107 Publish #284351, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.110 Publish #284356, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.105 Publish #284349, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.073 Publish #284302, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.112 Publish #284362, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.106 Publish #284350, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.093 Publish #284331, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.104 Publish #284348, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.137 KEEP ALIVE LATE: 0.0052507s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=2/279
06/06/2023 17:33:09.258 Session: Unexpected error invoking KeepAliveCallback.
MissingMethodException '找不到方法:“Void Opc.Ua.Client.SessionReconnectHandler..ctor()”。'
06/06/2023 17:33:09.076 Publish #284304, Reconnecting=False, Error: BadSecureChannelClosed
06/06/2023 17:33:09.268 KEEP ALIVE LATE: 0.009973s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=59/189
06/06/2023 17:33:09.284 KEEP ALIVE LATE: 0.0112905s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/210
怎么设置连接时的安全策略
Hello,
is it possible to read a structure UDT Element with this library? I mean with a return type connected to the UDT in the PLC definition?
首先非常感谢作者,提供如此好用的封装和示例
是否可以考虑增加ReadNodeAsync的非泛型方法呢?毕竟生产实际中还是有不少返回值不确定的并且读取单个节点的需求诶!
基于网络的数据读写,异步操作是非常重要的,这里依照项目中的其他代码修改了一个类似的:
public Task<List> WriteNodeAsync(string[] tags, object[] values)
{
WriteValueCollection valuesToWrite = new WriteValueCollection();
for (int i = 0; i < tags.Length; i++)
{
if (i < values.Length)
{
WriteValue valueToWrite = new WriteValue()
{
NodeId = new NodeId(tags[i]),
AttributeId = Attributes.Value
};
valueToWrite.Value.Value = values[i];
valueToWrite.Value.StatusCode = StatusCodes.Good;
valueToWrite.Value.ServerTimestamp = DateTime.MinValue;
valueToWrite.Value.SourceTimestamp = DateTime.MinValue;
valuesToWrite.Add(valueToWrite);
}
}
// Wrap the WriteAsync logic in a TaskCompletionSource, so we can use C# async/await syntax to call it:
var taskCompletionSource = new TaskCompletionSource<List<bool>>();
m_session.BeginWrite(
requestHeader: null,
nodesToWrite: valuesToWrite,
callback: ar =>
{
var response = m_session.EndWrite(
result: ar,
results: out StatusCodeCollection results,
diagnosticInfos: out DiagnosticInfoCollection diag);
try
{
ClientBase.ValidateResponse(results, valuesToWrite);
ClientBase.ValidateDiagnosticInfos(diag, valuesToWrite);
List<bool> retList = new List<bool>();
foreach(var item in results)
{
retList.Add(StatusCode.IsGood(item));
}
taskCompletionSource.SetResult(retList);
}
catch (Exception ex)
{
taskCompletionSource.TrySetException(ex);
}
},
asyncState: null);
return taskCompletionSource.Task;
}
比方说服务器所在应用程序有一个生成试验报告的功能客户端调用这个生成试验报告,怎么将生成的报告传输给客户端。用什么方式可以实现吗
"Timeout must be greater than zero.\r\n参数名: timeout"} System.Exception {System.ArgumentException
在private void Session_KeepAlive(Session session, KeepAliveEventArgs e)函数中的
if (ServiceResult.IsBad(e.Status))
{
//这里面的提示至少延迟15秒
}
//添加类似如下(延迟3秒):
else
{
// update status.
UpdateStatus(false, e.CurrentTime, " Server Status:"
+ e.CurrentState+" Address:[{0}]", session.Endpoint.EndpointUrl);
}
严重性 代码 说明 项目 文件 行 禁止显示状态
警告 未能找到引用的组件“System.Xml.ReaderWriter”。 OpcUaHelper
警告 未能找到引用的组件“System.Threading.Tasks.Extensions”。 OpcUaHelper
警告 未能找到引用的组件“System.Text.Encodings.Web”。 OpcUaHelper
警告 未能找到引用的组件“System.Security.Cryptography.X509Certificates”。 OpcUaHelper
警告 未能找到引用的组件“System.Security.Cryptography.Primitives”。 OpcUaHelper
警告 未能找到引用的组件“System.Security.Cryptography.Encoding”。 OpcUaHelper
警告 未能找到引用的组件“System.Security.Cryptography.Algorithms”。 OpcUaHelper
警告 未能找到引用的组件“System.Runtime.InteropServices.RuntimeInformation”。 OpcUaHelper
警告 未能找到引用的组件“System.Runtime.CompilerServices.Unsafe”。 OpcUaHelper
警告 未能找到引用的组件“System.Reflection.Metadata”。 OpcUaHelper
警告 未能找到引用的组件“System.Numerics.Vectors”。 OpcUaHelper
警告 未能找到引用的组件“System.Net.Sockets”。 OpcUaHelper
警告 未能找到引用的组件“System.Net.Http”。 OpcUaHelper
警告 未能找到引用的组件“System.IO.FileSystem”。 OpcUaHelper
警告 未能找到引用的组件“System.IO.FileSystem.Primitives”。 OpcUaHelper
警告 未能找到引用的组件“System.IO.Compression”。 OpcUaHelper
警告 未能找到引用的组件“System.IO.Compression.ZipFile”。 OpcUaHelper
警告 未能找到引用的组件“System.Globalization.Calendars”。 OpcUaHelper
警告 未能找到引用的组件“System.Diagnostics.DiagnosticSource”。 OpcUaHelper
警告 未能找到引用的组件“System.Console”。 OpcUaHelper
警告 未能找到引用的组件“System.Collections.Immutable”。 OpcUaHelper
警告 未能找到引用的组件“System.Buffers”。 OpcUaHelper
警告 未能找到引用的组件“Opc.Ua.Server”。 OpcUaHelper
警告 未能找到引用的组件“Opc.Ua.Gds.Server.Common”。 OpcUaHelper
警告 未能找到引用的组件“Opc.Ua.Gds.Client.Common”。 OpcUaHelper
警告 未能找到引用的组件“Opc.Ua.Core”。 OpcUaHelper
警告 未能找到引用的组件“Opc.Ua.Configuration”。 OpcUaHelper
警告 未能找到引用的组件“Opc.Ua.Client”。 OpcUaHelper
警告 未能找到引用的组件“Newtonsoft.Json”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Win32.Primitives”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Net.Http.Headers”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.Primitives”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.PlatformAbstractions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.Options”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.ObjectPool”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.Logging”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.Logging.Abstractions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.FileSystemGlobbing”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.FileProviders.Physical”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.FileProviders.Abstractions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.DependencyInjection”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.DependencyInjection.Abstractions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.Configuration”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.Configuration.EnvironmentVariables”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.Extensions.Configuration.Abstractions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.WebUtilities”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Server.Kestrel”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Server.Kestrel.Https”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Http”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Http.Features”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Http.Extensions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Http.Abstractions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Hosting”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Hosting.Server.Abstractions”。 OpcUaHelper
警告 未能找到引用的组件“Microsoft.AspNetCore.Hosting.Abstractions”。 OpcUaHelper
警告 未能找到引用的组件“BouncyCastle.Crypto”。 OpcUaHelper
Hi:
我开发了一款客户端软件,连接的OPCUA server是使用labview编写的。我在程序启动时,建立了单态的opcua 客户端,在程序运行时出现此错误。
06/06/2023 17:28:28.347 KEEP ALIVE LATE: 0.0094888s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5333
06/06/2023 17:28:28.347 Publish #104091, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.349 Publish #104090, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.349 Publish #104087, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.349 PUBLISH #104090 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.348 Publish #104083, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.350 PUBLISH - Did not send another publish request. GoodPublishRequestCount=21, MinPublishRequestCount=21
06/06/2023 17:28:28.350 PUBLISH #104083 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.349 PUBLISH #104087 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.349 Publish #104085, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.349 Publish #104084, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.350 Publish #104086, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.351 PUBLISH #104084 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.351 PUBLISH - Did not send another publish request. GoodPublishRequestCount=21, MinPublishRequestCount=21
06/06/2023 17:28:28.349 PUBLISH #104091 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.351 PUBLISH #104085 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.350 Publish #104089, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.352 PUBLISH - Did not send another publish request. GoodPublishRequestCount=21, MinPublishRequestCount=21
06/06/2023 17:28:28.353 PUBLISH #104089 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.350 PUBLISH - Did not send another publish request. GoodPublishRequestCount=21, MinPublishRequestCount=21
06/06/2023 17:28:28.351 PUBLISH #104086 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.348 Publish #104088, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.355 PUBLISH #104088 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.355 PUBLISH - Did not send another publish request. GoodPublishRequestCount=24, MinPublishRequestCount=21
06/06/2023 17:28:28.361 KEEP ALIVE LATE: 0.00602s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=25/5350
06/06/2023 17:28:28.362 Publish #104101, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.362 Publish #104098, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.362 Publish #104102, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.364 Publish #104093, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.363 Publish #104100, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.364 PUBLISH #104093 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.365 PUBLISH #104100 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.364 Publish #104095, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.364 Publish #104096, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.365 PUBLISH #104095 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.365 PUBLISH - Did not send another publish request. GoodPublishRequestCount=25, MinPublishRequestCount=21
06/06/2023 17:28:28.364 PUBLISH #104102 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.366 PUBLISH #104096 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.363 Publish #104097, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.364 PUBLISH #104098 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.364 Publish #104094, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.363 PUBLISH #104101 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.365 PUBLISH - Did not send another publish request. GoodPublishRequestCount=25, MinPublishRequestCount=21
06/06/2023 17:28:28.367 PUBLISH #104097 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.368 PUBLISH #104094 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.368 Publish #104099, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.366 PUBLISH - Did not send another publish request. GoodPublishRequestCount=25, MinPublishRequestCount=21
06/06/2023 17:28:28.376 PUBLISH #104099 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.364 Publish #104092, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.364 Publish #104103, Reconnecting=False, Error: BadRequestTimeout
06/06/2023 17:28:28.377 PUBLISH #104092 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.378 PUBLISH - Did not send another publish request. GoodPublishRequestCount=26, MinPublishRequestCount=21
06/06/2023 17:28:28.378 PUBLISH - Did not send another publish request. GoodPublishRequestCount=26, MinPublishRequestCount=21
06/06/2023 17:28:28.378 PUBLISH #104103 - Unhandled error BadRequestTimeout during Publish.
BadRequestTimeout 'BadRequestTimeout'
06/06/2023 17:28:28.379 PUBLISH - Did not send another publish request. GoodPublishRequestCount=27, MinPublishRequestCount=21
06/06/2023 17:28:28.394 KEEP ALIVE LATE: 0.0107359s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5386
06/06/2023 17:28:28.409 KEEP ALIVE LATE: 0.0091924s, EndpointUrl=opc.tcp://192.168.110.31:8888/, RequestCount=21/5407
Previous versions worked, but when using the latest tool, there was an "SHA1 signed certificates are not trusted" error when logging in anonymously. What should I do?
我通过subscription来订阅一个第三方opc ua server(KepserverEX 6.4)上的数据,共10个node,
每个node每隔100ms产生一个值,该值通过函数来生成,是递增的,这样能确保每个周期都有数据
通知到subscription;
但奇怪的是,不管server安装在局域网内的另一台机子上还是本机上,subscription订阅到的数据
都有缺失;作为对照,使用了java编译的另一个ua客户端来订阅数据,收到的数据是齐全的,同时,server本地存储的数据也是齐全的。
所以,我不确定是是不是opc foundation提供的库有问题。不知道您有没有测试过相关的性能。
谢谢解答!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.