02-12-2024 11:33 AM
I'm trying to obtain the calibration expiration date from a DAQ module (using the NationalInstruments.DAQmx reference on Visual Studio 2022 C#/.NET). According to the DAQmx Reference file, it can be obtained when using the "AIChannel.CalibrationExpirationDate" property.
However when using it on my script, the following error shows up:
Has anybody use this function before? Any recommendations on how to obtain the Calibration Expiration Date from a DAQ module?
02-27-2024 02:38 AM
The error message is quite clear: AIChannel is not a static object class and therefore accessing a property of that class requires a valid object. That's also quite logical. How would AIChannel class know which of multiple possible DAQ devices and which of the multiple possible channels on each device you want to access?
You need to create a channel by instantiating it, likely with some CreateChannel() method and then you can access the properties of that channel.