Sign in to follow this  
Followers 0
homer874

Compare applications

6 posts in this topic

i am new to mitsubishi, need a little help. i need to compare the value in a 4 sec timer and make something happen if the timer is over 2 secs. how do you address this register? fx2n model Edited by homer874

Share this post


Link to post
Share on other sites
Sergey is right, you use same name for bit timer done and for timer accumulator register. I never tried to compare timer accumulator directly but if that doesn't work, simply copy time to a register: [<> t0 D15]------------( ) ---| |---------[mov t0 d10]

Share this post


Link to post
Share on other sites
IEC Developer allows you to compare accumulator values directly. Using IEC there are three "parts" to a standard timer: TC0 = Timer Coil of T0 TS0 = Timer Switch of T0 (closes when timer times out) TN0 = Accumulated timer value of T0. Therefore, you could use an expression like if TN0 >= 20 (assuming 100ms timers) then do something.

Share this post


Link to post
Share on other sites
Hi homer, you can use in-line comparisons. In this compare, you can use K,H,K, KnX, KnY, KnM, KnS, T,C,D,V,Z. For ins. [= T0 D15]-------------() (Assume that Data15=2000 and T0 is 100ms timer) regards, untitled.bmp

Share this post


Link to post
Share on other sites
In a timer compare, do not use the equals. It will only give you more troubles, just think about the scantime and the sequential program execution. If you want something to start after 2 seconds just write : -------[>= T0 K20]-----

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