Home > Software engineering >  VB to send HEX format data COM small programs
VB to send HEX format data COM small programs

Time:09-21

1), the first displayed on the PC "1, electric start", and then send COM1 port in HEX format "aa 01 01 aa 02 01"
Setup for 7000 ms after execution next
2) and then displayed on the PC "2, they finished", and send "aa 01 00" in HEX format, setup for 67000 ms after execution next
3), and then in the PC shows "start" 3, shock, and sent in HEX format "aa 01 01," setup for 10000 ms after execution next
4), and then in the PC display "4, they finished", and send in HEX format "aa 01 00 setup for 66000 ms after execution next
5), and so forth...


What language is good, useful VB realize the code?

CodePudding user response:

VB to achieve, but need to consider is:
HEX format is shown as 00 - so-called FF string, the essence is still passed 0-255 ASCII value, will be HEX form of string, converted to a decimal (0-255),
VB & amp; H00 value=0, & amp; HFF value=255,
Appropriate within the scope of digital, prefix to & amp; H, can be directly said hexadecimal digits, for example, the hexadecimal notation & amp; H10 represent decimal 16,

CodePudding user response:

The building Lord, you said "send in HEX format", is to send a hexadecimal number, or hexadecimal string?

Another way, your aa is two letters to show, or the number 170?

CodePudding user response:

Your search:
VB serial interface communicationExample a handful, key only clear agreement didn't you?

CodePudding user response:


Electric shock, this machine is going to treat Internet addiction,,,

CodePudding user response:

Byte ()

CodePudding user response:

Ran q&a,

CodePudding user response:

Just find a vb communication example, change the line

CodePudding user response:

This seems to use VB, c #, Java, what all can
  • Related