LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display scope waveform & export data

I had already asked this question as an extension of another thread, but please allow me to create a new one just to take some feedback (hopefully)
 
I am trying to do a couple of thing with the "Setup" case in the attached VI:
 
1. Display the scope waveform in GUI
2. Export waveform data (X, Y points) in either spreadsheet or text file.
 
thank you
0 Kudos
Message 1 of 18
(3,345 Views)
jjlee,
 
What exactly happens when you run this code?  Do you get any errors?  Does it run with unexpected behavior?  I took a look at it, but I didn't have all the files, so I couldn't run it myself...
 
Let me know what happens when you run it.  Or even BETTER (if possible), just attach a small runnable portion of the code that exhibits the behavior you are seeing.  That way I can mess with it myself 🙂
 
Thanks,
Justin
Message 2 of 18
(3,324 Views)

Hi Justin M.,

Thanks for your response.

The test set up looks like this: There is a pair of cable assembly, one end connected to a test fixture (PCB) and another to TDS 8000 scope.

I am trying to: 1) do initial scope setup, 2) conduct crosstalk test & 3) display waveform in the front panel.

Having said that I have a few questions.

Q1. How can I access the x, y data points in the scope? I think the waveform data must be stored some where in the scope memory? Is there an example that I can take a look? I am trying to access and export this data as a file...

Q2. I have added 'clear data.vi' & 'set acq stop after condition.vi' at the end of the case structure in the attached VI....is this a good way to do it? (in Do scope set up_mod.vi)

thanks,

ps...here is the updated VI as well..

0 Kudos
Message 3 of 18
(3,306 Views)
Hi,
 
In which portion of the function block should I separate so that it will be more modularized for easy testing(?)
There are many subVIs...I do not know if I can do it...
 
Any input is appreciated!
 
thanx,
0 Kudos
Message 4 of 18
(3,302 Views)
What you are saying doesn't quite make sense to me. Your VI has a graph called Resultant Waveform that is displayed on the Xtalk Plot tab. Is this not displaying data from the scope? If the data is being displayed, the x and y information has already been retrieved from the scope, and all of the x and y information is in the 1D array of waveforms being written to the graph. If there is no data being displayed on the scope, then there is a problem in the Xtalk with Retries_mod.vi. Is this a VI you wrote or modified from one in the scope's driver? The tktds8k Get Waveform.vi is the function that actuallyr retrieves the data from the scope. This, I'm sure is part of the driver. What doesn't work with this? If you have data being displayed on the scope, you can run this function all by itself. Try that and see what data is being returned.
Message 5 of 18
(3,303 Views)

No, there is no plot showing on the graph as it is shown from the scope.

Xtalk with Retries_mod.vi. was created by some one else, and I was trying to re-use since it would be the same type of test. I suppose I do not really need the 'retries' option as long as I can acquire and display math1 (C1-C2).

By running Xtalk with Retries_mod.vi showed this message (in error out):

tktds8k Set Horizontal Position.vi<ERR>Driver Status:  (Hex 0xBFFF000E) The given session or object reference is invalid.

Running tktds8k Get Waveform.vi showed he following message (in error out):

tktds8k Get Waveform.vi<ERR>Driver Status:  (Hex 0xBFFF000E) The given session or object reference is invalid.

I did use the 'insert queue element_mod2.vi' in 'set config' case to run test, but I do not think the scope is running the test.....(please see the attached vi)

I am not sure exactly where I have to look, but I will start looking in both xtalk scope setup and xtalk with retries.vi

thanks for your help!

BR,
0 Kudos
Message 6 of 18
(3,283 Views)
Those errors mean that you don't have the correct VISA Resource Name selected. There is a front panel control labeled Math Setup in which you are to specify the scope. Your subVI Do Scope Setup_mod reads an ini file to (presumably) get the address or resource name of the scope. What's in the ini file under the Tektronix Setup section? That's where you should start in debugging your entire program but you can open an VI in the scope driver and select the correct VISA Resource Name yourself. Just click on the arrow on the right side and pick the resource name that corresponds to the scope.
Message 7 of 18
(3,281 Views)

Here is the ini file

=======================

[General]
DebugMode=0
ContRun=0
Retries=3
StopOnError=0
ReportTimeStampFmt=0
[GUI Setup]
EnblOpReminder=1
[Tektronix Setup]
AddrDSO_0=GPIB0::1::INSTR
DSOResolution=4000
[Diagnostics Setup]
DiagsPath="/C/Molex/Results_Data"
DiagWfmTracking=2

==========================

Basically, setting the GPIB address of the TDS8K scope (Addr = 1 from NI MAX) and the scope resolution to 4000.

Although, I manually select the GPIB addrs/ Resource Name that corresponds to the scope, but I am still receiving the same error message...(I did set the 'select scope =1' & 'select channel =1' in Math setup section (in Xtalk plot tab).

 

0 Kudos
Message 8 of 18
(3,275 Views)

Well, according to your ini file, if you select scope = 1, then you will not get the correct VISA Resource out. To be correct, you should be select scope = 0. Look at the code. It builds a string (AddrDSO_n) based on the scope# and the only listing in the ini file is for AddrDSO_0.

Can you talk to the scope in MAX? Have you opened tktds8k Initialize.vi in the driver and run that first?

Message 9 of 18
(3,267 Views)
I tried to run after changing 'select scope =0' but no success...
It seems like the 'run test' case does not run at all...
 
Yes, I can talk to the scope (TDS8k) in MAX.
I did run tktds8k Initialize.vi located in the subVI (Restore Setup File_mod.vi), but found no error.
 
I can suspect that there could be a conflict with program execution?
sometimes, setup scope prompt displays, but does not move on to complete the test...
 
 
 
0 Kudos
Message 10 of 18
(3,260 Views)