QUOTE (bill n tn @ Jun 26 2009, 06:24 PM)

I am creating a count down timer in a control logix , I have subtracted the acc from the preset and dumping this in a dint called remaining time and i want to display this in minutes and seconds. I can get the minutes working but I am having trouble with the seconds. I am div the remaining time by 60000 to get the minutes and putting this into a dint called minutes. I have tried div tag minutes buy 1000 and this does not work. I am displaying this in a PV+. I am fairly new to Allen Bradley, any suggestions?
Okay let me lay out what I am reading from your post.
1. You have a tag called CountDownTimer.
2. You are doing math as follows : CountDownTimer.PRE - CountDownTimer.ACC = TimeRemaining {type DINT}
3. You are doing math as follows : TimeRemaining DIV 60000 = MinutesRemaining {type DINT}
4. You need to do the following math to get the SecondsRemaining {type DINT}
4a. TimeRemaining DIV 60000 = MinutesRemainingFloat {type REAL}
4b. MinutesRemainingFloat {type REAL} - MinutesRemaining {type DINT} = SecondsRemainingFloat {type REAL}
4c. SecondsRemainingFloat {type REAL} MUL 60 = SecondsRemaining {type DINT}
Hope the above is clear enough. There are other ways but this one will do.