FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Writecomm and CHR()
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Writecomm and CHR()
Posted: Mon Mar 04, 2019 02:23 PM
Calculating LCR:

nMen:=NUMXOR( '30', '36', '03')

if len(alltrim(hb_NumToHex(nMen))) = 1
mLcr="0"+alltrim(hb_NumToHex(nMen))
else
mLcr=alltrim(hb_NumToHex(nMen))
endif

The value is: mLcr=05

WriteComm( nComPos, Chr(0x02)+Chr(0x02)+Chr(0x30)+Chr(0x36)+Chr(0x03)+Chr(0x01) )

How to change the value 01 Chr(0x01) to 05 (mLcr) Chr(0x05)?

Best regards,
Miloš
Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Writecomm and CHR()
Posted: Tue Mar 05, 2019 08:15 AM

Miloš,

WriteComm( nComPos, Chr(0x02)+Chr(0x02)+Chr(0x30)+Chr(0x36)+Chr(0x03)+Chr(0x05) ) ??

Please explain it better, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion