petrb

Starting with Omron CX-P

5 posts in this topic

Hi, I've have few years of experiences with AB and Siemens and just starting with Omron CX-P. I’m upgrading CQM1H-CPU51 to CJ2M-CPU12 and would love to gain more knowledge about Omron. Right now I’m struggling with data types. I read through few topics here and found out this. It’s recommended to use CHANNEL (double word) and BOOL. But what if I need to use signed data type? Some function only supports certain data type. For example “+C” support only INT, but when I use UINT instead, it’s still working fine. Also some data types look same to me. CHANNEL – UINT etc. When typing constants # means HEX, & means decimal. Also I find out what letters mean in variables CIO (Core I/O Area), A (Auxiliary Area), D (Data Memory Area), E (Extended Memory Area, H (Holding Relay Area), W (Internal Relay Area). Is that correct?

Could me point me to some topic or quick manual, about starting with Omron?

Thanks for any advices
 

Share this post


Link to post
Share on other sites
7 hours ago, petrb said:

I’m upgrading CQM1H-CPU51 to CJ2M-CPU12 and would love to gain more knowledge about Omron.

This should be a fairly easy conversion if your I/O modules are simple. Even some special I/O converts well. In CX Programmer, if you change the PLC Type, the conversion will be done automatically.

7 hours ago, petrb said:

I read through few topics here and found out this. It’s recommended to use CHANNEL (double word) and BOOL. But what if I need to use signed data type?

If your familiar with Siemens then I wouldn't worry too much about this. Some users have a difficult time when the PLC doesn't automatically convert data types like AB does.

1) Assigning a Data Type to a Symbol (variable) is for the programmers convenience.

2) The instruction determines how the Symbols will be treated. Meaning, +(400) will always add as a signed INT and +F(454) will always add as a REAL regardless of what you assigned the symbol.

3) Be aware of how you are monitoring a Symbol when online.

7 hours ago, petrb said:

Also I find out what letters mean in variables CIO (Core I/O Area), A (Auxiliary Area), D (Data Memory Area), E (Extended Memory Area, H (Holding Relay Area), W (Internal Relay Area). Is that correct?

This is correct. Siemens precedes a memory location with the data type. Omron precedes it with the type of memory.

'CIO' will be the physical I/O. Anything out of range of the physical I/O may be freely used.

'A' memory is generally used for system memory. (Always ON, Clock Pulses, instruction feedback, etc...)

'W' memory is yours. This is what you may freely use for most of your programming.

'D' is retentive. Generally used in WORDS. (INT, DINT, REAL, etc...)

'H' is retentive. Generally used as bits. May be used as WORDS.

'E' is retentive. It extends 'D'. The amount will be determined by the CPU type you purchase. 

 

I believe the manuals that come installed are pretty good. When I'm programming, I tend to right click on an instruction and choose 'Instruction Help'.

1 person likes this

Share this post


Link to post
Share on other sites

Thank you for great answer!

Conversion is pretty easy, I'm just getting lot of data type mismatches warning (for example +C with UINT). So I'm trying to figure out, if it's an issue or if I the program how it is.

1) Assigning a Data Type to a Symbol (variable) is for the programmers convenience.
2) The instruction determines how the Symbols will be treated. Meaning, +(400) will always add as a signed INT and +F(454) will always add as a REAL regardless of what you assigned the symbol.

If I understand it right, 8 bit variable 1111 1111 can be 255 or -1 (unsigned/signed byte) based on the instruction?

19 hours ago, IO_Rack said:

Siemens precedes a memory location with the data type. Omron precedes it with the type of memory.

You mean Siemens MB0 "compared" to Omron  D0? If so, Siemens uses both memory location and data type.

Help for Omron CJ is kinda weird, there is lot of information, but it's hard to understand it. But I'm comparing it with S7 Manager help, which is exceptional.

One more question about warnings. Why I'm getting duplicate bit warning for bit  used in Set/Reset? It's not wrong, it's just style of programming.

Share this post


Link to post
Share on other sites
On ‎4‎/‎18‎/‎2018 at 4:11 AM, petrb said:

If I understand it right, 8 bit variable 1111 1111 can be 255 or -1 (unsigned/signed byte) based on the instruction?

That's correct although the math instructions are 16 bit.

On ‎4‎/‎18‎/‎2018 at 4:11 AM, petrb said:

You mean Siemens MB0 "compared" to Omron  D0? If so, Siemens uses both memory location and data type.

My mistake, I haven't used Siemens in a while. You are correct. I do find the transition from Siemens to Omron much easier than from AB. With Siemens and Omron, you can access the same memory locations in multiple data types. In Siemens you precede it with the type and Omron you would choose the proper instruction. 

On ‎4‎/‎18‎/‎2018 at 4:11 AM, petrb said:

Help for Omron CJ is kinda weird, there is lot of information, but it's hard to understand it.

Your not the first person to say that. I've been using Omron for a long time and gotten used to it. They explain things very explicitly. They write a lot of stuff that we already know as programmers like the size of the data type and the range of memory. Omron likes to explain that the grass is green and the sky is blue.

On ‎4‎/‎18‎/‎2018 at 4:11 AM, petrb said:

One more question about warnings. Why I'm getting duplicate bit warning for bit  used in Set/Reset? It's not wrong, it's just style of programming.

You can change the Program Check Options under the PLC menu.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now