dawnvi
Posts: 1
Joined: Mon Jun 19, 2017 12:23 am

omron plc usb connection

Mon Jun 19, 2017 12:26 am

I refer to this information
https://program-plc.blogspot.com/2015/1 ... d-for.html
But I do not understand
write_array = [0xAB,0x00,0x16,0x80,0x00,0x2,0x00,0x00,0x00,0x00,0x00,0x00]
0xab .... What means

User avatar
DougieLawson
Posts: 28794
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: omron plc usb connection

Mon Jun 19, 2017 4:01 pm

0x## is a notation for hexadecimal (base 16) numbers.
So when we see "0xAB" is A * 16 + B [A is 10, B is 11, C is 12, etc.] == (10 * 16) + 11 == 160 +11 = 171 decimal.
0x16 is (1* 16) + 6 == 22 decimal
0x80 is (8 * 16) + 0 == 128 decimal

Lots more detail here: https://learn.sparkfun.com/tutorials/hexadecimal
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Return to “Beginners”

Who is online

Users browsing this forum: HawaiianPi and 33 guests