07-01-2008 06:34 PM
07-02-2008 01:58 PM - edited 07-02-2008 02:01 PM
Russp94037,
When I was reading your post, I imagined that holdoffs would be the thing that would help you. However it looks like you have already been down this road. However, I think this is the least of your worries.
<quote>Typically, NI spy reports a set of calls all that start and finish at the same reported time in milliseconds. I insert delays in the embedded system code to simulate hardware delays; but regardless of the RFD Holdoff settings I get the same fast execution reported by NI spy. The command traffic becomes garbled, and the embedded system reports command errors to the host.</quote>
1. So the embedded system (instrument) is not receiving the commands that are coming from the controller? Can you give an example of what your instrument is receiving and how it is different from what your instrumetn expects?
2. Is there any other strange behavior? Does the command garbling only happen under certain conditions?
I am much more concerned about the garbled data because, it indicates either race conditions or firmware that doesn't follow the instructions for transfers. In the TNT4882 guide, chapter 4 goes over some instructions for initialization, setting the gpib address, and data transfers (reading and writing). If your routine follows these directions, you should not be missing any data bytes (even if it takes a while to parse them and queue up a response). To verify these problems, you should probably enable prints for anytime you read a byte out of the FIFO in your code.
I hope this helps,
Steven T.
07-02-2008 07:08 PM
07-07-2008 05:30 PM
Hello,
Sorry for the delay in getting back to you. Last Thursday and Friday were holidays at NI.
Anytime a hold off is getting enforced, all GPIB traffic should be stopped. When NRFD holdoffs happen only instances where a talker is trying to send your instrument data (like a query) will stop. Your instrument will not be prevented from writing.
<quote>With HLDE set in AUXRA, a 40ms delay was inserted before the holdoff was released, but I saw no changes in the NI spy command flow. If I should have seen a delay in the command traffic, then HLDE wasn't actually working & code isn't being executed as intended.</quote>
With HLDE enabled, a holdoff will happen only when the end message is received. The end will only happen under a few conditions:
1. all data being read (the counter registers make it to 0)
2. the EOS character is encountered
3. the EOI line is set
Your controller is likely sending something like "*IDN?(LineFeed)". End will occur when the line feed happens because it is the EOS byte or EOI was set because it was the last character in the string. NRFD hold offs will only prevent further characters from coming in. The message is already sent and the Spy capture will likely not be affected. You should see a difference if you try sending this string "*IDN?(LineFeed)*IDN?(LineFeed)". The first time line feed is encountered it sets end because it is the EOS character in your instrument. The holdoff will be experienced and captured by Spy in this case.
Writing the HLDE bit once is all that is necessary for your application. Have you seen this bit get cleared under different circumstances? I may need to do a few experiments if you have seen any strange behavior with this register.
I hope this helps,
Steven T.
02-21-2009 04:13 AM
02-24-2009 09:13 AM
Hello,
Are you currently developing this instrument? Can you share which chip you are using for the GPIB implementation? Is it exactly the same problem with hold-offs?
Or is it that you have an instrument from another manufacturer and you notice that you must have a wait between commands? This is actually an instrument bug, so you must fix it by alerting the manufacturer.
Thanks,
Steven T.