how come #0010 hex become &22 whwn i converted it with BCD?

kartika

Member
Join Date
Jul 2011
Location
Lampung
Posts
31
i'm confusing about an instruction in PLC, need your help, please..
i MOV(021) a data #0010 in hexadecimal then i stored it in memory D100
after that i'm using BCD(024)which is convert my data in D100 to D101, and finnaly i found the result is &22, anyone..would u please explain my how come the result from 10hex/ 16 in decimal become 22 in BCD?
thank you very much for the attention

untitled.JPG
 
Your Example appears to be an Omron PLC done in CXProgrammer. Is that correct? Which PLC Model are you using? Do you understand the significance of the # and & Symbols?

Stu....
 
A simple explanation is that the hexadecimal number(16)is 8 bits wide
00010000
when its converted to BCD it changes to two 4 bit wide numbers as BCD can only represent 0-9
therefore it converts the bit pattern to 0001 (1) 0110 (6) when this is viewed it is seen as 00010110 (22)

I hope this helps

Steve
 
There is a really good tool in Windows, particularly Windows 7, and that is the calculator. I often reckon it is the best and most useful part of Windows.
Open the calculator and change the view - if Windows 7 change to programmer view. There you can type in a number in hex and then change it to decimal, octal or binary. BCD is not represented but you cxan see the affect that conversion has on a number.
in the back of your Omron manual there is a chart that explains all with respect to these conversion.
May I also highly recommend a conversion program that is available on the Internet - it is Conversions.exe. It changes all manner of measurements for you from imeprial to metric and back again. Excellent program.
By the way, # is used in Omron for hex and BCD numbers and & for decimal numbers.
 
thanks for all ur help friends, its helpfull..
i'm using Omron CS1G-CPU45H, in CX programmer # its represent hexadecimal, and & represent decimal.
 

Similar Topics

I had a 1769-L23-E PLC with IO as follows: [1] imbedded inputs [2]Imbedded outputs [3] 1769-IQ32 [4] 1769-OW16 I was getting a major fault...
Replies
8
Views
746
Hi, I currently have a 1734-AENTR module connected to a PLC in a DLR. When trying to run the program, and going to the AENTR, I run into error...
Replies
2
Views
1,061
Hi: I have been using this module for years for my testing. Now it does not work and have no idea how to fix this. Will be very grateful for your...
Replies
9
Views
10,814
Hey there, this is my first thread/question, so hello plctalk-community! :yeah: I got a modul-error for the 1732E-8IOLM12R from the ArmorBlock...
Replies
0
Views
2,349
Hi all, I have a CompactLogix system in the field that had been running without any issues for several months, until one of the 1769-IF8 modules...
Replies
1
Views
7,446
Back
Top Bottom