Writecomm and CHR()

Writecomm and CHR()

Postby mtajkov » Mon Mar 04, 2019 2: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) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: Writecomm and CHR()

Postby Antonio Linares » Tue Mar 05, 2019 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests