Omron Math

Clay B.

Lifetime Supporting Member
Join Date
Jun 2005
Location
Concord,NC
Posts
1,304
Ok now I have a math question. From what I have looked at so far the math is done in BCD. So as an example if I need to add 1000 to 10000 then I would set up as series of double registers. So if I understand this correctly then it would be as follows

I use command + BL(405)
W100
W102
W103

If I understand this correctly the actual function will be W100 and W101 added to W102 and W103 then stored in W103 and W104

When I look into W103 I should see 1000 and when I look into W104 I should see 10.

Is this correct or am I off in left field somewhere.
 
Thanks,

I have not done BCD math in a long time so I was hurting my head reading the help description.
 
Whoops! I should mention that the Binary Add (+, +L, etc.) functions, even though labeled as 'binary', work in decimal. ;)

EDIT: Well, Hex, but it's in the way we tell it to treat the number beforehand. Lemme look around a bit...
 
Last edited:
Ok I think I see what you mean:

If I want to add 320 to 10000 and I use the following form:

+(400)
W100
W101
W102

And W100 equals 320 and W101 equals 10000 decimal then W103 should equal 10320 decimal or 2850 Hex.
 
By Jove, I think he's got it! I'll refrain from calling you Eliza... Sorry for the "My Fair Lady" moment :D

While monitoring, you can view it in hex, decimal (signed or unsigned), or binary. If you have to work in BCD, then hex view works for that.
 
As a general rule I try and avoid BCD as much as possible. I think my biggest problem so far is understanding the terms but your help the help menu starts to make some sense.

FYI...Last time I programmed a Omron PLC was 1996 so I am a wee bit rusty.
 
No worries, Clay. I just got back into Omron in 2009 after a ten-year hiatus. Things have changed and even improved. String handling kinda stinks, but is better than it used to be, for instance.

Going OT for a moment, I apologize if I seem a bit pedantic at times. I'm still getting to know y'all and figuring out who knows what.
 
No problems... appreciate the help... Your answers were spot on with what I needed. Thanks to you I am about a third of the way thru my program and I won't be pulling my hair out all weekend.
 
BCD is only really required for the older processors. All the newer versions (CJ, CP ) can do binary & floating point easily.
What CPU are you working with?
 
From another thread, this is a CP1L. Sorry for the confusion. Clay is just re-familiarizing himself with Omron and poking around on the comparatively new features. :)
 
From another thread, this is a CP1L. Sorry for the confusion. Clay is just re-familiarizing himself with Omron and poking around on the comparatively new features. :)
Yeah, I found that thread as well after posting this.
Unless he has a specific need to use BCD math, then he should not be, nor should we be advising it IMHO
 
No such advice was given. Only answers to the posted questions. In fact:
I should mention that the Binary Add (+, +L, etc.) functions, even though labeled as 'binary', work in decimal. ;)
Actually the theme of this thread pushed more into 32-bit implementation than anything else.
 
Using Binary Math. The name through me a bit since I am more used to the term integer. As a rule I try and avoid BCD whenever possible. THe PLC I am currently working on is a CP1L. Now I just need to get it to talk to my RED Lion G3 HMI.

So far its going pretty good. Getting used to the help menu has been a bit of a curve.

Got my 32 bit floats working fine so its improving.
 

Similar Topics

I am stuck on what is likely a misunderstanding of how Omron handles data versus Rockwell. I need to scale an analog input to monitor the...
Replies
8
Views
1,550
Hello I am in need of a bit of math help on the Omron CGS1- I am a AB Programmer so all of the conversion to do math is a bit confusing. I...
Replies
3
Views
3,169
Good morning everyone I’m currently working on a omron device net and have a nord drive that fell off the network. I have limit knowledge in...
Replies
2
Views
97
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
85
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
215
Back
Top Bottom