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

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