ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

取消
显示结果 
搜索替代 
您的意思是: 

.NET error 1172 in LV

已解决!
转到解答

    I'm trying to use .NET in LV 2013 on W7-64bit to monitor things like the CPU and RAM usage.  I found some examples on the forums which were great help.  I've got my program running, and it works on two different machines.  However, when I move it to a third machine (all three are Dell laptops), it throws error 1172.  (I've saved the error messages as the defaults on the attached VI.)

    The attached VI is trivial:  It merely tries to load the constructor for two different performance monitors.  This example works fine on the first two laptops and gives the error on the third.  We checked that the third laptop has the exact same version of .NET as the other two (4.5.2), and applied all Windows updates.  Does anyone have any ideas on how to track this down further?

Thanks,

    DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 项奖励
1 条消息(共 7 条)
4,277 次查看

The error indicates an issue with the registry around the performance counters. I would check that you can monitor the counters you are looking for normally in the Performance Monitor application.

0 项奖励
2 条消息(共 7 条)
4,248 次查看

In this most basic example that Dave wrote, we are trying to access total %cpu... as you can see in the attaced jpg... It works fine from Perfmon on the computer in question... but the VI still throws the 1172 error.  

 

PerfMonCapture.jpg

0 项奖励
3 条消息(共 7 条)
4,197 次查看

Just to be clear, flipper66 and I are working on the same system, so his observation that the perfom works but the .NET VI doesn't is specifically in reference to the troubled systetm.

 

Despite his observation, it would still seem likely that there is some issue with the target computer and how certain .NET things are installed.  Is there a way to re-initialize or re-install the relevant NET components on that computer?

 

DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 项奖励
4 条消息(共 7 条)
4,182 次查看

A few more observations:

When we start Performance Monitor on the troublesome computer, it pops up a warning:

"Unabel to add these counters:

\Memory\Availalble MBytes

\Memory\% Committed Bytes In Use

\Memory\Cache Faults/sec

\Memory\Cache Faults/sec

\PhysicalDisk(*)\% Idle Time

\PhysicalDisk(*)\Avg. Disk Queue Length

\Network Interface(*)\Bytes Total/sec"

 

However, as Phil mentioned, some counters DO work in Performance Monitor on that computer, but throw the error with the LV test VI.  And the same counters work fine with the LV test VI on another computer.

 

This seems to be looking more and more like a Windows issue, not LV, but if anyone has ideas about how to clean up the .NET on the target computer, that would be great information.


Thanks,

    Dave

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 项奖励
5 条消息(共 7 条)
4,169 次查看
解答
接受人 Dave_Thomson

We found a link on MS's website that describes how to rebuild the performance counters.  That seems to have helped.

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 项奖励
6 条消息(共 7 条)
4,155 次查看

@tyk007  Thanks for pointing us to the registry...

 

Your comment in combination with the Error message Dave posted about the error on Perfmon startup (which I somehow misssed) led us to the solution.  Basically we had to manually rebuild the Performance Coutner Library Values using the info here:

 

https://support.microsoft.com/en-us/kb/300956/en-us

0 项奖励
7 条消息(共 7 条)
4,151 次查看