homer874 Posted May 26, 2006 Report Posted May 26, 2006 (edited) 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 May 26, 2006 by homer874 Quote
Sergei Troizky Posted May 26, 2006 Report Posted May 26, 2006 Simply T0, or T1, or whichever timer. Quote
panic mode Posted May 27, 2006 Report Posted May 27, 2006 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] Quote
Colin Carpenter Posted May 27, 2006 Report Posted May 27, 2006 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. Quote
cauchy Posted May 27, 2006 Report Posted May 27, 2006 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 Quote
FNMdeJong Posted May 29, 2006 Report Posted May 29, 2006 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]----- Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.