Naw VB is slow but it isnt that slow. Iv done experiements with it that slows that VB handles baud rates of 9600 easily and you dont even need a buffer and it doesnt lose any data. This is where the problem comes. Last night i have played with the code enough that i have narrowed down where the problem is but i dont know how to fix it.
This is what i am doing. I get 6 ascii values of data at a time from the microcontroller Ram. I send this to VB then send this to excel, for everytime i do this i want 3 characters to go in row A1 and the other 3 to go in B1 of excel, then everytime i get data it fills the row beneath it.
This is the way i do it with " hight" being greater 3 bytes and " low" being lower 3 bytes and i increment row each time i get data
oSheet.Cells(1, 1).Value = "Force"
oSheet.Cells(1, 2).Value = "Presure"
oSheet.Cells(1, 3).Value = "Flag"
' Add Data
oSheet.Cells(row, 1).Value = hight
oSheet.Cells(row, 2).Value = low
This method puts them in their respective rows but it is very slow.
I want to get 100 data per second, but the rows in excell only fill up at 17 rows per second creating tons of problems. This way excell uses 98% -100% of system resources. I tried something else because i figured each time excel needs to figure out which row to put the data, it takes a lot of time to figure this out so
Print comEvReceive
' s = g_s6 + "\" + g_s5 + ".xls"
' Open s For Append As #1
' Print #1, hight & " " & low; "
' Close #1
When i do it this way, The system works extremely fast and there is absolutely no lag. IT fills the row with the data values. The problem is if i do it this way how can i get " hight" to go to A1 and low to go in B1
both goes into A1. If i can figure this out, i can do it this way.
Please i really am stuck here and i need to get this over with. thanks
BTW g_s6 and G_s5 is just location and filename that the user will enter.