Jump to content

Recommended Posts

Posted

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.


Posted

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.

Posted

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...