LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of Data Samples

Solved!
Go to solution

I am using LabVIEW 7.1 on Windows 2000

I'm not sure what would be the best route to go about doing this but I need only 50 data samples per frequency. Attached is what I currently get using human timing by trying to go off of the number of averages completed and restarting the counter manully. The frequency is changed manually as well off of a function generator. Im trying to automate as much as possible to take the human error out of the equation.

 block.PNG

 

FYI: This is a simplified case which is why there is only 1 case in the case structure

 

Another option I'm working on is this Arbitrary Waveform Composer but it only works on Labview 6.1 if anybody knows how to make this functional on LabVIEW 7.1 that would be awesome! This is from Stanford Research and is to be used with the DS345. The software is free from their website.

Download All
0 Kudos
Message 1 of 14
(4,117 Views)

It didn't let me upload the AWC zip so here is the link

Arbitrary Waveform Composer

 

0 Kudos
Message 2 of 14
(4,107 Views)

This is a compiled executable.  To re-create it in LabVIEW, one would need the LabVIEW code.  It is possible, maybe even likely, that code developed in LabVIEW 6 could be ported to LabVIEW 7.1, but without the code, it can't ...

 

BS

Message 3 of 14
(4,088 Views)

Re the AWC - is it your intention to change the function of the code or to simply run it on your system? The former - see BS' post. If the latter - if it doesn't run on yoru computer it may not have the RTE included in the exe file. If not, you can download the LV 6.1 RTE (free) from the NI download page. This can run independately of the LV7.1 software you are running.

 

If that doesn't help - can you explain why you want to use LV7.1 instead?

 

cheers.

0 Kudos
Message 4 of 14
(4,063 Views)

Re the Automated code - what seems to be your problem here, are you looking for advice on best approach or is there a particular area of interest here that you are struggling to get working?

0 Kudos
Message 5 of 14
(4,062 Views)

Hey David, the area of interest for the code is what would be the best approach. I am trying to have the data write 50 samples to excel then wait for me to tell it to write another 50 data samples until I hit the stop button. I still need the rest of the program to run, just not the write to excel portion. Currently it just writes continuously till I hit stop. I am getting roughly 50 give or take by doing it manually by visually going off the averages completed and clicking restart to reset the counter.

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

Re AWC, the reason 7.1 is chosen is because that is the labview version i currently own. I have RTE versions 6.0 and up installed and it will not run. I just need it to run on my platform if that is possible. or if there is code that can control the DS345 function generator from labview

0 Kudos
Message 7 of 14
(4,035 Views)

If what you want is to take 50 samples and then "manually" stop the loop, you can programmatically stop the loop at exactly 50 by wiring the index (the box with "i" inside it) to a test "i >= 49" to the Stop indicator.  Personally, I prefer incrementing i and then wiring "i >= 50", as this is more mnemonic.  Another way to do this, of course, is to use a For loop (instead of a While) with 50 wired to N.

 

Bob Schor

Message 8 of 14
(4,014 Views)

Hey Bob. I'm not trying to stop the while loop, visually I still need to see what is happening but with your suggestion in mind, is it possible to put a "for loop" around the write to excel section of the code and wire a "push button" to " i " ? 

0 Kudos
Message 9 of 14
(4,004 Views)
You aren't making any sense. The code you posted (the image anyway), only writes to file when the acquisition is complete so the write only happens once. Putting a for loop around the write functions would be even more nonsensical.
0 Kudos
Message 10 of 14
(3,990 Views)