Kiiza

CX-PROGRAMMER MOVE INSTRUCTION

6 posts in this topic

Hello guys,

I need help. I have an OMRON PLC; CJ2M series which I am not very familiar with. I need to do comparisons, but I see that do that I can't just compare with a value. It looks to me that I have to store the value I need to use to compare in a memory address and reference to the memory address for my comparison. 

Is it possible for me to compare using a value and not have to first go through a memory address?

Is there a way to use the instruction to store the value in a memory location ?

Or do I specifically have to use CX-Designer for me to wrote the value to a memory location?

Thanks in advance.

Share this post


Link to post
Share on other sites

I depends what you want to compare. For example use = inline - say input word 2003 &2375 to an output. Use the inline instructions such as =, >, <, =>, =< - there are a heap of them.

Share this post


Link to post
Share on other sites

I have attached two Pictures. In the first picture (OMRON), everything is OK. In the second picture (OMRON2), the instruction remains red because I was trying to compare direct with a value of 105. Does OMRON not allow that?

OMRON.PNG

OMRON2.PNG

Share this post


Link to post
Share on other sites

Hallo,

105 isn't value it is CIO address. It will be #105 (Hexa) or &105 (Decimal).

Edited by vasekd

Share this post


Link to post
Share on other sites

The instruction will also show up red if there is no resultant output. & in front of a number is word type INT or UINT - # is word type HEX. You can use either but have to be aware that there may be confusing results.

As you have shown in your example 105 is a CIO address - that also is fine and can be used that way - in my typed example above 2003 is a CIO address and &2375 is a constant - this can be UINT or INT. In the example above my intent was that it is a UINT.

Omron is very flexible - the reason I love them.

Share this post


Link to post
Share on other sites

Now I understand.

Thank you very much.

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