Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Response to IDN with TNT5002

Hey Jennifer,
I do not believe that GPIB can be read on an interrupt base. Maybe if you can explain what you would like to do in detail, we can suggest another alternative.
Can Wong
0 Kudos
Message 11 of 14
(1,343 Views)

Jennifer,

It would not help very much to stop polling on NEF.  Interrupts are usually only used when detecting changes in addressing (talker or listener).  Once you know that the instrument is addressed as one of these (through an interrupt).  An ISR can momentarily disable interrupts, squelch it, and then call a function to deal with it.  The function would need to loop on NEF to see when bytes come in.  This is the recommended way per instructions in the TNT5002 and TNT4882 manuals.

I hope this helps,
Steven T.

0 Kudos
Message 12 of 14
(1,335 Views)
Hii!
 
Thanks alot for the quick response.
During a GPIB read  with tnt5002 how do we know the no of bytes which is going to be received by the device,as the done bit sets when the cnt value becomes zero,what value has to be put  to the cnt register?
My read operation functions well when i put the exact no  of bytes to be to the cnt register, the done bit sets after it receives that much no of bytes,but when i put the maximum no of bytes to be received it gives trouble with the done bit .
 
Kindly suggest a way out to the issue.
 
Regards
Jeniffer
 
 
0 Kudos
Message 13 of 14
(1,313 Views)

Hello Jennifer,

From page 4-11 from the TNT4882 manual under Premature Done:

For GPIB reads, the END interrupt usually causes TLCINT to assert. In this case, the
host interface should continue reading bytes from the FIFOs of the TNT4882 until the
FIFOs are empty. The DONE bit sets when the FIFOs are empty even if the GPIB
transfer count has not expired.

This describes how a Done can happen when the count does not expire.  Apparently it has to do with enabling interrupts exactly like you described a few posts ago (I must have misunderstood or overlooked this case).  If things are set correctly End will set if EOS or EOI is encountered.

END sets on - TNT5002 manual page 3-95 (describes all events that can trigger END)
EOS - TNT5002 manual page 3-83
EOI - TNT5002 manual 3-54 (will let you know if the most recently accepted byte had EOI asserted).

How were you expecting the communication to terminate early?  Have you seen these pages in the manual?  If you are having trouble with any of them please let me know and I would be happy to help.  If you are having problems please post the values of the relevant registers.  This will help us trace the problem.

Sorry for the mix-up,
Steven T.

 

 

0 Kudos
Message 14 of 14
(1,298 Views)