02-02-2008 04:01 AM
Hi,
Thank you in advance for your help.
I want to establish communication with an oscilloscope via GPIB-USB. I can save
the waveform from the oscilloscope but once I restart the VI and input the same
GPIB address at the VI, the communication will not work. It can work again, if
I change a new GPIB address at the oscilloscope, MAX and the VI.
I think the problem is with the MAX setting. Can you
please tell me the steps to permanently set the address, so that I need to
input the address only for the VI every time I run the VI?
02-02-2008 01:00 PM
Once you do a scan for instruments and one is found, that address will stay in MAX.
When you re-run the VI, what error code do you see? What is the make and model of the scope? Are you using a driver and if you are, what type (LabVIEW, IVI, etc.)? If you are using the Instrument I/O Assistant or code you've written, why don't you post what you have?
02-03-2008 11:48 PM
02-04-2008 08:26 AM
02-04-2008 12:39 PM
02-04-2008 08:49 PM
02-04-2008 10:48 PM
02-05-2008 12:28 AM
02-05-2008 08:22 AM
Julianti wrote:
1) I use the shift register just to get the last data, i.e. the VISA resource name. Without the shift register, it is an array and it cannot be wire to the VISA close. This may looks stupid..so what about to avoid the For loop, as in this VI attached? The driver for the oscilloscope is available at http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=485.A tunnel coming out of a For loop will often default to an autoindexing tunnel and give you an array. You can right click on that tunnel and select disable indexing to get a normal tunnel coming and not the array. I'm not sure why the need for the For loop, unless you intentionally want to run this code exactly 180 times.
2) I never modify the arrangement of VISA write and VISA read. It is given in the driver for the oscilloscope. So I assume that it is fine. Is this assumption correct?I don't know. I am used to serial port communication and not GPIB communication, so my reference basis is that where I am used to needing some sort of delay. In a situation like that if you write then read too fast, there is nothing yet to read. But by the time the loop gets around to the next iteration then there would be something in the read buffer but from the previous iteration. I don't know if the mechanics behind GPIB are inherently different than serial.
3) I already put another Tick Count to compare with. Is this what you mean?Exactly.
I tried to run and it stoped after the VISA close. Then I close the Labview and rerun this VI. The error occured at the VISA write during the first iteration. Then if I change a new GPIB address at the oscilloscope, MAX and the input for VISA session in the VI, then it can run with no error. This is only annoying for this VI but it becomes a real problem when I combine all my sub VI together later.
Thank you for your help..
02-12-2008 04:30 AM