mr_electrician

IR Theory

8 posts in this topic

I am really struggling here to understand how these IR's work.  From the screen shot can someone explain to me what is happening with the IR12?  I am going to take a stab at it but is D111 being moved into IR12 and thenIR12 with and offset of 1 is being moved into ,IR1?  What does the "," represent before the IR12?

IR Theory.jpg

IR Theory2.jpg

Share this post


Link to post
Share on other sites

 

Share this post


Link to post
Share on other sites

That's something to get you started. It doesn't explain the SETR instruction which I've never used.

One note I have is, the PLC Address they are referring to is the PLC's physical address. You don't normally see this nor do you really need to know unless you are troubleshooting something out of bounds. Yes, be careful if you are working on a live process. There is an Omron manual that maps these physical addresses to CIO, H, D, E, etc..., but I don't remember which one.

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks.  I will check out the attached.  

I have a handle of the SETR instruction.  It's the IR that is really hard to follow as you cannot see any values.  It's really hard to follow and troubleshoot.  It's a 15 year old program that my employer  keeps dumping into their machines before they go out and no one at work has a solid grasp on it either and it keeps getting thrown off to me.

Edited by mr_electrician

Share this post


Link to post
Share on other sites

Posted (edited)

To answer your question directly, the MOV instruction is moving the value pointed to by IR12 (the value in DM111) into another address pointed to by IR1(The value in ?). Somewhere else in your program you should find a SETR or MOVR to IR1 which sets the address to be pointed to.

The 1,IR12 means that on the next execution, the contents of D112 will be written from and so on, as the "1," means increment by 1.

Sorry, that's wrong.

Edited by IO_Rack

Share this post


Link to post
Share on other sites

OK. I apologize as I'm leaning a bit more about this than I thought. :lookingaround:

The SETR is more complex than I thought. IR12 contains an address that's being pointed to by Table 2, with an offset of the value in DM111.

You'll also need to find a DIM(631) instruction that defines the table.

Share this post


Link to post
Share on other sites

Posted (edited)

Sorry for the Friday night confusion. :doh: There are a lot of indirects and offsets going on here. Without seeing the rest of your code, I made up an example. I struggle a bit explaining these. ***EDIT***:  Annotation 3) There are 5 records total in this example. Not 20.

MrPLC_Table.thumb.JPG.d9b79bed44d138bf3b

Edited by IO_Rack
1 person likes this

Share this post


Link to post
Share on other sites
On 3/28/2020 at 11:33 AM, IO_Rack said:

Sorry for the Friday night confusion. :doh: There are a lot of indirects and offsets going on here. Without seeing the rest of your code, I made up an example. I struggle a bit explaining these. ***EDIT***:  Annotation 3) There are 5 records total in this example. Not 20.

MrPLC_Table.thumb.JPG.d9b79bed44d138bf3b

Your example is extremely helpful but admit I will need to really dwell on this to fully understand.  Thanks so 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