Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing NAT7210 with Microcontroller

Hello,
I have connected NAT7210 to PCI card and scanned for it in NI interface.
I'm getting instrument Enumeration failed.
Can anybody, please tell me what is going on ?
 
Thanks
Amarjit
0 Kudos
Message 1 of 22
(6,458 Views)

Hello Amarjeet,

If you are scanning for instruments from an NI GPIB board using NI-488.2, we can let you know what is happening under the hood and what is failing.  If you are getting no instruments on th bus, this means that the NAT7210 is not responding to its address.  Either it is not addressed correctly or was not initialized correctly by the firmware.  There is also a possibility of a hardware problem.  Please try writing and then reading the CNT0 register to make sure that your software is accessing the chip correctly.

The scan for instruments checks every primary address (pad) and secondary address (sad) to see if there are any instruments there.  It starts at pad 0 and addresses it to listen.  After a short time, it checks to see if the NRFD line has transitioned to accept data as expected.  If the NRFD line does not transition, then the controller knows that there are no instruments at that address.  It then repeats this process for every pad and sad.

If the scan is not showing any instruments, this means that it isn't responding to its address. After initialization and setting the address, it will respond to the addressing and should show up in the list of instruments.  You should focus on these parts of your firmware if you can access the registers correctly.

Thanks,
Steven T.

0 Kudos
Message 2 of 22
(6,437 Views)
Hi Amarjit,

Could you please give me more information on how you are interfacing with the PCI card? The pinouts for the NAT7210 can be found here. The reference manual for the NAT7210 can be found here. What is the "NI Interface" you were using to try and access the device?
Rasheel
0 Kudos
Message 3 of 22
(6,436 Views)
Thanks Steven......
 
we are now communicating with NAT7210......
 
Russel,we used MAX for scanning the device and it the configuration was pin to pin w.r.t  PCI card. we are now able to communicate with the PC....
0 Kudos
Message 4 of 22
(6,418 Views)

Hello, Mr Amarjit

 

Do you have some news about your project. I'm working on interfacing a NAT7210 with a Microcontroller and I have some peoblems.

 

The detection is OK.

 

But when I send differents commands, the first time the command is OK and the second time I have an error ENOL and I need to send again the command.

 

At the moment, I don't know if it's a software or hardware problem. What do you use for drivers? SN75161 + SN75160 ?

 

Best regards

 

Fabrice

 

 

0 Kudos
Message 5 of 22
(6,258 Views)

Hi Fabrice,

 

This thread is over a month old, and hopefully Mr Amarjit responds. But in the meantime, could you give us a little bit more information about the behavior that you are seeing? What are the commands you are sending? Does it always happen on the second command? What happens with a different set of commands?

Rasheel
0 Kudos
Message 6 of 22
(6,233 Views)
Hello Rasheel, The card I use is integrated in all of our instruments.The instrument can be controlled through IEEE488 with simply commands like : MHF, AHF or request like : ID? 

But since many times, we have problems of communication under "NI 488.2 communicator":

     - If I send a request for example "ID?" + read everything is Ok      - If I send only commands, the second time I send the command I have an error ENOL. In attached file you can find a copy of a screen of NI spy NI-488.2 communicator and the schematic of my card. Best regards, Fabrice
Download All
0 Kudos
Message 7 of 22
(6,222 Views)

Hi neo19,

 

Give me some time to take a look at this. I will let you know if I need further information, thanks!

Rasheel
0 Kudos
Message 8 of 22
(6,204 Views)

neo19,

 

Thanks for the information.  In the Programmer's reference manual of the TNT4882, there is some information about how to do transfers (applies to incoming and outgoing).  One of the steps is that the instrument needs to wait until it is addressed before changing to its read or write routine.  

 

Does your program/firmware do this?

 

From your description it looks like your program goes into listener mode correctly and receives the message.  However, it looks like it may parse the command, find that the command expects a response, and goes straight into a talker (write) routine.  It should queue up the response and save the response in memory in case it gets addressed as talker in the future.

 

If this is not the case, you should verify in your firmware that the instrument gets addressed as listener multiple times and is able to read the data each time.  Please reply back with any additional information.  There could be additional steps to narrow this down.

 

Thanks,

Steven T.

0 Kudos
Message 9 of 22
(6,154 Views)

Hello Steven,

 

In my software, as you can see in attached files, the micro-controller wait until the instrument is addressed (TA? or LA?).

 

I debug the software step by step and  when I send a command LA=1 and when I send a read it's TA=1.

 

What do you think about it?

 

Fabrice

0 Kudos
Message 10 of 22
(6,138 Views)