Omron integer subtract error

shrirampendse

Member
Join Date
Dec 2006
Location
Pune, India
Posts
157
Hello,

Something wrong with BCD and integer conversion it seems. I want to subtract 1 every second from a register, but something strange is happening , starting value in register is 1300 , now on every rising edge of 1 sec pulse i am subtracting 1 from it, result is ok till it reaches 1280 and then results are abrupt, it jumps to 1270, 1255, 1201 etc. Same thing happens for other register values. Instead of subtract instruction i used decrement still problem is same. I converted integer value coming into this register from hmi into BCD and back but problem remains.
Pls help , thanks
 
Last edited:
If your number jumps abruptly from 1300 to 1277 then you operation is counting in Octal.
while you are expecting it to display as decimal, or BCD.

I think I will go with a change of mind here,I now think its counting in decimal and displaying in Octal, hence the jump.
Play with the windows Scientific calculator entering 704 then 703 decimal and your answer will be 1300 then 1277 octal
 
Last edited:

Similar Topics

I have an old plc in the system I have, moxa nport was used to communicate with scada, I want to replace the plc with cj2m cpu33 and eliminate...
Replies
1
Views
36
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
2
Views
50
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
230
Hi There, I have couple of Omron PLCs connected on my kepserverex and my intouch reads data from kepserverex. I have been observing that roughly...
Replies
4
Views
130
Hi dear . I have a system with cj1m cpu11 etn. previously NT 5z HMI was connected with plc. recently my old HMI got damaged. I want to replace it...
Replies
12
Views
240
Back
Top Bottom