Jump to content

Recommended Posts

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. 

Link to comment
Share on other sites

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. .....

Link to comment
Share on other sites

  • MVP 2023

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.

Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.