I'm using VBA to communicate with the RS485 port.
The only way I can communicate successfully with the RS485 port is when I manually change the wire mode for the port in Device Manager by changing the transceiver mode setting. I can change all other port settings programmatically.
I am not using the NI library for communicating with the RS485 port. I am using Windows API function calls similar to this here: http://dev.emcelettronica.com/serial-port-communication-in-excel-vba.
In the NI library, the command for changing the wire mode is viSetAttribute(ASRL4::INSTR (0x03EF4588), ASRL_WIRE_MODE, 3). I am looking for a way to accomplish this using Visual Basic (or VBA) without using the NI library.
Any suggestions?