02-16-2013 03:48 PM
Hi
I am having a problem while reading from a Tek 7K scope using GPIB connection. A short overview of my setup and my Labview code. I am running a Labview VI to read the output from a Tek 7K scope. The interface is a GPIB interface. I modified the VI that i downloaded from the NI website for the scope. So i have the VI to read 2 single waveforms in a while loop from the 2 channels on the scope (runs until num of acq equals the user's request). There is also an Agilent signal generator that is connected on a USB interface, and the VI is used to control the output of the signal generator.
The problem i am facing is that, during the scope acquisitions the scope looses GBIP connection for no apparent reason. There is no error message. When i open up the Measurement and Automation tool to analyze the problem, i notice that the scope is visible on the GPIB list of interfaces, but it has stopped responding to IDN? queries or any other commands actually. The GPIB connection is only restored if i power cycle the scope. But even in this state, the scope's functioning has not stopped. It is still reading on the 2 channels. Only the GPIB response is lost. This loss in connection seems random. Has anyone faced a similar problem, or know what i could try to eliminate this? Any help would be deeply appreciated.
Thanks
02-17-2013 12:31 PM
Attach your code and the modified VI please.
02-17-2013 03:10 PM
Please find the Labview code attached.
Thanks
Sudarshan A
02-17-2013 05:07 PM - edited 02-17-2013 05:14 PM
I'm sorry. There is one other loop i forgot to add. PFA the updated VI.
Thanks
02-17-2013 06:10 PM
I would suggest getting rid of that silly sequence structure. Simply use dataflow by connecting the error in/error out functions. You also need to use dataflow in reading the different channels. It is also silly. GPIB does not run in parallel so you should really use sequential reads. For better performance, the second channel read should be a fetch. The way you are doing it, each read triggers the scope again. Since you are not configuring the scope, I have no idea how many samples the scope is acquiring and how long that takes. Your 200ms wait may or may not be long enough.
02-17-2013 06:38 PM
Hi
Thanks for the suggestions. I will try to restructure the program as per the suggestios. I guess the important point to note here maybe that the i should use sequential reads instead of trying parallel reads. Could you please explain what exactly you mean by " second channel read should be a fetch". What is a fetch and what is the difference between a read and a fetch? I am actually configuring the scope. I had to remove that part of the code before posting, since i fear i may not be permitted to post that. My scope is configured to acquire 5k samples per read. I guess the delay is actually pretty high. I have tried smaller delays, and it seems to work. I cant be absolutely sure though.
Thanks
02-17-2013 07:56 PM
You can look at the block diagram of the read. When the read is called, it calls the initiate function which triggers the scope. Then it does a fetch which retrieves the data. By your calling the read twice, the waveform from the channels is not synched. When you do an initiate and two fetches, the channesl are synched because if is the same acquisition. That is the only way to acquire two channels in parallel.
02-22-2013 04:59 AM
Bonjour
j essaie de faire la configuration de GPIB avec le PC je suis entrain de suivre le doc suivant http://munck06.free.fr/ccs5/labVIEW/...es%20Bases.pdf mais quand j'arrive à la page 38 au lieu de trouver la liste de DEV il indique que les voies physiques non trouvées
02-25-2013 10:20 AM
Hi Lablab123
I used Google translate in order to understand what you have posted. If you need help in French please post it on the French forum it would be easier.
Do you have any NI hardware connected or simulated in your computer? Can you see the device in MAX?
Regards
Esteban R.