> Hello, > > sorry for ressending. I've forgot to say it's about MS Visual Basic. > > The MSComm control have the option to put the received bytes as text on > a string variable (comInputModeText)or as binary data on a variant variable > (comInputModeBinary). > > When using comInputModeBinary how can I retrieve the array of data > (integers) received? > > Thanks, > > Brusque Below is a quotation from MSDN: (To find the original article search MSDN on "InputMode Property Example". If MSDN is not properly installed search VBREF98.CHM) ______________________________________________ Visual Basic: MSComm Control InputMode Property Example This example reads 10 bytes of binary data from the communications port and assigns it to a byte array. Private Sub Command1_Click() Dim Buffer as Variant Dim Arr() as Byte ' Set and open port MSComm1.CommPort = 1 MSComm1.PortOpen = True ' Set InputMode to read binary data MSComm1.InputMode = comInputModeBinary ' Wait until 10 bytes are in the input buffer Do Until MSComm1.InBufferCount < 10 DoEvents Loop ' Assign to byte array for processing Arr = MSComm1.Input End Sub ___________________________________________ -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.