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've come across a system running omeron cx-programmer version 9.42. Am I going to need to find a legacy version of the software to edit and...
Replies
1
Views
70
Has anyone done SMS messaging from an Omron CJ2J-CPU31 PLC? If so could you help please. Omron here in Oz have not had any experience doing this...
Replies
5
Views
202
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
82
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
3
Views
141
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
287
Back
Top Bottom