Sign in to follow this  
Followers 0
NovalutionGSi

TIML Issue.

4 posts in this topic

Right my 1st post here. i'm trying to work with a TIML timer. the project i'm working on requires the system to check if the date is between 1st May -30th Sept and between 18:00 hours and 03:00 hours, this is very simple thanks to Sleepy Wombat's extraction function Block. but the next part of the conditioning is to check and see if the maximum temperature is/or has been greater than 26 deg C in the past 24 hours. the issue i have is that is that after calculating out how many 100ms are in 24hours..... moving it to a DM i cant get the TIML function to work in the Ladder correctly. I'm using a CJ1M CPU22. used MOVL to shift #36000 to D3010 Timer PV used MOVL to Shift #864000 to D3011 Timer SV then wrote the TIML as follows. TIML 15 D3010 D3011. i cant see what i've done wrong, might be the completion flag. this is the 1st time i've used this instruction and now the head scratching has begun!

Share this post


Link to post
Share on other sites
MOVL uses double words, you have to set the variables (SV and PV) to be DWORD / DUINT, and remeber that each of the variables use two DM, so your adresses would then be: PV: D3010 SV: D3012 And one more thing, TIML is set in units of 1s, not 100ms MOVL &86400 D3012 TIML 15 D3010 D3012 Edited by Fredrix

Share this post


Link to post
Share on other sites
Cheers for the advice Fredrix. after following your advice i still have the rung showing up as red. i then had a brainwave, what i had done was incorrect by putting the 2 MOVL instructions and the TIML instruction in the same rung. have now moved them apart and this seems to have solved my problem.

Share this post


Link to post
Share on other sites
You could compare the current temperature with 26degC, if is greater, then move the value to a holding register and time stamp it. Then you could take the time stamp, compare it to the current time, if 24hrs has elapsed, then reset the holding register. No need for the timer and 100mS in 24hrs issue you were having... Many ways to skin a cat I guess....

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