LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

elapsed time

Solved!
Go to solution

@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
0 Kudos
Message 11 of 16
(867 Views)
Solution
Accepted by Sunny1290

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"
0 Kudos
Message 12 of 16
(843 Views)

Thank you guys.All 3 of you.

0 Kudos
Message 13 of 16
(804 Views)

My bad.

Thanks to all four of you.

0 Kudos
Message 14 of 16
(802 Views)

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

 

Regards,

NKR

 

Elapsed_time_demo_3.jpg

0 Kudos
Message 15 of 16
(774 Views)

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

0 Kudos
Message 16 of 16
(768 Views)