LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Count the # of time the instr excutes in 1 sec.

Exactly how fast do you REALLY need it to run, and why?
____
Ryan R.
R&D
0 Kudos
Message 11 of 18
(1,130 Views)
I am building a sweeping sine wave program. My program need to run at 2 different sampling rate at 1.4M Hz and 0.78MHz, Therfore I need to generate more than 1.5M samples per sec.
 
I am unable to figure out which component in my program that prevent the program from running at its max speed.
 
Attached are my program  
0 Kudos
Message 12 of 18
(1,113 Views)
I think you should try running as simple of a VI as you can and benchmark that.  That would be the absolute highest rate you could get on your PC.  Something like this.
 
Odd thing about my PC was that when I went from 10,000 samples to 100,000 samples in the array, the VI took much much more than 10 times longer.


Message Edited by Ravens Fan on 07-19-2008 10:53 PM
0 Kudos
Message 13 of 18
(1,110 Views)
Are you running this on a Real-Time OS? It seems like you're trying to do some software-based timing? I ask because if you are trying to do software-based timing (though it's not clear exactly what your goal is), and you're not running on a real-time OS, then whatever timing you get cannot be guaranteed. Just because you may be able to meet your sampling rate in one run doesn't mean you will be able to in the next run.
0 Kudos
Message 14 of 18
(1,095 Views)
Why do you need to generate so many samples in one second?  Do you need to recalculate and generate another set of signals in each and every second?  Usually, if you need to generate that many samples for only 1 second's worth of data, you would likely allow the DAQ board to repeat that signal multiple times.  While it is generating a few seconds worth of cycles, you could be generating another set of data assuming that the signal needs to change for some reason.
0 Kudos
Message 15 of 18
(1,089 Views)
Hi AZH,

did you read any of Altenbachs comments? Did you try to incorporate his tips?

The attached vi takes ~150ms for the bigger iteration count, ~70ms for the smaller valueSmiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 18
(1,086 Views)

Hi all,

Thanks for your reply. The goal of this program is to generate a series of continuous sine wave to support an application in real time. All sine wave will be sitting on the same axis but no two sine waves have the same initial phase.

 

Say for example, the first sine wave would have zero phase offset, the second sine wave will have a phase lag of maybe 10 deg and the third will be lag by 20 deg so on and so fore.

 

I have not add in the sine wave function because currently I am working to generate the phase offset for the sine wave first. As part of the requirement given to me, I need to generate at least 1.4M phase offset/ samples per sec.

 

Initial my program was only able to generate 0.8M samples per sec, but I have since correct my program and it is able to generate 4.41M samples per sec now.

 

My problem is solved as for now and I thanks you guys for you help.I think you guys are awesome!!!! 

 

As much as I would like to rate those very good reply, I am unable to do so now because I am new to LV as well as this forum and has less than 50 post under my belt.   

 

Best Regards

 

Zhi Hong

0 Kudos
Message 17 of 18
(1,034 Views)
Hi Zhi Hong,

We are very happy to hear that you enjoy the NI Discussion Forum.
One way to help you get to 50 post is to help others as well with the knowledge you've gained.

It is through community team work that makes this forum possible and so valuable.

Since you are new to LabVIEW, I'd like to point you to some great resources on ni.com :

Learn LabVIEW

How Can I Learn LabVIEW?

Tips and tricks:
Context Help: Control + H >> hover your mouse on object of Front Panel of Block diagram>> Context help tells you what that object is >> click detailed help you need additional info

Find Examples: Help >> Find Examples >> Search for anything you are interested (Ex queues): brings up a list of related already made vi's

KBs (knowledgebases) and DevZones on ni.com: Search for error codes or short problem description in the search field of NI.com to find amazing documents that could solve your problem at your mouse clicks

Enjoy LabVIEW and welcome to the forum






Message Edited by Van_L on 07-22-2008 12:35 PM
Van L
NI Applications Engineer
0 Kudos
Message 18 of 18
(1,004 Views)