LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

textronix

Hi,guys,

        

        I would like the scope to wait for the edge trigger, and then read the data from the scpoe to PC through USB. Here's the detail process:

1. I use channel 4 as the trigger source.

2.When there is a trigger, PC will read data from channel 1 and the record length is 1000.

 

      I just make some changes from "Edge Triggered Acquisition Waveform Example.vi", add a loop to realize continuous reading. That is one trigger then one reading, and then another trigger and another reading.

      However I met two probelms:

1. before the first trigger, the image showed in the PC will change many times, and the PC will read a lot of  useless data. How to realize after the first trigger, the PC begin to read data.

2.After the first trigger, indeed the image showed in the PC will change only after another trigger occur. However, between the interval of two trigger the PC will repetitively read the same data to a file. For example, After one trigger, the PC will read 1000 data, and then before another trigger come, the PC will repetitively save these 1000 data to the data file. I just want to save only 1000 data after one trigger, not many repetitive 1000 same data.

3.Between the interval of two trigger, I find before the trigger comes, the loop still operate normals,not as I expected till wait the trigger the loop will run.

 

Attached is my labview code.

 

 

 

       

0 Kudos
Message 1 of 11
(2,992 Views)

DO NOT POST BITMAPS TO THE FORUM. DO NOT CHANGE THE EXTENSION OF THE FILE TO GET AROUND THE BAN ON BITMAPS.   Smiley Mad 

 

There, not that that's off my chest.

 

The program has no way of knowing if a trigger has occurred unless you check for it. The loop simply reads the data from the scope - it doesn't care whether a trigger has occurred. You have to query the scope to determine if the trigger has occurred, and if it has, then you acquire the data. Otherwise, you don't. I do not know if the driver you downloads has a VI to check the status registers. If not, you will need to write it yourself.

 

Also, do not put the close VI inside the loop. It belongs outside the loop, and it should run at the end of the program, not with every iteration of the loop.

0 Kudos
Message 2 of 11
(2,966 Views)

Morever:

 

Step1: Detect the trigger. Once it comes ,aquisition starts;

 

Step: Detect the data length. Once it equals to 1000, stop aquisition.

0 Kudos
Message 3 of 11
(2,950 Views)

Sorry, I am not quite clear of the rule of the attached files.Besides, thanks very much for your help.
My drivers are downloaded from here:http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=6E23DB10D9FC2B05E04400144FB7D2...
In the exemples,there is a 'Tektronix DPO MSO 2000 4000 Series Edge Triggered Acquisition Waveform Example.vi' . This is one trigger acquisition, and it directly read the data from oscilloscope after the setting of the trigger type. So I think there is a query about whether the scope to be triggered in the 'read.vi'. Then I open the 'read.vi' to find the 'initiate.vi' and the '*OPC'. I guess these two has the function to query the trigger status. If it is true, the above problems I met initially really confuse me.

0 Kudos
Message 4 of 11
(2,936 Views)

Thank you very much for your help. I am a new beginner, so I am not sure how to check the trigger status, would you please give me some instructions? and besides I write more detailed to desicribe my doubt above.

 

Thank you very much!

0 Kudos
Message 5 of 11
(2,934 Views)

Hi Kworkhow,

 

The Tektronix DPO MSO 2000 4000 Series Edge Triggered Acquisition Waveform Example.vi has a bug in it, which might be why your having a hard time getting it going.  In the example there is a Read (Single Waveform).vi  If you open that sub.vi you will see a case structure including the Wait for Operation Complete.vi

Case Structure.JPG

You then want to enter the Wait for Operation Complete.vi and you will see a series of VISA Write and Read commands.  If your remove the VISA write that sends the *CLS command the trigger will operate correctly.

CLS Remove.JPG

 

Good luck with your project!

 

Regards,

Mike Altmann
Product R&D
NI
Message 6 of 11
(2,898 Views)

Ah thank you MAltmann!

 

I'll make that fix in my own installation of the driver but do you have any idea on when the driver on idnet will be updated?

 

Thanks!

0 Kudos
Message 7 of 11
(2,873 Views)

Just to clarify, I ask because we are currently preparing a LabVIEW training video tutorial on how to program this series of scopes. They're pretty popular and we find sometimes there's a barrier to entry to using them with LabVIEW, so we're trying to solve that. We would like to show users exactly how to find and download the driver, connect the instrument, and start programming.

 

Thanks for all your help and please let me know if I can be of any assistance to you!

 

Brian Spears

Sixclear

0 Kudos
Message 8 of 11
(2,866 Views)

B Spears,

 

I have filed a corrective action report (CAR) on this and it is currently being looked at by R&D.  At this moment there is not a specific release date but, by the popularity of these products I would expect it to be available sooner then later. Once it is updated and tested I will post again.

Regards,

Mike Altmann
Product R&D
NI
0 Kudos
Message 9 of 11
(2,852 Views)

Hi,Mike,

Thank you very much for you advice and it helps me a lot. I will try it according to your suggestion.

0 Kudos
Message 10 of 11
(2,841 Views)