EasyManua.ls Logo

National Instruments PCI-8430 - Page 105

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...
ModifyingtheRS-485TransceiverModeProgrammatically
TomodifytheRS-485transceivermodeprogrammatically:
ChangetheNI-VISAwiremodeattribute.
TheNI-Serialsoftwareusesprogrammaticcontrolcodesandthe
DeviceIoControlWindowsfunctionforprogrammingtheRS-485
transceivercontrolmode.
SettingtheRS-485TransceiverControlModeonPCI,PXI,
USB,ExpressCard,andPCMCIAHardware
TosetandretrievetheRS-485transceivercontrolmodeusingthe
DeviceIoControlWindowsfunctiononPCI,PXI,USB,
ExpressCard,andPCMCIARS-485hardware,completethe
followingsteps:
1. Addthefollowinglinestoyoursourcecode:
#include<winioctl.h>
#include<NiSerial.h>
NoteYoucanfindtheheaderfileNiSerial.hintheNI-
SerialfolderwhereyouinstalledyourNational
Instrumentssoftware(typically,C:\Program
Files\NationalInstruments\NI-Serial).Itisalsoincluded
onyourNI-SerialsoftwareCD.
2. TheTRANSCEIVER_MODEattributecanhavethefollowing
values:
RS485_MODE_4WIRE
RS485_MODE_2W_ECHO
RS485_MODE_2W_DTR
RS485_MODE_2W_AUTO
3. TosettheRS-485transceivercontrolmode,use
NISERIAL_SET_RS485_MODEandDeviceIoControl.For

Related product manuals