Sign in to follow this  
Followers 0
netdomain

Help INDEX REGISTORS

6 posts in this topic

Hi All, I am performing some data search from D0 TO D100 using RSearch and Index Registers. I want to know how to move the data contained within the address in the index registor or display it on HMI??? For example, I have a value stored in D0 = &100. Now if I search for &100, IR0 will tell me that the value matched in 10000 (10000 = D0) I believe the register 10000 is a RAW PLC adress ... how do I Move the value from Registor # 10000 to some D area.... or display register 10000 on H MI? For example.... RAW REGISTOR # 10000 contains a value = &100 I want to do some kind of move to another DM location so if my HMI is displaying D500 then 10000 > DM500 = &100 I just don't know how to address these RAW addressing in fucntions... like MOV 10000 D500

Share this post


Link to post
Share on other sites

If you are trying to move the first word starting at the indirect reference pointer, then the code below would work: Here is an example of using DR and IR registers: Index Registers and Data Registers work as pairs. So, if you had the code shown below: The first move instruction is similar to the move that you are trying to do. The MOVR instruction will move the internal memory location address into IR0, in this example, it is moving the pointer to D0 into IR0. The last MOV instruction moves an offset of 15 into the DR address. So, when the first move executes (assuming that you have already done the MOVR and the last MOV), then the data in D15 would be moved into D500. So, the DR is the offset from the address that the IR is pointing to. In your example, the IR internal address is already set from the RSEARCH instruction, so no need for the MOVR instruction. In the first example above, I used a constant for my offset instead of a DR address. This means that using an offset of 0, move the data from the address pointed to by IR0, which was D0 in your example. Good luck.

post-19500-0-75617200-1319049708_thumb.j

post-19500-0-43209800-1319050305_thumb.j

Share this post


Link to post
Share on other sites
Thank you Michael, You are a great resource and help! You should write books & tutorials on PLC. I looked all around on omron's website, manuals, and they had limited information on index registers. They are basically useless. Thankyou again!

Share this post


Link to post
Share on other sites
I am glad that I could help. Omron's manuals have vastly improved over time. Now the main issue is finding the right manual. IR and DR memory is described in pretty good detail in sections 5-7 and 6-19 and 6-20 in the manual at the link below: http://forums.mrplc.com/index.php?app=downloads&showfile=973 Good luck.

Share this post


Link to post
Share on other sites

Attached is a doc that I wrote that explains all 3 indirect types of addressing available in Omron PLCs. Using IR and DR for Indirect Addressing.pdf Also, below is a link to a forward / reverse IR calculator (in VB) that I wrote before the manuals spelled out the memory areas. Using IR and DR for Indirect Addressing.pdf

1 person likes this

Share this post


Link to post
Share on other sites
Kewl as always PMCR! I looked all over for this document. Glad you still have it.

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
Sign in to follow this  
Followers 0