NAK is normally a sign that you have constructed a checksum wrongly - so look at your code, and find exactly how you are building it.
It's worth trying passing a message from the device through your code to see what the difference in the received sumcheck and the calculated sumcheck values are.
If that doesn't help, you will need to go back to the documentation and look closely at how the check should be worked out - there are a large number of ways it can be generated, so we can't tell you "do this" and it'll work.
"ok got it.in a manual there is a sum of hexa from FN(Frame Number) to ETX(End of Text) If my string is 02(STX)31(FN 1)Test(it is my Text)03(ETX)44(CS1)34(CS2)0D(CR)0A(LF) Finally the striing is 0231546573740344340D0A in it Sum from 31 to 03 it becomes a 1D4 and my checksum will beccome last two digit of it 44 and 34 (i.e 44 for D 34 for 4) This is how my checksum is calcuated. sorry i am not able to send manual due to company policy."
That's cool - it's not a problem.
Try this:
Private Sub button1_Click(sender As Object, e As EventArgs)
frmMain.ActiveForm.Text = "Hello!"
Dim inputData As Byte() = New Byte(6) {}
inputData(0) = &H2
inputData(1) = &H31
inputData(2) = CByte("T"C)
inputData(3) = CByte("e"C)
inputData(4) = CByte("s"C)
inputData(5) = CByte("t"C)
inputData(6) = &H3
Dim outData As Byte() = CalculateCheck(inputData)
End Sub
Private Shared ToHex As Char() = "0123456789ABCDEF".ToCharArray()
Private Function CalculateCheck(inputData As Byte()) As Byte()
Dim outData As Byte() = New Byte(inputData.Length + 3) {}
Dim check As Integer = -inputData(0)
Dim i As Integer = 0
For Each b As Byte In inputData
outData(i) = b
check += (CInt(b) And &Hff)
i = i + 1;
Next
check = check And &Hff
outData(i + 0) = CByte(ToHex(check >> 4))
outData(i + 1) = CByte(ToHex(check And &Hf))
outData(i + 2) = &Hd
outData(i + 3) = &Ha
Return outData
End Function