Sign in to follow this  
Followers 0
Levent1970

Using HOURM as Retentive Counter

2 posts in this topic

Posted (edited)

Hello Guys, 

is someone using HOURM as a Retentive Counter ? I Tried it but i have no success.

like this one:

HOURM( Betriebsstundenzaehler_ein , 700, Betriebsstundenzaehler , Platzhalter1 );

I'm using FX5U.

Our old Programm was written in Ladder.

 

 

2.JPG

Edited by Levent1970

Share this post


Link to post
Share on other sites

Hello Levent,

this should work, but make sure that you reserve space for two 16bit devices, as d1 and also d1+1 are used, as described in the processing details on page 793 of the FX5 Programming manual (https://dl.mitsubishielectric.com/dl/fa/document/manual/plcf/jy997d55801/jy997d55801r.pdf)

you should have a look at the declaration of the label 'Betriebsstundenzaehler', either assign a latched 16bit device (if declraed als global label) or
set it to be an array of 2 elements if specified as a local label. In the second case you should use 'Betriebsstunndenzaehler[0]' for d1.

Also you should be sure to handle the case, that the maximum 16bit value is reached witch will happen after about 7.5 years (65535/ (360days x 24h)), this is the reason we
normaly don't use the 'hour_m' function and implement the operating hour counter by ourselve using an unsigned double word (32bit).
 

hope this helps

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