LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 - Timeout / RTS-CTS

Is it possible to define a Timeout when using the "ComRdByte" Function,
so that CVI will not break down, when no byte was send.

I´ve also problems with the RTS/CTS-Signal. If i use them , it is not
possible to read from the port ! There is nothing happening on these
lines.... can you help me ?
0 Kudos
Message 1 of 2
(3,979 Views)
You can either set a timeout for read/write operations with the SetComTime function or set up a callback function to be called whenever there is a certain number of bytes at the port with the InstallComCallback function. I am a fan of using the InstallComCallback method and if you want to know exactly how to use it look at the example in the C:\MeasurementStudio\cvi\samples\rs232 directory.

Only use the handshaking modes that are supported by the device you are connecting to. Meaning either use hardware only, software only, hardware and software, or none. All are very common. In your case it doesn't appear that hardware is working for you, so to turn it off use the SetCTSMode function to turn hardware handshaking off.

Jason Foster
Applications Engineer
National Instrume
nts
www.ni.com/ask
0 Kudos
Message 2 of 2
(3,979 Views)