MSComm1.CommPort = 1 MSComm1.Settings = "9600,O,8,1" MSComm1.PortOpen = True MSComm1.Output = Chr(&H2B) & _ Chr(&H4) & _ Chr(&H3) & _ Chr(&HE8) & _ Chr(&H0) & _ Chr(&H2) & _ Chr(&HF6) & _ Chr(&H71) MSComm1.PortOpen = False
Dim Port As SerialPort = New SerialPort("COM1", 9600, Parity.Odd, 8, StopBits.One) Port.Open() Port.Write(System.Convert.ToChar(&H2B) & _ System.Convert.ToChar(&H4) & _ System.Convert.ToChar(&H3) & _ System.Convert.ToChar(&HE8) & _ System.Convert.ToChar(&H0) & _ System.Convert.ToChar(&H2) & _ System.Convert.ToChar(&HF6) & _ System.Convert.ToChar(&H71)) Port.Close()
ToChar()
ToByte()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)