Jump to content

Printing time and temp every 10 seconds?

Recommended Posts

We have an application that monitors an oven.  We define a total cycle time from a user input, between 3 minutes and 4 hours. Then we start both a timer set to the user input and a timer that counts to 10 seconds and resets over and over.  The user input value timer will end the cycle and the 10 second is to make a printer print time (hour:min:sec no date) and current temp.  The problem we are having is that if we start the cycle at 1:36:00 the 10 second interval prints will not consistently show times that are ten seconds apart!  we might get 3 lines with 10, 20, 30 but then it will show 41 or maybe 39 as the next seconds value, then after 3 or four times ending in the +1 or -1 seconds value it will go back to the original ends in 0 values.  This will repeat over and over again during a long cycle happening between 17 and 19 lines between + or - 1 and it lasts between 3 and 5 lines before reverting.


Are we trying to do something that the clock can't really do to an accuracy of one second?

Link to comment
Share on other sites

Can you post the part of your program that makes the print every 10 seconds?  You should be able to use the RTC/UTC to get your prints to very regular, but I am a bit confused why the prints are not OK with just a regular timer.  You could also try using just an increment function using the positive edge SB3 as the pulse. Every10 pulses print and reset the MI you chose and the increment storage location as long as you have a heating process in effect.

  Reset the MI to 0 whenever the heating process times out as well.



Link to comment
Share on other sites

What are you scan times for the entire program in milliseconds? 


It seems insignificant but depending on the order of execution within the PLC for I/O, communications, and display elements you might be running into an issue with how the ladder is actually being traversed from scan to scan and displaying the data.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...