Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Calibration Expiration Date from DAQmx (C# / .NET)

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. 

 

maryq_2-1707758558929.png

 

However when using it on my script, the following error shows up: 

maryq_1-1707758480267.png

Has anybody use this function before? Any recommendations on how to obtain the Calibration Expiration Date from a DAQ module?

 

0 Kudos
Message 1 of 2
(200 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(110 Views)