Sign in to follow this  
Followers 0
Guest skysurf

question on Timer and MOV instructions

3 posts in this topic

Hi, I am new to PLCs and am trying to work with an Omron CJ1M-CPU12. I need to run a high-speed timer to measure an accurate cycle-time for a weld-cycle. I am using a TIMH(015) 10-ms decrementing timer with the Set value set to its highest. The timer starts due to the input signal being raised High when the PLC receives the "Start Weld" signal. It stops due to the input signal going Low when the PLC receives the "complete." My problem is, how do I determine the Timer's present value when it receives the "complete" before it gets automatically reset back to the Set value when the input signal is dropped low?? I am trying to use the "MOVRW(561) T1 IR0" instruction to transfer the timer's present value to the index register upon receiving the "complete" signal, and then using a "MOV(021) ,IR0 D0" to move the value D00000. However, I can't get any MOV instructions to work at all. I tried to do a simple "MOV(021) &100 D0" to move the value 100 into D00000, however it doesn't seem to be working either. Is there anything I am missing in trying to use the MOV instructions in Cx-programmer?? I would be very thankful for any help or feedback. Thanks!!

Share this post


Link to post
Share on other sites
The use of IR registers involves absolute hex addressing of a contiguous PLC memory map and cannot be used with normal PLC memory area designations. See the following link: Indirect Addressing @ MrPLC.com Regarding your timer issue, in the rungs above your timer put the following code: LD (your input) MOV T1 D0 LD NOT (your input) MOV D0 D1 -B #9999 D1 D2 (returns actual time in 00.00secs)

Share this post


Link to post
Share on other sites
Thanks very much for your help Jay!!!! Got it to work like u said.

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