From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ibstop cross thread issue (Windows 7 vs Windows XP)

ibstop behaves diffrently. Product: NI-488.2 2.8.1 with NI-USB-HS

 

We have a system with multiple threads using asynchronous I/O.  One thread is a monitoring fail safe thread, should a condition require action, this thread will take control and shutdown the other threads and put the system to a "safe" state.  This fail-safe thread needs to stop all pending asynchronous I/O, and send GPIB commands as quickly as possible.

 

Under Windows 7 running on a core cpu, ibstop's behavior is such that it will cancel pending I/O in any other thread.  (ibstop executes and ibsta reports CMPL)

 

However, while retro testing we found that under Windows XP running on a Pentium 4 cpu with HT disabled, ibstop does not cancel pending I/O in other threads.  In fact, NI-SPY reports no errors, and ibstop does not set iberr or set ibsta with CMPL; In addition, executing an ibwrt from the fail safe after the ibstop  deadlocks all GPIB threads.

 

We do not know if this is due to operating system diffrences or core vs P4 that caused the NI-488.2 2.81. driver to behave diffrently.  We used C++; just in case it makes a diffrence we are using the ni4882.obj (vs the older GPIB-32.obj or GPIB.lib)

 

Can someone look into this ibstop issue on Windows XP?

 

(FYI, We have used GPIB for a number of years and would to think of ourselves to be near or at the expert level; we have written firmware for the TNT, 7210, 9914 type chips from NI and other vendors plus client software; we have a GPIB analyzer.)

0 Kudos
Message 1 of 9
(3,427 Views)

The interesting thing is ibstop does cancel pending I/O on a Windows XP virtual machine running on a Windows x64 host with a NI-USB-HS adapter connected.

0 Kudos
Message 2 of 9
(3,419 Views)

Tried the test on an alternate clean Windows XP install ni 488.2 2.8.1, and ibstop works across threads, ie ibsta shows CMPL for an I/O that was initiated from another thread.  Not sure what to think now...

0 Kudos
Message 3 of 9
(3,402 Views)

Hi s3,

 

What happens when you enable HT on the P4 computer? Does ibstop work then? Let me know.

 

Thanks,

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 9
(3,398 Views)

I tried it with both HT enabled & disabled (plus PAE), and ibstop worked correctly on the alternate P4

0 Kudos
Message 5 of 9
(3,393 Views)

Hi s3,

 

What's different between both of your P4s? Besides the NI-VISA install.

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(3,389 Views)

Of the Windows XP machines, the computer mfg & models are identical.  The only diffrence is one has a bit more hardware installed.

 

Clean Windows XP install has just 1 GPIB board: GPIB-USB-HS

 ibstop is failiing on the computer with 3 GPIB boards: GPIB-PCI, GPIB-PCI & GPIB-USB-HS

 

0 Kudos
Message 7 of 9
(3,311 Views)

Hi s3,

 

I am currently consulting R&D to find out why this is happening. I will let you know their response as soon as possible.

 

Regards,

 

Perry S.

Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(3,296 Views)

I think I figured out what is happening.  ibstop only terminates async IO requests & resyncronizes across threads for one board, not all the boards.

0 Kudos
Message 9 of 9
(3,291 Views)