04-05-2023
08:48 PM
- last edited on
08-12-2026
01:16 PM
by
Content Cleaner
I can only find .NET API to get/set device channel from this sample: https://www.ni.com/docs/zh-CN/bundle/veristand-net-api-reference/page/vsnetapis/c_exec_deploying.html, but how to get/set custom device channel value? Could you give me a C# example? like below screenshot:MicrosoftTeams-image.png
04-05-2023
09:17 PM
- last edited on
08-12-2026
01:16 PM
by
Content Cleaner
The channels from the custom devices are exposed as the channels just like any other device. In fact, DAQ, XNET or other devices are the custom devices natively shipped by VeriStand. They have the same architecture as the user-defined custom devices.
If you are using TestStand to control VeriStand, you should consider using ASAM XIL Steps for NI TestStand.
04-05-2023 09:49 PM
like the below C# code, it doesn't work for Custom Device Channel.
var factory = new Factory();
var workspace = factory.GetIWorkspace2(gatewayIP);
workspace.ConnectToSystem(sineWavePath, true, timeout);
workspace.GetMultipleChannelValues(names.ToArray(), out double[] values);
workspace.SetSingleChannelValue(names[1], 300);
workspace.GetSingleChannelValue(names[1], out double newCurrentValue);