Hi,
Preload your dummy array with all 255's or whatever, then after your SERIN statement, dump the content of the dummy array and see if IT now has your zeros. Then you KNOW that something is writing outside of where it should.
/Henrik.
Hi,
Preload your dummy array with all 255's or whatever, then after your SERIN statement, dump the content of the dummy array and see if IT now has your zeros. Then you KNOW that something is writing outside of where it should.
/Henrik.
Add this before serin2
for i = 0 to 34
MAil_123[i]="A"
next i
hserout [str mail_123,13,10]
and after serin2
hserout [str mail_123,13,10]
From first HSEROUT got AAA... then CrLf, second Hserout got just CrLf...
I try to move Mail_123 var byte[36], and that array is always cleared...
Hi,
Are you SURE you're sending the correct length strings from your VB program? Have you verified that?
Have you tried breaking it up in several SERIN statements?
I still think something is either writing outside of "its space" or not getting enough bytes so the next input "spans" two arrays or something...
/Henrik.
I'm 100% sure that i send correct length... I check this several time's.
Now I'll try.
serin2 PC_RX,8588,1000,PC_Data_Mail,[wait("Mail:"), str Mail_Alrm\5]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str MailServer\20]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_port\6]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_User\35]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_Pass\35]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_Adr\30]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_Subj\20]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_Msg\50]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_FileName\20]
serin2 PC_RX,8588,1000,PC_Data_Mail,[Mail_Name_Tip]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_RCPT1\35]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_RCPT2\35]
serin2 PC_RX,8588,1000,PC_Data_Mail,[str Mail_RCPT3\35]I try to use Mail_pass in another serin2 statement, and same problem. I try to put another var, before and after in serin2 statement and same...
It won't to work without dummy var...
And you have all your arrays declared properly, ie Arrayname VAR BYTE[Lenght] ?
I once forgot the [] around the length and it led to quite a bit of headache untill I posted the code here and someone spotted it right away.
/Henrik.
I'll just leave dummy array, and continue...
Thank anyway.
OK, I can understand that but I have a feeling that doing so will come back and bite you you sooner or later.
since you have 1 long array and you know where the smaller arrays are in the longer array,
serin2 PC_RX,8588,1000,PC_Data_Mail,[wait("Mail:") ]
........RCVint on....... 'turn on rcv interrupt to take your 200 (more or less) chars into your array
continue............................
.
.
.
RCVint:
place rcv chr to array[x]
char count +1
char indx +1...[x]
turn off when count = chars to rcv
Don
Last edited by amgen; - 13th November 2011 at 13:31.
Bookmarks