Voxdale Posted October 6, 2017 Report Share Posted October 6, 2017 Hello, Is it possible to directly input time (HH:MM) in the HMI (keyboard touchscreen) and do calculations with this input? Example INPUT: input first start time of a cyclus : 08:00 (HH:MM) input last start time of a cyclus: 10:00 input number of starts: 3 This number says that there will be 3 starts of a cyclus. This starts must be equally divided over the time between the first and last start. OUTPUT: first start at 08:00 second start at 09:00 last start at 10:00 In this program we need to calculate the difference between first start time and last start time: 10:00 - 8:00 = 2:00 In this program we need to define the period between the start moments= 2:00/(3-1)=1:00 Quote Link to comment Share on other sites More sharing options...
MVP 2021 Joe Tauser Posted October 10, 2017 MVP 2021 Report Share Posted October 10, 2017 Look into the RTC data type in variable definitions. It can be operated on like other variables in math blocks, but you do have to specify the .hour, .minute, or .second element. Joe T. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.