Home > database >  Pb how hexadecimal string to the serial port read return data
Pb how hexadecimal string to the serial port read return data

Time:10-11

I think via a serial port to read meters length on the table, I call mscomm32. Ocx, download a few program all have no reaction, then detected the pb is not support hexadecimal string, please help to see how to implementation,
Is ole_1. Object. The Output="03 01 00 01 00 02 95 cb" the command how to convert hexadecimal

CodePudding user response:

Ideas should be so that you can: 1. Each hexadecimal conversion into decimal, 2. Char (decimal) into a string,

CodePudding user response:

reference 1st floor qq_18806059 response:
ideas should be so that you can: 1. Each hexadecimal conversion into decimal, 2. Char (decimal) into a string,


Hello, I changed according to your method statement:
Ls_parm=char (1) + char char (3) + (0) + char char (1) + (0) + char (2) + + char char (149) (149) + char (203)
Ole_1. Object. The Output=ls_parm
Still didn't return value, don't know what went wrong there
I used to read electronic scale program is as follows, is also online, is a return value

CodePudding user response:

refer to the second floor michael_home response:
Quote: refer to 1st floor qq_18806059 response:

Ideas should be so that you can: 1. Each hexadecimal conversion into decimal, 2. Char (decimal) into a string,


Hello, I changed according to your method statement:
Ls_parm=char (1) + char char (3) + (0) + char char (1) + (0) + char (2) + + char char (149) (149) + char (203)
Ole_1. Object. The Output=ls_parm
Still didn't return value, don't know what went wrong there
I used to read electronic scale program is as follows, is also looking for online, there is a return value of the
Statements like this: ole_1. Object. The Output="ATV1Q0" + char (13)
  • Related