Hey Sunny,
I'm not too sure about what you want to do every 100ms, but here are 2 major ways to time a code :
- The timing functions return when they reach the count wired to their input to make it short. So something very simple just as following will do !
- The hardware-timed codes are more used when notably using DAQmx. You might want to go and check some examples in the Example Finder (Help -> Example Finder -> Hardware I/O -> DAQmx...) and see how they work.
Caveat : In the first solution, if your code takes more than 100ms to execute, let's say 253ms, then the timer is pointless and you'll have to optimize your code to execute in less than 100ms.
Regards,
Eric
Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.
Here is the VI.
I get the data in data string after every 250ms (approximate).
How can i reduce it to 2ms?
Sunny,
The serial communication will prevent you from having such a fast execution time. You can still work on your execution time by doing your file Write/Read in an other loop. Also, the Elapsed time VI is for benchmarking, not for timing your acquisition, I suggest you use it differently, or maybe remove it.
About the parallel file I/O :
Regards,
Eric
Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.
Is this the problem of VISA functions that comes with the labview?
I mean if I use a DAQ with it will function even at 2ms, am I right?
Your limitation is whatever instrument you are using. If you remove all of the file write code, what is your iteration rate? Obviously, there are DAQ boards that can sample at or much faster than 2ms. You have not mentioned what sort of hardware you are using right now so it is impossible to say how fast it can run but a 2ms rate over serial is hard to accomplish.
The VISA write and read functions well I get the data what I want.
The only case is I want the speed data that to be plotted on the graph every 2ms or written in the tdms or any type of file in 2ms