LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

virtual oscilloscope and capture

i'm trying to get some code together that allows me to monitor a signal and start capturing data of so required. i got hold of some example code of a virtual oscilloscope and i'm trying to modify it so i can implement data capture within it. i've kinda got it working to a fashion, but it's abit rubbish. i thought i can simply use a sequence or state dependant code. but i thought it'd be nice to simply direct the displayed scope data to file if wanted? any pointers on the best way to go about this much appreciated.

thanks in advance for any replies.
0 Kudos
Message 1 of 6
(6,234 Views)

Hi

In What way do you think it is a bit rubbish?  You may want to try to use a shift register to gather the waveform data all the time Capture = true.  Then when Capture = false write the data to the file.  That way you will not be writing to the file continuosly.

Craig

LabVIEW 2012
0 Kudos
Message 2 of 6
(6,231 Views)

Hi i have attached a quick modification to try to show you what i mean.  I cannot run this vi as i do not have the DAQ card so the boolean logic may need investigating.  However it should scroll through the case structure in this order.  0-1-3-2.

Craig

Message Edited by craigc on 11-15-2007 11:14 AM



Message Edited by craigc on 11-15-2007 11:16 AM
LabVIEW 2012
0 Kudos
Message 3 of 6
(6,228 Views)
hi craig, thanks for your replies. should've mentioned this before. i'm using version 7.1, so i can't open your example code. totally agree with what you said about only writing to file when the user input specifies to do so and not all the time.

i thought my solution was abit rubbish because as when it worked it felt quite disjointed with scenarios of various dialogue boxes prompting file options. this also seemed to cause it to crash occassionally, i think this was because the daq task continued as the file procedure executed too? errors about data not being available anymore etc.

i think i need to let the program run capturing to screen only whilst monitoring signals. then when a capture to file is requested, pause/stop the daq task whilst the file open/create/replace is sorted out. then start capturing again to screen and file. i think this will be good, also it will allow me to choose a new sample rate, as the virtual scope does it as fast as it can, which isn't always what i want. probably a case structurev with various states of operation?

can you export your example for 7.1 for me to have a look at?

thanks, j.
0 Kudos
Message 4 of 6
(6,190 Views)

Hi Stagger,

 

I cannot save to version 7.1 but here are some screenshots of the Code.  Cases 1 and 3 are identical.

Craig

 

 

LabVIEW 2012
0 Kudos
Message 5 of 6
(6,182 Views)
craig, thanks for the screenshots,
i've been working on my old code. i've gone down the road of a state based program. it has the functionality i want and it's working to a fashion, but reconstructing my captured data it looks wrong and it sometimes locks up, but that could be the old computer i'm working with. i've attached it for any comments etc.

i'll mod my old version as per your screen shots and see how that performs, it might be easier to get what i want this way rather than my state based program?

have a good weekend.

regards, j.
0 Kudos
Message 6 of 6
(6,158 Views)