02-15-2006 05:54 PM
02-15-2006 06:49 PM
At least the default Start Bit is 1 for Windows environment. The DCB struct, which is found in Microsoft SDK document, does not contain any field for Start Bit. Therefore it is impossible to change the Start Bit at Win32 API level. It is also true for VISA Srial, which does internally rely on Win32 API.
The DCB struct is documented at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/dcb_str.asp
Mind that this may not always be true, if any special add-on hardware such as NI's RS-485 board is attached.
02-15-2006 08:05 PM
02-15-2006 11:36 PM
02-16-2006 05:02 PM
Dear Makoto,
I tried putting delays between transmissions, but it didnot help. I still receive framing errors. However, I found out that the device I am trying to communicate with has two lines for Transmitted data (TTX+, TTX-) and two lines for Received data (TRX+, TRX-). It does not use any of the other handshaking lines. Currently, my serial session setup looks like the following (see below). Am I doing something wrong? Is there any other parameters that I need to set? Thanks.
rm =
new VisaComLib.ResourceManager();session = (VisaComLib.IMessage)rm.Open(portName, VisaComLib.AccessMode.NO_LOCK, 0, "");
ser = (VisaComLib.ISerial)session;
ser.BaudRate = 9600;
ser.DataBits = 8;
ser.StopBits = SerialStopBits.ASRL_STOP_ONE;
ser.Parity = SerialParity.ASRL_PAR_NONE;
ser.FlowControl = SerialFlowControl.ASRL_FLOW_NONE;
02-16-2006 06:39 PM
02-16-2006 06:59 PM
02-19-2006 08:28 AM