LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading RS232 status lines

I am using a ComCallBack-routine to react to changes in the CTS and DSR
status lines on the serial port (W95/NT). However, I need to read the
actual values (i.e. Hi/Lo) on these lines, but cannot find any
LabWindows function that can do that.

I've tried using the SDK function GetCommModemStatus(...), but I need
the COM-port handle from OpenCom(...) and don't know if it is possible
to retreive that value.

Any help would be appreciated.


Terje M.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 3
(3,763 Views)
The bad new: I had the same problem but I didn't find a solution (excpet to
use only the SDK functions avoiding CVI functions).

The good new: with vers. 5.5 there is the function GetComLineStatus() wich
should solve the problem ... so ... wait ... for the new release.

terje@iname.com ha scritto nel messaggio <7s80dl$9rq$1@nnrp1.deja.com>...
>I am using a ComCallBack-routine to react to changes in the CTS and DSR
>status lines on the serial port (W95/NT). However, I need to read the
>actual values (i.e. Hi/Lo) on these lines, but cannot find any
>LabWindows function that can do that.
>
>I've tried using the SDK function GetCommModemStatus(...), but I need
>the COM-port handle from OpenCom(...) and don't know if it is possible
>to retreive that value.
>
>Any help w
ould be appreciated.
>
>
>Terje M.
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
0 Kudos
Message 2 of 3
(3,763 Views)
terje@iname.com wrote:
>I am using a ComCallBack-routine to react to changes in the CTS and DSR>status
lines on the serial port (W95/NT). However, I need to read the>actual values
(i.e. Hi/Lo) on these lines, but cannot find any>LabWindows function that
can do that.>>I've tried using the SDK function GetCommModemStatus(...),
but I need>the COM-port handle from OpenCom(...) and don't know if it is
possible>to retreive that value.>>Any help would be appreciated.>>>Terje
M.>>>Sent via Deja.com http://www.deja.com/>Share what you know. Learn what
you don't.

I had the same requirement. National advised that they have given you functions
in the next version of CVI (5.5 in beta now). I solved the problem by readng
the PC UART modem status register directly using inp(). The UART is 8
consecutive
addresses at 0x2e8 (I think) for COM2.
0 Kudos
Message 3 of 3
(3,760 Views)