Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 4 out of 5     Rate this Document

Behavior of a Locked GPIB-ENET Box Upon Ethernet Connection Failure

Hardware: GPIB>>External Controllers/Convertors>>GPIB-ENET

Problem:
A feature of the GPIB-ENET is the ability to lock out other IP addresses (i.e., other computers), so that only one IP address can use the GPIB-ENET until it unlocks the box. What will happen to my locked GPIB-ENET box if the ethernet connection is suddenly lost?

Solution:
When the GPIB-ENET sees that the connection that locked it has closed, it automatically unlocks itself.

UNIX operating systems typically close connections properly for processes that have died or been killed. This insures that the GPIB-ENET will be unlocked in the event of process failure.

The problem is with Windows operating systems. These operating systems typically do not properly close connections for processes that have died or been killed. If the connection breaks cleanly (e.g., you hit CTRL-ALT-DEL), even if the handles to the device are open at the time of breaking the connection, the boxes will unlock. However if the break is not clean( e.g., the cable is cut, the machine crashes, etc.), then the box has no way of knowing what happened and will remain in a locked state. The only way to unlock a GPIB-ENET that has been locked by a process that died is to reset it (i.e., cycle the power).

The iblock function blocks other processes from accessing the specified GPIB-ENET board or device. You can release the lock by calling the ibunlock function with the same board or device descriptor.

By default, processes return an ELCK (21) error when they attempt to use a board or device locked by another process. You can specify that processes block instead of returning an error by making the following function call:
    ibconfig (boardOrDevice, IbcBlockIfLocked, 1);
There is no timeout on the process block.

In general, the iblock function should be used to gain critical access to a GPIB-ENET board or device when multiple processes might be accessing it at the same time. When the GPIB-ENET is locked, the GPIB driver guarantees that subsequent calls made to the GPIB-ENET are completed without interruption.

For more information on iblock and ibunlock see the Related Links section below.


Related Links:
KnowledgeBase 1RHCPQPH: Accessing a GPIB-ENET from Different Computers at the Same Time
KnowledgeBase 3C09NH3F: GPIB Error Codes and Common Solutions (Part 3)

Attachments:





Report Date: 01/30/1998
Last Updated: 07/01/2008
Document ID: 15TATTPV

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit