LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP master (cRIO-9068) reading slave loops in parallel causing noncontinuable exception (0xc0000025)??

I've been developing an RT/FPGA application for a cRIO-9068 that needs to talk to 4 or 5 different Modbus devices. I've got a couple loops to read my Modbus RTU devices via the 9068's onboard RS232/485 ports, and then 3 more independent loops to read the Modbus TCP devices on the network. This particular development setup uses LabVIEW 2015 SP1 on a Win7 Professional SP1 laptop. I have accumulated a few different Modbus libraries over the years testing the pros and cons of each. 

 

The other day, I was modifying and testing some of those Modbus TCP loops and encountered a noncontinuable exception (0xc0000025) that crashed LV. I restarted/recovered and was greeted with a slew of dependency errors:

 

dependencies.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I figured since this class name turned up in multiple libraries, I probably have a duplicate, older library of some sort. The dependencies were very time-consuming to resolve, so I ended up just deleting one of the libraries in the file system window. After a lot of attempts, I finally got back into my RT_Target VI that runs the application, which in my experience is pure luck. I don't remember changing any VIs/subVIs to use new references from different libraries, and honestly didn't check. Long story short, I don't really know what just happened and can't discern it between a simple dependency mixup versus a major shortcoming in my code.

 

At the time, I was working on the parallel loops that query the slave devices (TCP):

 

multi.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I may be overthinking it, but is there anything wrong with communicating with these devices like this? Both loops use the same libraries/functions in this case, but the Modbus VIs are of course non-reentrant nor store data on shift registers to my knowledge, so anything I pass in comes from my own loops/shift registers. Should I still be managing multiple TCP slave device connections within the same loop? I feel like the application took a dump and started all this when I began testing the data these functions are returning. 

 

Right now I'm reevaluating the use of this library above anyway because it has a lot of locked VIs that I would like to modify MBAP headers for. One of my TCP slaves is a Modbus TCP/RTU gateway and I may need Unit ID to access/switch between its RTU devices if it doesn't systematically address them somehow in the MB range. 

 

0 Kudos
Message 1 of 4
(295 Views)
I want to provide some new information to this issue to sync up on where I'm at with this. Unfortunately, the issue remains substantial.
 
Since my original post, I installed the same LV2015 license/IDE over to a newer machine with Win10 to rule out any faulty hardware (or software/OS) issues. I am still getting this issue when even attempting to open the VI. I am not able to open the diagram to modify the code or run the VI. The most recent Exception code was still this:
 
dest2ko_0-1733338470281.png

 

 
I'd been running my RT/cRIO-9068 application from the LV IDE for quite a while on the old Win7 laptop I originally used. Everything had been fine. One day, when running it, I noticed a similar Exception crash the VI while it was running. I had been modifying some parallel loops and some of them utilized an old NI Modbus LLB for RTU communication, while others used the built-in, newer NI Modbus TCP libraries that get installed into the Program Files directory with the existing LV installation. While they all haven't been the exact same Exception code, they've all been similar types of Exceptions as far as I can remember. The only thought I had was that perhaps using multiple NI Modbus libraries combined in a single project could have been throwing off how it associates class data within the files/dependencies, but I've since removed the LLB-based RTU library and am only using 1 (the included one) since then. I can open my project usually, but when I open my UI application — just the VI / file, not even having a chance to run it! — that I intend to build into a distributable eventually to talk to the cRIO, it almost always crashes. What's also peculiar, is that it doesn't usually crash when I open the UI VI file bare from Windows Explorer and let LV load it without association to the LVproject. The other part of switching laptops was in hopes that just maybe this issue was old and faulty laptop hardware issues and wouldn't persist along the way, but that clearly is not the case. 
 
So.. in summary:
- New laptop (Win7 --> Win10, more memory, more storage)
- Fresh install of LabVIEW 2015
- Rebuilt project one loop at a time and have removed concurrent Modbus libraries and consolidated the use to one library
- Stopped all unused NI services in Windows 
 
 
0 Kudos
Message 2 of 4
(65 Views)

####
#Date: Wed, Dec 4, 2024 1:16:52 PM
#OSName: Windows 10 Enterprise
#OSVers: 10.0
#OSBuild: 19045
#AppName: LabVIEW
#Version: 15.0.1f10 32-bit
#AppKind: FDS
#AppModDate: 1/01/2017 20:02 GMT
#LabVIEW Base Address: 0x00400000


