GPIB and Multithreading

If you use multithreading, you can call GPIB functions from more than one thread at the same time. To be truly multithreaded safe, you must use version 1.2 or later of the NI-488.2M driver.

Although previous versions of the drivers support multithreading, they do not support ThreadIbsta, ThreadIberr, ThreadIbcnt, or ThreadIbcntl. You need these functions to obtain thread-specific status values when calling GPIB functions from more than one thread. The global status variables ibsta, iberr, ibcnt, and ibcntl are not reliable in this case because the GPIB/GPIB 488.2 Library maintains them on a per process basis.