Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Read temperature of PXI-4461 card using .NET

Solved!
Go to solution
Is it possible to read the current temperature of the PXI-4461 using .NET calls similar to the way Measurement & Automation Explorer does on the Calibration tab?
0 Kudos
Message 1 of 8
(4,730 Views)
Solution
Accepted by topic author shuli

Hi Shuli,

Yes, you should be able to do that, that functionality is part of the DAQmx driver. A quick search of the .net help for “temperature” brings up the Device.Temperature Property. Take a look at the Device Class members list, this shows a lot of methods and property available on the Device class. Second from the bottom is Temperature. Hope this helps!

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(4,705 Views)

Matt,

Thanks for pointing me in the right direction. My initial quick search was only finding Task commands.

 

I couldn't figure out how to initialize Device until I fortunately found the solution in the help documentation. "You cannot instantiate the Device class directly. Instead, use the LoadDevice method to obtain an instance of the Device class."

0 Kudos
Message 3 of 8
(4,688 Views)

Hi Shuli,Matt I try to read the temperature within of PXI-4462 and PXI-4461 but  I think tath I am not in correct way, If you know if and how this is possible could you please push me in the right direction. thank you in advance for your help. I working wit C# Visual Studio and Mensuremente Studio.

0 Kudos
Message 4 of 8
(4,155 Views)

Hi Tapiam,

 

What Matt suggested was you try something like this:

 

DaqSystem.Local.LoadDevice("Dev1").Temperature; Dev1 should be the name of whatever device you're using as specified in MAX or as appears in DaqSystem.Local.Device. 

 

Hope this helps!

 

 

Sean Ferguson
Application Engineering Specialist | RF and Reconfigurable Test
0 Kudos
Message 5 of 8
(4,127 Views)

Hi Sean

Thank you for the information, it works properly, but just a little problem, when I try to run the app in the PXI. show this error: Could not load file or assembly  'NarionalInstrumen.common'  Ver:8.7.35.131.     I was checking in my PC, where I did the app and did not find the this version.  Do you know something about, how to fix it or where can find this version to install in my PXI?

Thank you in advance for your help 



 

 

0 Kudos
Message 6 of 8
(4,075 Views)

Hi Tapiam,

 

Is that the full context of the error? I found a similar issue in another discussion forum (linked here) where two or more versions of an assembly are being called. If you could, go through the KB linked there and post any further questions on that thread. Thanks!

Sean Ferguson
Application Engineering Specialist | RF and Reconfigurable Test
0 Kudos
Message 7 of 8
(4,056 Views)

Thanks a lot Sean F, we find how to fix it. just  update the Ver in the PXI. 

0 Kudos
Message 8 of 8
(4,045 Views)