Delphi spcomm ¿Ø¼þ - Delphi / ÍøÂçͨÐÅ/·Ö²¼Ê½¿ª·¢
´óÏÀÃÇ°ï濴һϣ¬ÓÃspcomm¿Ø¼þ½øÐд®¿ÚͨÐÅ¡£
·¢ËÍÊý¾Ý£º
procedure TForm1.Button2Click(Sender: TObject);
var
strPressure:string;
begin
strPressure:='SEND'+#13;
comm1.WriteCommData(pchar(strPressure),Length(strPressure));
end;
½ÓÊÕÊý¾Ý£º
procedure TForm1.Comm1ReceiveData(Sender: TObject; Buffer: Pointer;
BufferLength: Word);
var
RecvBuf:string;
strPressure:string;
str:string;
begin
Setlength(RecvBuf,BufferLength);
move(buffer^,pchar(recvbuf)^,bufferlength);
strPressure:=recvbuf;
strPressure:=MidStr(strPressure,7,bufferlength-6);
strPressure:=LeftStr(strPressure,bufferlength-10);
str:='ѹǿÊÇ£º'+strPressure;
memo1.Lines.Add(str);
end
end;
¸øÆøѹ´«¸ÐÆ÷ͨÐÅ£¬µ«ÊÇTForm1.Comm1ReceiveData´Ëʼþ¾ÍûÓд¥·¢¹ý£¬ÎªºÎѽ?
Õ⼸ÌìÕâ¸öÎÊÌâºÃ¶à¡£¡£¡£
°ÑÄãµÄSpComm¿Ø¼þÊôÐÔÒ³ÀËùÓÐTrueµÄµØ·½¶¼¸ÄΪFalseÔÙÊÔ¡£
ÊDz»ÊÇ這個ÃüÁî無Ч°¡
(Ц°ÔÍõ) :
ÄÜÏêϸ½²½âÉèÖÃfalseÄǼ¸¸öÊôÐÔµÄ×÷ÓÃÂð£¿
ÄãÓ¦¸Ãµ½ÍøÉÏÈ¥Ê×ÏÈÑо¿Ò»Ï£¬Õ⼸¸öÊôÐÔµÄ×÷Óã¬ÄãÕâÑù±à³ÌÐò£¬¿Ï¶¨±à²»ºÃ
Ïà¹ØÎÊ´ð£º
Ò»Ö±ÏëʹÓÃdll£¬µ«delphiµÄdll×Ó´°Ìå¾³£Óи÷ÖÖÎÊÌ⣬±ÈÈçÖ÷´°¿ÚÓëdll×Ó´°¿ÚµÄ½¹µãÎÊÌ⣬×Ó´°¿ÚÖпؼþµÄtab¼ü¡¢Èȼü¡¢enter¼üµÈµÄÎÊÌ⣬×Ó´°¿ÚÍ˳öµÄÎÊÌ⡢ƽÃæ°´Å¥ÎÊÌâµÈµÈ£¬ÍøÕ¾ÉϽøÐÐÁËËÑË÷£¬Ã»ÓбȽÏÍêÃÀµÄ½â¾ö· ......
select * from shuju.DB where ¿ªÅ̼Û-ÊÕÅ̼Û<=0.02
¿ªÅÌ¼Û ÓëÊÕÅÌ¼Û ÊÇÊý¾Ý¿âÀïµÄ×Ö¶Î
select * from aTableName where ((¿ªÅ̼Û-ÊÕÅ̼Û) <=0.02 )
¿ªÅ̼۱ÈÊÕÅ̼۵ÍÁ½·ÖÒÔϵÄÇé¿ö
Mark!!!!!!
se ......
ÀÏʦ²¼ÖÃÁËÒ»¸ö¿ÎÌ⣬ÐèÒªÓÃDelphi×öÒ»¸öÓ°ÔºÊÛƱ¹ÜÀíϵͳ£¬µ«ÊÇÎÒÃÇ»¹Ã»ÓÐѧ¹ýDelphi£¬¸÷λ¸ßÊÖÄÜ·ñÖ¸µãһϣ¬ÈçºÎ½øÐÐϵͳÉè¼Æ£¬Ê±¼ä±È½Ï½ô¼±£¬Ð»Ð»°¡
ÎÒÒ²²»¶®£¬Ò²Ïëѧ£¡
ÎÒÒ²ÊÇ°¡£¬¸Ð¾õDelphiͦºÃµÄ£¬ÏÖ ......
ÓÃdelphiµÄÏÖÓпؼþдÊÕ·¢Êý¾ÝµÄ²âÊÔ£¬ÔÚÁ½Ì¨»úÆ÷ÉÏÊÔ£¬½á¹ûÍøËÙÊÇ100MµÄ£¬´ø¿í×î¸ßÖ»ÄÜÓõ½30%ÖÁ50%£¬ÊDz»ÊÇÓ¦¸Ãͨ¹ýÍø¿¨Çý¶¯Ê²Ã´µÄÖ±½Ó×öÊÕ·¢Êý¾ÝµÄ´úÂ룿ÎÒÊÇÔÚÒª×öÒ»¸ö¼«ËÙÇé¿öÏÂÍøÂçÊý¾ÝÊÕ·¢³ÌÐò£¬ÄÇλÓÐ×ö¹ý»ò ......
³ÌÐò¹Ø±ÕµÄʱºò³öÏÖÒì³££º
exception EAccessviolation in moudule JGJC.exe at C08BB35B Access wiolation at address C08BC35B.Read of address C08BC35B.
ÇëÎÊÒ»ÏÂÕâÊÇʲôÒâ˼°¡£¿
·ÃÎÊÔ½½ç
ÊÇ·ñ·ÃÎÊÁËÒѱ»Ê ......