09-04-2008 02:50 PM
neo19,
Nothing in the code struck me as causing this problem. I would recommend performing debug prints or buffer captures that will allow you to get a trace for what is happening during the part of your application that does not work. It would be nice to find the exact register accesses that throw your program off.
Thanks,
Steven T.
09-09-2008 05:59 AM
Hello Steven,
Some news for me?
Thanks
Fabrice
09-11-2008 04:21 PM
Hello Fabrice,
Did you find which register accesses throw your program off? Do you know at which line your program fails?
Thanks for the info. Have a great day.
09-19-2008 01:42 AM
Hello Steven, O. Proulx,
I'm equiped with an IEEE GPIB analyser but I'm not a specialist in IEEE488.
Could you explain to me the method to find the trouble. Wich register should I monitor?
Best regards
Fabrice
09-24-2008 11:12 AM
Hello Neo19,
I would recommend monitoring the Addressing and ISR registers at different points in your program to verify that that the TNT4882 is addressed correctly and is in the correct states to respond. The registers I would be most interested in would be:
ADSR to get the addressing status of the chip (TA and LA bits)
ISR0 to find out if proper termination is set (NL and EOS bits)
ISR1 to find out if proper termination is happening (END RX)
ISR2 to see if the addressed state has changed
ISR3 to check the status fo the FIFOs (NFF and NEF)
This registers will help you track the state of the chip and help you understand what could be happening. You may notice that even after you load the FIFO with bytes to output that the FIFO never outputs them to the GPIB and NFF never becomes 0. This means that you are not using the correct FIFO (thats just an example).
I hope this helps,
Steven T.
07-10-2009 02:55 AM
Dear Steven,
I have some interesting news. With my old computer under WIN95 and my GPIB analyser :
with the option Readdress : the communication is ok with 2 successives writes :
TA0
UNL
LA16
DATA1
DATA2
...
END
TA0
UNL
LA16
DATA3
DATA4
...
END
without the option Readdress : the communication is not ok with 2 successives writes (Error ENOL):
TA0
UNL
LA16
DATA1
DATA2
...
END
DATA3
DATA4
...
END
The option Readdress could be find on the different parameters of the IEEE488 GPIB card.
Do you know if it's possible under WINXP with your last Drivers to find somewhere the option Readdress?
Is there a flag or something on the NAT7210 for the option Readdress.
Best regards
Fabrice
07-13-2009 10:56 AM
Hello Neo19,
Yes, there is an option to perform readdressing on the bus for each communication in the NI-488.2 driver. With this option enabled, when multiple commands are sent to an instrument, the instrument is readdressed to accept the new command each time.
the option is IbcREADDR in the ibconfig function. Set this option to true and your issue should be fixed.
However another way around it is to constantly monitor the addressing lines. As long as the instrument detects that it is addressed to listen, it should attempt to read. If the read times out, then just ignore the error and attempt to read again if you are still addressed as listener.
I have helped several other users of the NI ASICs with this problem. Please search the forum for these.
Thanks,
Steven T.
07-15-2009 02:13 AM
Dear Steven.
About the option IbcREADDR my problem is that our customers only want to test our instuments with NI Communicators. THey told me that National instrument is the reference so it's anormal if the instrument doesn't communicate correctly with NI communicators. They buy the software to communicate with our instrument. But they don't have the possibility to correct it.
I'm looking for the other post on the forums for the second possibility.
Best regards,
Fabrice
07-15-2009 06:36 AM
Dear Steven,
I search on the forum other post about the NAT7210 and error ENOL. I found to topics :
- http://forums.ni.com/ni/board/message?board.id=140&message.id=22981&query.id=1013290#M22981
- http://forums.ni.com/ni/board/message?board.id=140&message.id=7824&query.id=1013290
but not resolved. I've found some other topics but with the TNT
I've checked again the bit LA and TA but everything seems OK.
More details to help me?
Best regards
Fabrice
07-16-2009 09:10 AM
This post had the same problem.
http://forums.ni.com/ni/board/message?board.id=140&message.id=36729
Here is the basic idea.
The NI-488.2 driver does not perform re-addressing if the GPIB is already addressed correctly. So if "*SRE 16" is sent and then "*IDN?" is sent, the instrument would only be addressed once at the beginning.
Some instruments only accept the first message and do not attempt to read again until their addressing is chnged (this is the issue you are running into). As long as the NAT7210 is addressed as listener, it should be attempting to read. This may cause time outs on the instrument if the controller is not sending multiple messages, but these can be safely ignored.
To do this, wait until the NAT7210 addressing changes. Then check teh ADSR register on the NAT7210. If it is listener, then inside of a loop you should keep attempting to read as long as the NAT7210 is addressed as listener.
Thanks,
Steven T.