![background image](http://html.mh-extra.com/html/national-instruments/enet-232-series/enet-232-series_manual_708976116.webp)
Retrieving the RS-232 Transceiver State
The NI-Serial software returns which mode the RS-232 transceivers are
currently operating in, and whether the serial connection is valid.
Note
Transceiver mode
refers to the programmed mode.
Transceiver state
refers to the physical state of the transceivers
(actual operating mode and whether valid or invalid).
There are two ways to retrieve the RS-232 transceiver state and
tranceiver mode:
Read the NI-VISA wire mode attribute to retrieve the transceiver
state and the NI-VISA IsPortConnected attribute to retrieve the
transceiver mode.
The NI-Serial software uses programmatic control codes and the
DeviceIoControl Windows function to retrieve the RS-232
transceiver state and transceiver mode.
To retrieve the RS-232 transceiver state using the DeviceIoControl
Windows function, complete the following steps:
1. Add the following lines to your source code:
#include <winioctl.h>
#include <NiSerial.h>
Note
The header file
NiSerial.h
is included on your NI-
Serial software CD. You also can find it in the
NI-Serial
folder where you installed your National Instruments
software (typically,
C:\Program Files\National Instruments\NI-
Serial
).
2. The RS-232 transceiver state attribute is contained within a struct
of type
SERIAL_RS232_STATE
. The struct members and possible
values are shown below:
Member
Name
Values
PortMode
RS232_MODE_DTE
RS232_MODE_DCE
RS232_MODE_AUTO
Содержание ENET-232 Series
Страница 1: ......
Страница 5: ...Using Help Conventions Navigating Help Searching Help Printing Help File Topics ...
Страница 17: ...How to Use this Help File To use this help file refer to the following flow chart and the appropriate topics ...
Страница 21: ...Serial Hardware Overview PCI Kits PXI Kits USB Kits ENET Kits ExpressCard Kits PCMCIA Kits ...
Страница 24: ...PCI 485I RS 485 two port isolated RS 485 four port isolated ...
Страница 27: ...PXI 8423 RS 485 two port isolated RS 485 four port isolated ...
Страница 63: ...Save Pending Changes To save your changes to this item click Save ...
Страница 65: ...Restore Defaults To reset the fields to their default values at any time click the Defaults button ...
Страница 98: ...0 LPVOID l_SerialInterface sizeof l_SerialInterface LPDWORD l_ByteCount NULL ...
Страница 127: ...2 PORT LEDs USB Serial Hardware LEDs ...
Страница 139: ...Connecting the Cables to a Four Port PXI Serial Board ...
Страница 141: ...67 58 50 41 33 24 16 7 TXD 9 RI 9 ...
Страница 167: ......
Страница 169: ......
Страница 171: ......
Страница 181: ...How many serial ports can I have on my machine You can have up to 256 serial ports ...
Страница 189: ...nslookup hostname If you still cannot communicate with your device contact National Instruments ...
Страница 201: ...Glossary Prefixes Symbols A B C D E F G H I K L M P R S T U V ...
Страница 203: ...Symbols degrees ohms percent ...
Страница 204: ...A A amperes ANSI American National Standards Institute ...
Страница 205: ...B b bits B bytes baud bits per second bps bits per second ...
Страница 206: ...C C Celsius COM Computer Output Microform used in reference to a communication port CTS clear to send ...
Страница 208: ...E EIA Electronic Industries Association EMI electromagnetic interference ENET Ethernet ...
Страница 209: ...F FCC Federal Communications Commission FIFO First In First Out ft feet ...
Страница 210: ...G G ground ...
Страница 211: ...H HSI handshake input HSO handshake output Hz Hertz ...
Страница 213: ...K Kbaud kilobits per second ...
Страница 214: ...L LED light emitting diode ...
Страница 215: ...M m meters MB megabyte ...
Страница 216: ...P PC personal computer PCI Peripheral Components Interconnect ...
Страница 218: ...S s seconds SCSI Small Computer Systems Interface ...
Страница 220: ...U UART Universal Asynchronous Receiver Transmitter ...
Страница 221: ...V V volts VDC volts direct current VXI VME eXtensions for Instrumentation ...
Страница 222: ...Important Information Warranty Copyright Trademarks Patents Warning Regarding Use of NI Products Compliance ...