Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

I have a multi-threaded muli-gpib interface application. Is it possible to have multiple threads call functions in the 488.2 V2.0 driver?

I'm experiencing problems when controlling multiple interfaces using multiple threads. Each thread attempts to communicate using their own device descriptor obtained from ibdev. During the process for a thread to communicate to a given GPIB/ENET box, it attempts to lock the box via iblck for the guarentee of an exclusive send/reply. This is proving to be unreliable for some reason. The iberr I'm getting is # 23 EHDL input handle is invalid. Any suggestions
0 Kudos
Message 1 of 3
(3,911 Views)
Hi,

I believe that the lock function of the ENET locks based on the unit descriptor. Although the lock will not work for thread synchronization, I think this is assuming you are using the same unit descriptor. I haven't tried using separate unit descriptors within the same process.

In any case, the iblck function is implemented only with the ENET/100. For the GPIB-ENET use the iblock and ibunlock functions.

Refer to the following KB:
Locking and Unlocking a GPIB-ENET

DiegoF
National Instruments.
0 Kudos
Message 2 of 3
(3,911 Views)
Hi,

By the way, for GPIB-ENET or any GPIB realated questions, you should post on the GPIB discussion forum.

CAN is a totally different communcation protocol.

DiegoF
National Instruments.
0 Kudos
Message 3 of 3
(3,911 Views)