It depends on how you check the timing of data arrival. Assuming you are using Win32 environment, you can use ClearCommError() API function that receives COMSTAT structure. The resulted COMSTAT has cbInQue member that indicates the byte count that was already arrived in the PC's COM receive buffer. You can call this function repeatedly in a loop to observe the byte arrival. This feature is also wrapped by VISA viGetAttribute() function with VI_ATTR_ASRL_AVAIL_NUM, however using VISA may cause some latency.
To measure the time, you can use GetTickCount() API function that returns the millisecond value since the PC was rebooted. For more precise measure, you can also use QueryPerformanceCounter() function that allows microsecond measurement, though the function is bit difficult to use.
このメッセージは 09-28-2006 10:59 AMに Makoto が編集しています。