Forum > Packages and Libraries

LazSerial Synapse

(1/2) > >>

eldonfsr:
Is possible change buffersize on Lazarial or synapse, because i see not all message come all information from true some are broken and midle..

Jurassic Pork:
hello,
what is your code to receive the messages ? your messages have end termination (ex CRLF) ?
Friendly, J.P

eldonfsr:
This procedure
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm_Main.SerialRxData(Sender: TObject);Var Str:String;begin  Str :=  Serial.ReadData;  CurPos := RPos( Char(13)+chr(10)+'>' ,Str);  if CurPos = 0 then begin    FTempStr := FTempStr + Str;  end  else begin    CurPos := RPos( Char(13)+chr(10) ,Str);    FTempStr := FTempStr + Copy( Str, 1, CurPos-1);    MDatas.Lines.BeginUpdate;    MDatas.Lines.Add(FtempStr);    MDatas.Lines.EndUpdate;    MDatas.SelStart := Length(MDatas.Lines.Text)-1;    MDatas.SelLength:=0;    FTempStr := Copy(Str,CurPos +1, Length(Str) - CurPos);    MDatas.Refresh;  end;  MCMd.SetFocus;end;       

af0815:
Use in SerialRxData no GUI Elements. Move the String in a save place and do not block this callback. Refresh your Objects and GUI in a other procedure.

eldonfsr:
I don't know now is direct received to the memo but look how the text is put on memo

MD
0,MG"
star
t
Pus
her
"

MD1
,AL
0,A
R50,
WA30
00,
MJ10


MD2
,PM
,MN,
DH10
00

MD3
,MR-
5000
,GO,
WS500
,DH,
WS500
,MA0,
WS500
,RP


MD1
0,MC
250,M
C50

MD11,MG
"Z AX
IS H
OME..
."
M
D12,W
A50,
MC200,W
A50,
GH,W
S
MD1
3,MG
"Z AX
IS HO
ME D
ONE."
,MC21
5,RA2
0,AM5
0,AD
100,A
R21
 
when must be like this;
MD0,MG"start Pusher"
MD1,AL0,AR50,WA3000,MJ10
MD2,PM,MN,DH1000
MD3,MR-5000,GO,WS500,DH,WS500,MA0,WS500,RP

MD10,MC250,MC50
MD11,MG"Z AXIS HOME..."
MD12,WA50,MC200,WA50,GH,WS
here is how i take data from serial port..

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm_Main.SerialRxData(Sender: TObject);Var Str:String;begin  MDatas.Lines.Add(Serial.ReadData);  MDatas.Refresh;   MCMd.SetFocus;end;  I don;t know if is when load data to memo or is how received from mode...

Navigation

[0] Message Index

[#] Next page

Go to full version