Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

RS485 Transceiver Mode setting resets after closing VISA session

$
0
0

I have a PXIe-8431/8 that I am trying to use in 2-wire Auto mode on all ports.  I know I can change this setting from the default 4-wire in MAX when running as Administrator, as well as with Device Manager.  However, I would like to do this programatically (my serial communication is implemented using the .NET SerialPort class, but I can use C++ or TestStand to change this setting if needed).  I've tried using DeviceIoControl as well as viSetAttribute.  In both cases, if I read the setting back after writing it, it is correct (RS485_MODE_2W_AUTO (3)).  If I close the CreateFile() handle or the VISA session I used to change the setting and then open a new session or handle, reading the Transceiver Mode attribute returns the default of 0 (RS485_MODE_4WIRE).  I have tried running my code as Administrator with the same results.

Since the transceiver mode can be changed in MAX or Device Manager, I know this setting can be persisted across multiple sessions.  How do I save this setting across multiple sessions programatically?

 

Thanks,

 

Brandon


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>