04-24-2017 11:27 AM
Does anyone know of a way to programmatically modify the "HDW Serial" property of a device in VeriStand, such as a DAQ card? This property is not available as a part of the .net System Definition API as far as I can tell.
Solved! Go to Solution.
04-25-2017 08:34 AM
You can try getting the base node type of that reference and then accessing specific properties by name. I haven't tested this code out, but you can try something similar to the following:
You'll just need to select the BaseNodeType from the drop down in your screenshot and then wire that into an invoke node with the GetStringProperty method.
04-25-2017 08:37 AM
The only thing is I need to be able to set that value not read it. I have a fix in the form of using the XML document API in LV to parse the sys def file and it works but it could be cleaner.
Perhaps though since that property probably isn't supposed to be manually modified, the parsing route is the only way.
04-25-2017 08:59 AM - edited 04-25-2017 08:59 AM
I believe SetStringProperty is also a method which may allow you that functionality. If not, the XML workaround is probably the best option for you.
04-28-2017 07:43 AM
Ah yes, I don't know how I missed that, I'll check that out.
04-28-2017 10:44 AM
A follow up question if you don't mind, the HDW serial property, that is auto populated by VS when you add a DAQ device. I'm assuming that serial corresponds to the "Device Serial Number" property available in the DAQmx API?
05-01-2017 03:24 PM
You're absolutely correct! By default, the HDW serial property will be populated with the serial number of your device. You can verify this by checking the result of the GetStringProperty call against the serial number of the device.