Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Scope dropping GPIB connection

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

 

0 Kudos
Message 1 of 9
(3,857 Views)

Attach your code and the modified VI please.

0 Kudos
Message 2 of 9
(3,837 Views)

Please find the Labview code attached. 

 

Thanks

 

Sudarshan A

 

0 Kudos
Message 3 of 9
(3,828 Views)

I'm sorry. There is one other loop i forgot to add. PFA the updated VI. 

 

Thanks 

 

 

0 Kudos
Message 4 of 9
(3,816 Views)

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.

0 Kudos
Message 5 of 9
(3,805 Views)

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

0 Kudos
Message 6 of 9
(3,800 Views)

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.

 

 

Message 7 of 9
(3,793 Views)

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 

0 Kudos
Message 8 of 9
(3,706 Views)

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.

0 Kudos
Message 9 of 9
(3,674 Views)