lesmar96 Posted July 24, 2018 Report Share Posted July 24, 2018 Hello All, I am looking for a little help on the best way to program this. Using a Samba and Visilogic. The job is I need to be able to enter a time on the HMI and when that time comes, certain functions happen. To get the easiest time look on the HMI, I used Variable: Time Functions, set it to Hour(CT) so it would display in HH:MM. That works fine and beautiful, but I couldn't figure out how to use that number in my program. I have it linked to MI5. I was hoping to do a compare with SI31, but they seem to be two different data types. Can someone show me the right way to do this? Basically I want them to be able to type any time on the screen (18:00, for example) and when system time hits 6:00 pm, bit turns on. Thanks in advance for helping, as I have done little programing with time functions before. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 25, 2018 MVP 2022 Report Share Posted July 25, 2018 When in Ladder, go to Utils / Clock / Indirect Clock Functions / Time. There's help on this in the Help file under Clock Functions. Quote Link to comment Share on other sites More sharing options...
lesmar96 Posted July 25, 2018 Author Report Share Posted July 25, 2018 Seeems pretty lame that the only way to do this is essentially a compare that the bit is on between two times. All I want is a positive transition when the RTC equals the time they have entered on the HMI. Where should I get my second time to add to the compare? Any advice? Also it seems weird if I have to use this indirect clock function.....that you have to use two consecutive MI's. ..... Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted July 25, 2018 MVP 2022 Report Share Posted July 25, 2018 That clock function utility gives you exactly what you want - not sure what your complaint is. As far as the second time to compare, did you try putting the same value into that MI (Store Direct)? I've never tried that, but if it doesn't work just add 1 to the entered value. Quote Link to comment Share on other sites More sharing options...
lesmar96 Posted August 2, 2018 Author Report Share Posted August 2, 2018 FYI it does not work to enter the same value. Unitronics ought a have a way to use the Equal function with SI31, yet display the user-changeable data as a Time on the HMI. It surely seems there oughta be a way to do. 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.