hbcomm.lib - xharbour - fwh1111

hbcomm.lib - xharbour - fwh1111

Postby roberio » Sun Mar 11, 2012 11:14 pm

hbcomm.lib para xharbour e fwh1111
donde puedo encontrar?

muchas gracias
FWHX 11.11 # xHarbour 1.2.1 Rev.9411 ## Borland C++ 5.8.2
User avatar
roberio
 
Posts: 27
Joined: Fri Jul 22, 2011 4:04 am

Re: hbcomm.lib - xharbour - fwh1111 (RESOLVIDO)

Postby roberio » Sun Mar 11, 2012 11:37 pm

resolvido
no link com a hbcomm.lib do link :
http://www.fivewin.com.br/forum/topic.a ... C_ID=20198

link da lib:
http://www.salc.com.br/atual/hbcomm.lib

a funcao usada:
Code: Select all  Expand view

*--------------------------------------
Function fLeitura(nTara, oQtd, cPorta)
*--------------------------------------
Local cDados, nPeso

 Default nTara:=0
 Default cPorta:="COM1"

 nHandle:=Init_Port(cPorta,2400,8,0,1,4000)

 If nHandle <= 0
    MsgStop("Erro ao abrir a porta: " + cPorta + CRLF+"Verifique se a mesma não está sendo usada por outro programa.", "Alerta!")
    Return nil
 Endif

 OutBufClr(nHandle)      // Limpa o Buffer de Saida
 OutChr(nHandle,CHR(5))
 SysWait(0.3)
 Bytes := InbufSize(nHandle)
 cDados=Space(20)
 Buffer := InChr( nHandle, Bytes, @cDados) //LER BUFFER DE ENTRADA DA BALANCA
 UnInt_Port(nHandle)
 nPeso=(val(substr(cDados,2,5))/1000)-nTara

 oQtd:Varput( nPeso )
 oQtd:Refresh()
 oQtd:SetFocus()

Return NIL
 


obrigado
FWHX 11.11 # xHarbour 1.2.1 Rev.9411 ## Borland C++ 5.8.2
User avatar
roberio
 
Posts: 27
Joined: Fri Jul 22, 2011 4:04 am


Return to All products support

Who is online

Users browsing this forum: No registered users and 0 guests