NewtoUni Posted August 29, 2017 Report Share Posted August 29, 2017 I 'm looking to display motor run time on an HMI screen, basically create an hour meter. Is there an element in the toolbox that is setup for this type of function? I assume the timer box will be used to display the run time but didn't know if there was any other element already set up for this. All I want to do is accumulate time when the motor is running so that the user knows how much total time the motor has ran. I will of course need to retain this time when power is removed from the system. Any help is greatly appreciated. Link to comment Share on other sites More sharing options...
ORSO2001 Posted August 29, 2017 Report Share Posted August 29, 2017 Hi, you can use the already present "frequency (1 sec)" signal to increase a variable about second... only if the motor is running...after 60 pulses you will increase the minute variable; after 60 minute you will increase the hours variable... Link to comment Share on other sites More sharing options...
Saragani Posted August 29, 2017 Report Share Posted August 29, 2017 You can also use a numeric box with a Timer format (it's like a timer box, but instead of linking to a timer, it links to a numerric variable like int 32. If I remember correctly, the time box assumes that the number is the number of milliseconds. You can show a number up to 99 hours, 59 minutes and 59 seconds, I think. If you need to show larger intervals, then you might write your own struct, function, amd HMI screen / Custom control that formats it the way you want. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted August 29, 2017 MVP 2023 Report Share Posted August 29, 2017 If you need to display in Time format, I usually just run an Accumulated Timer (TA) with the Preset at 24 hours. If you need to show a run time of greater than 24 hours then you can increment an MI each time the timer expires and show that just to the left of the timer display. Link to comment Share on other sites More sharing options...
NewtoUni Posted August 29, 2017 Author Report Share Posted August 29, 2017 Perfect, thanks for the help. I do need to display in time format so I am going to run a TA timer and display elapsed time. The timer will never need to be reset(unless the motor fails and needs to be changed out) so my plan was to preset to 99hrs 59min, 59 sec and increment an MI each time the timer expires and show that on the left of the timer display. The motor doesn't run everyday and when it does its only for an hour or two so this should be sufficient for quite awhile. Thanks again. Link to comment Share on other sites More sharing options...
hotwires Posted August 30, 2017 Report Share Posted August 30, 2017 Make a six minute time base: T0 T0 (360sec) ----|\|---------------------( )------------- T0 O1 (motor) ----| |------| |------------[inc uINT32]- This counts tenths of hours. Add decimal on HMI numeric display and you have an hour meter. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now