12-21-2023 09:59 AM
Have a system with 4 VXI chassis, all 4 use VXI-MXI-2 slot zero controllers and control PC uses a single PCI-MXI-2 card. The MXI-2 bus is daisy chained between the 4 chassis to the PCI-MXI-2 card. Control PC runs Windows 7 (32-bit) and has NI-VISA 5.4 installed. Currently have two separate applications/processes that both run at the same time. One process creates viSessions with instruments in 3 of the chassis, the other creates viSessions with instruments in the 4th chassis. viSessions to resources are mutually exclusive between the two processes but both interface through the same PCI-MXI-2 card.
The problem we've noticed is when both processes are performing several viOut16s/viIn16s, Windows will lockup (no display updates, cursor doesn't move) and the computer will reset a few minutes later. There is no current synchronization between processes - our first guess is to try to some kind of shared (interprocess) mutex but this will be difficult to implement due to the complexity of the applications.
Question is: Assuming the lockup is due to contention at the PCI-MXI-2 interface, is there any other way to ensure the two processes don't have 'collisions' when accessing the MXI-2 bus?
12-21-2023 03:26 PM
Can answer my own question. Created a global mutex (Windows CreateMutex) and waited/released around viOut16/viIn16 calls in both processes. This fixed the problem for us