cancel
Showing results for 
Search instead for 
Did you mean: 

elapsed time

SOLVED
P@Anand
Trusted Enthusiast

Re : elapsed time


@Sunny1290 wrote:

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


So you are sure that you are getting the data every 2 ms through VISA?. What is the hardware you are using? If you are able to read the data at 2ms intervel then its not a problem to write it to a file you can use a seperate while loop to do this by using queue.

-----

The best solution is the one you find it by yourself
Highlighted
FraggerFox
Active Participant
Solution

Re: elapsed time

To log the data every 2ms, you need to know the size of data you are trasferring over serial communication. Suppose, the size of "data to read" you are transferring over serial is 1Mbyte, then at a baud rate of 115200 bits/sec, you could log that data every (1024*8/115200) = 71ms. Since you want to log the data every 2ms, the data you are transferring over serial must be equal to or less than 230.4 bits. If you are not sure of whats the data size you are receiving over the serial port, you could use the VISA functions to find the size of data over the serial port. Now, once you are sure that your data can indeed be logged at 2ms rate with your existing hardware, you just need to make two parallel loops, one for aquiring data and other for logging.

 

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
Sunny1290
Member

Re: elapsed time

Thank you guys.All 3 of you.

Sunny1290
Member

Re: elapsed time

My bad.

Thanks to all four of you.

nkrajoo
Member

Elapsed Time

Message contains an image

Hi can anyone please help me on this.....

 

Regards,

NKR

 

Elapsed_time_demo_3.jpg

johnsold
Knight of NI

Re: Elapsed Time

NKR,

 

You probably should start a new thread as your question has little to do with the this one except that it relates to timing.

 

You need a different type of program structure.  Possibly a state machine or two parallel loops linked via a queue or a notifier.

 

Lynn