InitExecSystem() call to GetCurrProcessNumProcessors() reports: 8 processors
InitExecSystem() call to GetNumProcessors() reports: 8 processors
InitExecSystem() will use: 8 processors
starting LabVIEW Execution System 2 Thread 0 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]
starting LabVIEW Execution System 2 Thread 1 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]
starting LabVIEW Execution System 2 Thread 2 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]
starting LabVIEW Execution System 2 Thread 3 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]
starting LabVIEW Execution System 2 Thread 4 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]
starting LabVIEW Execution System 2 Thread 5 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]
starting LabVIEW Execution System 2 Thread 6 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]
starting LabVIEW Execution System 2 Thread 7 , capacity: 24 at [3816184614.23401310, (13:16:54.234013081 2024:12:04)]

<DEBUG_OUTPUT>
12/4/2024 1:28:33.544 PM
Crash 0x00000000: Crash caught by NIER
File Unknown(0) : Crash 0x00000000: Crash caught by NIER
minidump id: 8f2158e4-ad96-4e1f-97e6-246359a6216f
ExceptionCode: 0xC0000025

</DEBUG_OUTPUT>
0x74991632 - nierInterface <unknown> + 0
0x749964E4 - nierInterface <unknown> + 0
0x749959F4 - nierInterface <unknown> + 0
0x7417CCD5 - MSVCR90 <unknown> + 0
0x01816103 - <unknown> <unknown> + 0
0x018164B7 - <unknown> <unknown> + 0
0x01840BC7 - <unknown> <unknown> + 0
0x018146BD - <unknown> <unknown> + 0
0x010177CA - <unknown> <unknown> + 0
0x0101914E - <unknown> <unknown> + 0
0x0155337C - <unknown> <unknown> + 0
0x0155770C - <unknown> <unknown> + 0
0x0155779E - <unknown> <unknown> + 0
0x00D12824 - <unknown> <unknown> + 0
0x00E28993 - <unknown> <unknown> + 0
0x00D12824 - <unknown> <unknown> + 0
0x00E28993 - <unknown> <unknown> + 0
0x00D12824 - <unknown> <unknown> + 0
0x00E28993 - <unknown> <unknown> + 0
0x00D12824 - <unknown> <unknown> + 0
0x0097B43E - <unknown> <unknown> + 0
0x0097C6FD - <unknown> <unknown> + 0
0x00F8A500 - <unknown> <unknown> + 0
0x010AB2B2 - <unknown> <unknown> + 0
0x00F87CB2 - <unknown> <unknown> + 0
0x00F8811B - <unknown> <unknown> + 0
0x00F88B93 - <unknown> <unknown> + 0
0x01838081 - <unknown> <unknown> + 0
0x012654CD - <unknown> <unknown> + 0
0x01287CEA - <unknown> <unknown> + 0
0x01288256 - <unknown> <unknown> + 0
0x012FF755 - <unknown> <unknown> + 0
0x01300AC5 - <unknown> <unknown> + 0
0x13DEAA47 - lvMax <unknown> + 0
0x13DEA8A2 - lvMax <unknown> + 0
0x01265DF4 - <unknown> <unknown> + 0
*** Dumping Bread Crumb Stack ***
*** LabVIEW Base Address: 0x00400000 ***
#** prop types: "C:\Source\NI\Automated Fuel - MRU\gui\Production.vi"
#** Loading: "C:\Source\NI\Automated Fuel - MRU\gui\Production.vi"
*** End Dump ***

 
 

lvlog above.

dmp available.

0 Kudos
Message 3 of 4
(63 Views)

You obviously had installed two different versions of the NI Modbus Library, that installed into two separate paths. As they are basically the same library with some changes, the VIs are mostly having the same names. And somehow during your edits you started to reference VIs from the other library, possibly by selecting a VI from the "wrong" place. That starts to pull in the dependencies of that VI and since they are class based pretty much pulls in the whole class, clashing with the other class being already used.

 

While properly configured VIPM packages could prevent that from happening, by specifying that they are not compatible to an older version of that package, so that the user is forced to remove the old package first, NI was not entirely familiar with all the features of VIPM at the time they created this package and most likely overlooked that possibility or the need for using it when they changed the target location in the LabVIEW directory.

 

The conclusion is: Make sure you always only have one version installed of any particular library. And be aware that some libraries may choose to use a different library name rather arbitrarily, making it impossible for VIPM to detect that it should remove a previous installation before installing the new one, without the package specifying that it is incompatible with the earlier package installation.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(50 Views)