Sorry, I don't understand what you're trying. Could you please rephrase?
Armin
armin my appologies.... I have figure out that last problem i was
posting, however a funny issue poped up
in my code below how can i show me Len as 08 and my Cmd as 02. when it
displays in the messagebox it shows
up as a 2 and a single 8 i need it to show as a 02 and 08 also when i
display my pmsg it will only display 1 0 and not both zero
example of the comm1.output should be: * 08 02 97 00 00 00
* is a defined constant
08 is the len
02 is the cmd
97 is the lobyte value
00 is the hi byte value
00 is the lobyte location
00 is the hibyte location
Public Sub table_upload_req(ByVal lobyte As Byte, ByVal hibyte As
Byte, ByVal locationlobyte As Byte, ByVal locationhibyte As Byte)
Dim Len As Byte = &H8
Dim Cmd As Byte = &H2
'adc_value = &H0 ' read ADC value and put into storage var
'location_value = &H0
crc_value = 0
Dim msg_size As Byte = Len - 2
pmsg(0) = Len
pmsg(1) = Cmd
'Dim i As Integer = 0
'Do While i < intarrayindex
' single table upload request packet
'location_value += 1
'adc_value = Array_AVG(i) ' asign value array to adc_value
pmsg(2) = (String.Format("{0:X2}", lobyte))
pmsg(3) = (String.Format("{0:X2}", hibyte))
pmsg(4) = (String.Format("{0:X2}", locationlobyte))
pmsg(5) = (String.Format("{0:X2}", locationhibyte))
'crc_value = Make_Bitwise_CRC16(msg_size)
MessageBox.Show(BMS & pmsg(0) & pmsg(1) & pmsg(2) & pmsg(3) &
pmsg(4) & pmsg(5)) '& AscW(crc_value) & AscW(crc_value))
' i += 1
'Loop
End Sub