I created a simple VI to measure the elapsed time, which the serial communication protocol needs to transfer several characters. But if I do theoretical calculations, also with different baud rates in the sub-VI conf s-port, the theoretical results differ a lot from the measured results. I also observed, by increasing the number of transferred characters one by one, the elapsed time decreases or increases. I attached the VI. Can anybody tell me, if I am doing completely wrong and maybe there is a better and more precise method to measure the transfer time of a serial communication. Thanks a lot. Cheers Aquarel
One thing you should certainly do is take the start time after you configure the serial port. Move that to an earlier fram. Also, you did not include the VI you're using for configuring the serial port. How have you modified VISA Configure Serial Port?
sorry, I forgot to attach the VI for configuring the serial port. I just modified the sequence and added the time stamp after configuring the serial port. My probem is now, if I send a string of length 21 and I run the VI several times, elapsed time should always be the same? But it isn't! Why?
Okay, I think these differences may result from the Windows OS. That is true. I still have the problem, that there is big difference between calculated and measured values (Factor 10). I added the property node 'Bytes at port' to see how many bytes are exactly written to the serial port, but it is always zero. Do I have to change anything more in the VI?? Thanks.
Did you consider the fact that baud rates for the serial port should be thought of as BITS per second rather than BYTES? The factor of 10 may simply be your 8 data bits + 1 start bit + 1 stop bit = 10 total bits worth of time per byte transferred.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW?