Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview is unable to obtain the proper waveform for my LeCroy 9450

Hello,

 

I am currently trying to make a labview program that can collect waveform data from my LeCroy 9450 and dump it into a file that excel could plot. I also would like labview to display the current waveform . I set up a simple code (just for testing purposes) using the LeCroy 9420/9450 drivers here http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E933A659CE034080020E748... and simply setup the Get Waveform.vi with a chart readout. Initially, the waveform matched and I was able to write to a text file and get the proper data. However, it seems that whenever the instrument is turned off or some other factor, the Get Waveform.vi doesn't create the proper waveform anymore (in fact is quite distorted). 

 

I contacted NI about this issue to ask for help but they said nothing was wrong with the code and to check my hardware. I put my oscilloscope onto an old computer with ScopeExplorer software and could pull off the proper waveform so I figured the instrument is not the problem.

 

Being an older model, there is little discussion on this instrument so I'm at my last option of asking here for help. Any would be appreciated.

0 Kudos
Message 1 of 14
(6,391 Views)

wilsona11 wrote:However, it seems that whenever the instrument is turned off or some other factor, the Get Waveform.vi doesn't create the proper waveform anymore (in fact is quite distorted).

What other factors?  I'd be surprised if you get anything back when the instrument is off.  I would expect to see errors galore in that scenario.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 14
(6,387 Views)

Sorry, I wasn't very clear. For instance, the oscilloscope was reading properly on a friday evening and I turned it off for the weekend. When returning monday and turning the instrument back on, labview now gives me the wrong waveform.

0 Kudos
Message 3 of 14
(6,384 Views)

Hello,

 

Since the LabVIEW code was working and you are able to use ScopeExplorer as well, I suggest that you empty the buffer when you first connect to the scope. I suspect there may be garbage in the buffer that is being read out along with the waveform data so all of the byte offsets for decoding are now incorrect.  (Unfortunately, I do not have access to one of these older scopes to verify this, but I have seen this happen at power up on other test equpment I have used in the past).

 

My solution was simply to add the VISA CLR primitive after the connection:

 

Capture.JPG

 

Regards,

Leonard Brown
Applications Engineer
Teledyne LeCroy
1-800-553-2769

 

 

 

0 Kudos
Message 4 of 14
(6,373 Views)

The 9450 connects through GPIB and using the clear function does not seem to fix the waveform

0 Kudos
Message 5 of 14
(6,366 Views)

Hello,

 

It was worth a try anyway.  I was hoping it would be a simple solution.

 

I do not suspect the scope (as you also do not, since ScopeExplorer seemed to work), but I think it would also be worth it to run the LabVIEW code and let it get the distorted waveform and then right after that connect with ScopeExplorer and read the same waveform.

 

This would allow us to compare the same waveform data response to see if in fact the scope is an issue.

 

I do not see a connection vi in the driver, which makes me suspect the scope is echoing the command.  When ScopeExplorer connects to a scope, it sends:  CHDR OFF so there is no echo in the response. (this would also cause a byte offset issue, because the first few bytes of the data array would be:  WF? DAT1 and then the waveform data.

 

I will continue to look into the driver to see if anything else jumps out at me as a possible cause.

 

I will do my best to see if we can get this going for you, but as I mentioned before, I do not have one of these scopes to test with.

 

Regards,

Leonard Brown
Applications Engineer
Teledyne LeCroy
1-800-553-2769

 

 

 

 

 

0 Kudos
Message 6 of 14
(6,361 Views)

Thank you for looking into this regardless. The issue with scope explorer is that the computer with windows 2000 on it is a separate one without labview. The computer running labview has windows 7 and thus scopeexplorer isn't compatible so being able to see a bad waveform and then quickly run in scope explorer doesn't seem possible. 

0 Kudos
Message 7 of 14
(6,358 Views)

Hi,

 

You should not have a problem using ScopeExplorer from your Windows 7 machine.  I use it on my Win7 machine.

 

Are you not able to install it?

 

If you can install it but it is not connecting to the scope it may be that the resource was not disconnected in LabVIEW so the PC thinks it is in use still.

 

Regards,

Leonard Brown
Applications Engineer
Teledyne LeCroy
1-800-553-2769

 

0 Kudos
Message 8 of 14
(6,355 Views)

I hadn't even tried since the website said it was only for 2000 and XP. Just installed it on the windows 7 device and scope explorer says the scope status is dead even after closing labview and restarting the computer (to make sure labview had no influence on the system). With dead status, the software cannot communicate with the oscilloscope to get traces or anything. However when I press the remote control button I do see the indicator pop up on the scope that says remote control is active.

 

The scope didnt seem to have this issue on the the 2000 computer, the scope was quickly found and had active status. 

0 Kudos
Message 9 of 14
(6,353 Views)

Hi,

 

Sorry for the delay, I got very busy at work for a while.

 

I spent some time today going back over the thread here and I strongly suspect the issue is the header being echoed by the scope.

 

This would cause a byte offset for the returned data on the waveform query which would result in a strange waveform being decoded.

 

After you connect to the scope, send:  "CHDR OFF" to turn off the echo.

 

Regards,

Leonard Brown
Applications Engineer
Teledyne LeCroy
1-800-553-2769

 

0 Kudos
Message 10 of 14
(6,299 Views)