Sign in to follow this  
Followers 0
js321

Data Search function

3 posts in this topic

Hi, I am using CPM2A PLC. I was using the @srch function. I know that this function returns the address of word that containing the comparsion data. My question is, is it possible to use that address in the next search or comparsion function? For example, I was searching the DM area. And it returns a value of #0100 in DM0050. And I want the program to automatically compare the next address of DM0100 which is DM0101. Is it possible to specify the comparsion address using a CMP function based on the outcome of the SRCH function? Thanks.

Share this post


Link to post
Share on other sites
It's a little difficult to understand without seeing your instruction with all the parameters. But I think I know what you are asking. If DM0050 contains #0100 and DM0100 is the address you wish to compare then do a CMP *DM0050. The preceding "*" is how you do indirect addressing with Omron PLC's. Edited by IO_Rack

Share this post


Link to post
Share on other sites
That is exactly what I asked for. Thanks!

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