Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Timeout

My intent wasn't to be mannerless and I apologize if it seemed that way. My intent was to point out that repeatedly flushing the buffer and setting the timeout does not work. If the data is sent continuously, then a single flush buffer before the first write is enough. Then you do a continuous read  of a fixed byte count. If there's a termination character, that is all that is required. If there is a variable number of bytes returned and if there is no termination character, then that calls for a much more complicated synchronization scheme.
0 Kudos
Message 11 of 14
(1,340 Views)

Hi Alif and Dennis,

Thanks again for the kind reply. Thank you very much you had given me lots of options, different ways to tackle my issue. Please give me time to study and do trial and error with my VI with actual testing on the machine based on your suggestions. I will return to you whatever the result is in a little while.

Thanks a lot.

regards,

0 Kudos
Message 12 of 14
(1,325 Views)
Hi Alif and Dennis,
 
Thank you for your lots of suggestions and solutions to my problem. I did a lot of test and contacted the sensor maker too. I learned new things and i was able to fix the problem. I got rid of the describe error, the speed is now faster and a steady one.
 
I learned of the following;
1. Sensor "Refresh rate"
   I overlooked this function. The default value was 300 msec. That is why if i set the Timeout value to 200 or even 300msec i got this wobbling data. The
   new sensor refresh rate is now 100 msec. which is the fastest rate.
2. Termination Character on the Visa Configure Serial Port
    I changed it from 'OFF' to 'ON'.
3. Main While Loop delay timer
    I made the VI runs more faster, from 150 msec to 10 msec.
4. Read Timeout on Property Node
    Making this lower than the sensor refresh rate gives a wobbling data and error. I set the read timeout value from 200 to 250 msec and i was able to get a
   steady value and got NO more errors.
5. Byte Count Control in VISA Read function
    Making this value too high will make the data moves slow and so i place  it to a manageable value versus speed.
 
Again, thanks a lot.
regards,
0 Kudos
Message 13 of 14
(1,301 Views)

Hi,

Its gr8! to know that ur problem is solved!

Regards,

Alif

 

 

0 Kudos
Message 14 of 14
(1,296 Views)