Theotokos Posted January 10, 2019 Report Share Posted January 10, 2019 Bom dia a Todos! Estou com um cliente que esta com uma catraca antiga, e é ão antiga que só funciona utilizando o win98, pois utilizamos para comunicar o sistema que veio com ela (Concent.exe e RBCom.exe) ENTÃO GOSTARIA DE DESENVOLVER A ROTINA PARA COMUNICAR COM ELA E ENTÃO PODER UTILIZAR WIN7 A COMUNICAÇÃO É FEITA POR PORTA COM1, ALGUEM JÁ FEZ ALGO ASSIM, QUE POSSA ME AJUDAR COM A ROTINA DE COMUNICAR COM ESTA PORTA E DE COMO FAZER A CATRACA BLOQUEAR OU LIBERAR O ACESSO? TENTEI ESTAS INFORMAÇÕES COM A FABRICANTE... MAS NÃO CONSIGUI. Quote Link to comment Share on other sites More sharing options...
mkyx Posted January 10, 2019 Report Share Posted January 10, 2019 Deve ser semelhante à comunicação com balança pelo com1: ou com2: para balança, eu tenho uma rotina que lê a porta serial: function pegapeso() ** LEITURA DA PORTA NHANDLE:=Init_Port("COM1",9600,8,0,1,8000) OutBufClr(NHANDLE) // Limpa o Buffer de Saida OUTCHR(NHANDLE,CHR(5)) SYSWAIT(0.3) Bytes := InbufSize(NHANDLE) DADOS=SPACE(20) Buffer := InChr( NHANDLE, Bytes, @DADOS) UnInt_Port(nHandle) dados=alltrim(dados) ** tratamento das informações lidas, na variável DADOS Q=val(substr(dados,2,5))/1000 n1:="" for i=1 to len(dados) i0:=substr(dados,i,1) if i0$"0987654321." n1:=n1+i0 endif next q:=val(n1) IF Q<=0 Q:=0 ENDIF RETURN Q Talvez sirva para você. Theotokos 1 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted January 10, 2019 Author Report Share Posted January 10, 2019 Vlw @mkyx vou testar a sua rotina.... obgdao!!! Quote Link to comment Share on other sites More sharing options...
emotta Posted January 15, 2019 Report Share Posted January 15, 2019 Quer uma dica? Sai fora que é bomba... vc vai arrumar pra cabeça... Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 15, 2019 Report Share Posted January 15, 2019 Concordo com o Emotta. Mas... http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=15619&p=92471&hilit=catraca#p92471 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted January 16, 2019 Author Report Share Posted January 16, 2019 Quer uma dica? Sai fora que é bomba... vc vai arrumar pra cabeça... Concordo tmb....realmente é complicado essas coisas... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.