10-24-2007 06:47 AM
Cmdr = RstFifo // reset the fifo
Cfg = CCEN // only 8 byte transfert
Cnt0 = 0xFB // the twos cmpl of 5 in to the cnts reg
Cnt1 = 0xff
Cmdr = GO // start the transfert
Imr1 = Err // enable error
Imr0 = Glint // enable imr1 and imr0 interrupt
Imr3 = Done | Nff | Stop // enable some interrupt
followed by data transfer
Is anything missing.
Regarding read,I am reading FIFO untill NEf is cleared.
Suggestions awaited.
Jennnifer
10-24-2007
01:25 PM
- last edited on
08-19-2025
12:06 PM
by
Content Cleaner
10-29-2007 04:17 AM
10-30-2007
09:01 AM
- last edited on
08-19-2025
12:07 PM
by
Content Cleaner
Jennifer,
Sometimes it can be really difficult to debug a problem like this. Looking at some of our examples, we also continuously Read from the fifo until it is empty.
The functions that you would be interested in include GPIB_PROG_IO, Setup_TNT_IO, and Read_Word.
I hope this helps.
Steven T.
11-07-2007 01:22 AM
Hi
I am facing a dificulty with done bit during GPIB write operation of tnt5002.The done bit sets only once ie first time write.i have configured the gfifo as 8 bit wide.I poll on the done bit to proceed to the termination phase after the cpu transfer expires .The gpib read operation is happening fine now and done bit sets at the end of each transfer, as in the when gpib transfer count expires.
when i attempt gpib write more times the program gets hang due to done bit not getting set. The settings done in the CFg register for write is as shown.
tlchlte=1,ccen=1,a/b=0,16/8=0.
Am i missing some setting.kindly suggest.
Jennifer
11-08-2007 09:58 AM
Hello Jennifer,
Here is an excerpt from the TNT4882 manual:
For GPIB writes, the TNT4882 sets the DONE bit if the transfer count has expired and
the Listening GPIB devices have accepted the last byte of the transfer.
When you get to the point of checking if the transfer is complete (after you have arleady shoved all of the data into the FIFOs), check the count. Also check on the listener side of the GPIB to see if the listener received all data into its buffer. It is possible that the listener was performing some type of a hold-off because its buffer was full.
Please check these things to make sure everything else in the picture is working. The TNT5002 should set the done bit automatically when these two conditions occur.
Steven
11-12-2007 12:01 AM
Hello Steven,
Thanks alot for the prompt reply.
What u have suggested me to do is absolutely correct.The done bit sets only when the transfer count expires and in my case this is happening only during the first time write.During the next time the cfg registers are not getting incremented and it seems to be the problem that the listener is performing some type of hold off,but how do we rectify the problem.Is it possible to resolve the issue from the tnt side as it is managedby the controller itself.
Awaiting your reply.Kindly suggest.
Jennifer
11-12-2007 12:01 AM
Hello Steven,
Thanks alot for the prompt reply.
What u have suggested me to do is absolutely correct.The done bit sets only when the transfer count expires and in my case this is happening only during the first time write.During the next time the cfg registers are not getting incremented and it seems to be the problem that the listener is performing some type of hold off,but how do we rectify the problem.Is it possible to resolve the issue from the tnt side as it is managedby the controller itself.
Awaiting your reply.Kindly suggest.
Jennifer
11-12-2007 01:32 PM
Jennifer,
You say that this problem happens the second time that you write. Does the GPIB controller perform addressing between your instrument's writes (is it addressed as talker again and then readdress the listeners)?
If the answer is no, the TNT5002 is probably causing the listener to prematurely stop reading. This could be done by the talker sending the EOS byte or asserting EOI. If the listener is only reading once, it will only get the message before EOS or EOI happens.
If the answer is yes, then the problem is completely on the listener side. Since this problem is on the listener side, the TNT5002 can't do anything until the listener hold-off is fixed. The controller could do several things like sending a device clear command, but you may not have access to the program on the controller.
I hope this helps.
Steven T.
12-04-2007 11:18 PM