Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

UNT UNLIs UNT and UNL needed in NI-488.2?


I am in the process of porting C code written for a Bull AIX to Linux.
The new Linux server is using the PCI express NI Gpib board.

In the old code untalk and unlisten is used frequently. In the process of porting the code it was discovered that most
of the equipment running on GPIB works fine with the old code, but we have one GPIB equipment that we have had
problems communicating with.
Removing the instances of untalk and unlisten solves the problem.

I have found this thread on NI forum stating that in NI488.2 unlisten and untalk is not necessary.

I have tried to find other sources stating the same without success.

Is there someone who can verify this.
Can this information be found in any documentation?

0 Kudos
Message 1 of 3
UNL is typically needed. It depends on what your code is doing.

There is exactly one talker on the bus at a time. If you address a new talker, the old one automatically stops being a talker. Therefore, under most situations, UNT is not necessary.

There are many listeners on the bus at a time. If you want someone to stop listening, you need to send the global UNL on the bus. If you address someone who is currently a listener to be a talker, they will become a talker. So, if you are a controller talking to one instrument, you never NEED to send UNL or UNT on the bus. However, most of the time you use UNL to stop listeners since that is the only safe way. When NI-488.2 uses device-level code, it automatically does a UNL at the beginning of transfer if the addressing is going to change on the bus. It does not put a UNT on the bus (except specifically after a serial poll, I believe).

0 Kudos
Message 2 of 3

All of my equipment on the GPIB bus are passive and do only respond
to calls made to them. None of them will start communicating by them self.

Before I made any change to the code I had a hard time communicating with this particular equipment. (Coax switch matrix)
It worked all the time to interactively communicate with the equipment.

So my first attempt was to remove the untalk/unlisten that was place between the first ibwrt and ibrd.
When I removed it I got contact immediately. I still had some untalk/unlisten left at the end of the communication function.
The other problem I had was that when I made a change to the matrix it would take about 1 minute before it made the change.

When I removed all the untalk/unlisten everything is working perfectly.

All of our equipment connected on the bus do have the same untalk/unlisten, with the difference that it happens to work
perfectly on them. I wonder why?

I will later decide, after some testing, if I will keep the untalk/unlisten in the rest of the code.

By the way, thanks for your quick reply.


0 Kudos
Message 3 of 3