Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

reading the CPTR for a PPoll result using a tnt5002

In the tnt5002 reference manual, page 3-76 describing the CPTR, It states

"Command Pass Through—The CPTR holds the results of
parallel polls. After starting a parallel poll, wait for ISR0[CO]
to set before reading the CPTR. CPTR also stores the last
command byte received.

Yet I find no reference to any CO bit in the ISR0 description?
How can I know when the CPTR holds the PPOLL results?

Thanks in advance
Mark

0 Kudos
Message 1 of 9
(4,553 Views)

dmarkh,

Sorry for the confusion, but it looks like this is a typographical error.  The TNT5002 chip is talker/listener only.  It can only respond when addressed by a GPIB controller.  Unfortuantley the TNT5002 cannot start parallel polls of instruments, that is something reserved for the CIC (Controller in Charge).  Different sections of the TNT5002 manual do show you how to respond to both serial and parallel polls.

I hope this helps.
Steven T.

0 Kudos
Message 2 of 9
(4,512 Views)
My TNT5002 is on an NI pci-gpib card that is the CIC and doing a PPOLL to a device. The section of the manual I refer to is describing when the response coming back from the device is valid and can be read from the CPTR. And as you say the manual has a typo in it. I'm looking for the "correction" to the manual. I'm not looking for how to respond to being PPOLL'd. I'm looking for how to know when the response from the device has made it's way into the CPTR of my CIC.

Thanks
Mark
0 Kudos
Message 3 of 9
(4,508 Views)
 

Mark,

I'm afraid that the TNT5002 is a Talker/Listener chip only.  It does not have the capability to be the controller in charge.  Please see the product page: https://www.ni.com/en-us/shop/model/tnt500x.html

The PCI-GPIB cards come with the TNT5004 ASIC that includes Talker/Listener/Controller capability.  Since this is a National Instruments board, it is only supported using the NI-488.2 drivers.  The driver includes an API that allows you to use all of the functionality of the TNT5004.  Is there a reason why you are not using the NI-488.2 driver?

Thanks,
Steven T.

0 Kudos
Message 4 of 9
(4,493 Views)
Steve,

Ah, there is the answer. I'm looking at the wrong manual all together. DUH!!! My eyes are not as good as they once were. Looking at the board more closely, it does have a 5004 chip. Age is a wonderfull thing. Thank you for seeing for me.

As far as why I'm not using the NI-488.2 driver, it's first because the API does NOT provide all the functionality I need and second I don't have the source for it so that I could make it do what I need. Or is there a way to get it? In my case I have to emulate some old legacy hardware that used the old Intel 8291/8292 chip set. I need to be able to pass the contents of the ISR's, ADSR, SPMR and such directly to legacy code running in an emulation (Linux userland). It's amazing how close the modern NI card is to these old legacy boards. It's also amazing how far I've actually gotten refering to the wrong manual. Now I'm off to find the correct manual?

I'm sorry if I wasted your time and again thanks for pointing out the obvious.

Mark
0 Kudos
Message 5 of 9
(4,459 Views)
 

Mark,

No problem at all.  You will not find a manual for the TNT5004 on our site.  The register set of this board is proprietary. From your previous post,
it sounds like you are bound to some legacy software that has some requirements that the NI-488.2 API does not allow (exposing interrupt
status registers).  You can purchase the DDK for the PCI-GPIB.  This is the source of a driver that has similar functionality to the NI-488.2
driver.  Since it is source, you will be able to add your own functions and hooks as you see fit.  This package has been used by customers to
develop drivers for the PCI-GPIB on unsupported operating systems.

 

I hope this helps,
Steven T.

0 Kudos
Message 6 of 9
(4,442 Views)
Steven, Thanks.

I didn't know about the DDK. Would it contain the TNT5004 manual?

Regards
Mark
0 Kudos
Message 7 of 9
(4,439 Views)
Mark,
 
It would not contain the reference manual for the TNT5004.  The original intent was to allow customers to port the driver to any operating system.  However, the source code for the TNT5004 io manager is included.  One of the .h files contains the names of the registers as well as the offsets (#define regname offset).  This information as well as the source code would show you how to perform certain actions. 
 
Your current problem with parallel polling could be solved by finding the parallel poll function in the DDK and tracing it down to the register writes.  The function names are very similar to the NI-488.2 function names.  You can get these by checking the Quick Reference Card for the NI-488.2 API.
 
 
I believe this could solve your problem without a manual.  And you would have code that actually works with the hardware.
 
Steven T.
0 Kudos
Message 8 of 9
(4,421 Views)
I'll have my purchasing dept order it asap.

Thanks again.
Mark
0 Kudos
Message 9 of 9
(4,418 Views)