EasyManua.ls Logo

National Instruments PCI-8430 - Page 121

National Instruments PCI-8430
237 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SettingRingIndicate(RI)andDataCarrier
Detect(DCD)withDeviceIoControl
TherearetwowaystosetandretrievetheseRS-232signals:
SetandreadtheNI-VISALineRIStateandLineDCDState
attributes.
TheNI-Serialsoftwareusesprogrammaticcontrolcodesandthe
DeviceIoControlWindowsfunctiontoretrievetheseRS-232
signals.
ToretrievetheseRS-232signals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SERIAL_RI_OUTattributecanhavethefollowingvalues:
SERIAL_RI_ON
SERIAL_RI_OFF
3. TosettheRS-232signalRIwhenthetransceiverisinDCEmode,
usethefollowingcode:
DWORDl_ByteCount;
DeviceIoControl(
PortHandle,
NISERIAL_SET_RI,
(LPVOID)NULL,
0,

Related product manuals