Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!
Public WithEvents IndicatorPort As New IO.Ports.SerialPort Public CurrCOMPort As New ArrayList Public Sub RequestProbeValues() Dim Packet(4) As Byte Dim intloop As Integer Try For intloop = 0 To CurrCOMPort.Count - 1 IndicatorPort = CurrCOMPort.Item(intloop) Packet(0) = 42 'Constant BMS message Packet(1) = 4 'Constant Length of Table upload Packet(2) = 6 ' Constant Command of Table upload Packet(3) = 23 Packet(4) = 152 IndicatorPort.Write(Packet, 0, 4) System.Threading.Thread.Sleep(100) Read() Next Catch ex As Exception MessageBox.Show("Unable to Communicate -Request Probe Value") Finally End Try End Sub Public Sub Read() indvalue = IndicatorPort.ReadLine() End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.