Code:
# 配置Log,通道
LOGInfoTest = CreateLogInfo()
channel_path = "Targets/Controller/User Channels/User Channel 1"
LogChannelTest = CreateLogChannel(channel_path)
# log触发器类型
PyLogInfoTriggerTypeTest = PyLogInfoTriggerType()
PyLogInfoTriggerTypeTest.none = 0
SetLogInfoTrigger(LOGInfoTest, PyLogInfoTriggerTypeTest)
LogChannel2 = [LogChannelTest]
# 设置通道
SetLogInfoChannels(LOGInfoTest, LogChannel2)
configuration_name = "C:\\Users\\admin\\Desktop\\test\\Logging Specification.nivslspec"
workspace.StartDataLogging(configuration_name, LOGInfoTest)
Error info:
niveristand.legacy.NIVeriStand.NIVeriStandException: Consult NI VeriStand help for error code 0xfffb4e3c error message 由于内部错误,服务器无法处理该请求。有关该错误的详细信息,请打开服务器上的 IncludeExceptionDetailInFaults (从 ServiceBehaviorAttribute 或从 配置行为)以便将异常信息发送回客户端,或打开对每个 Microsoft .NET Framework SDK 文档的跟踪并检查服务器跟踪日志。