kroald

Change clock from am/pm to 24h, and setting a time on the HMI

8 posts in this topic

Hi!

I want to use the real time of day to set the outputs on and off.

Example at 6am the output goes on, and at 3pm it goes off

Can it be written i ST?

Any help is much appreciated!

 

Edited by kroald

Share this post


Link to post
Share on other sites

This is how you would do it in both ladder and ST:

 TOD.jpg.d7533a04ea110df64b102467df6d83fb

TOD.jpg

Share this post


Link to post
Share on other sites

Thank you for answering me, sir.

I have some new questions too!

1. The clock on the HMI is showing AM/PM, how can i display it as 24h?

2. I have a temperature sensor input, and a set temperature i want the room to stay in. Is there a way to program a differential(hysterese?) value?

F.ex. if the measured temp is 15, and set temp is 18, the oven will turn on until measured temp is 18, and go off. But then when it falls to 17,9 it will turn on again. Maybe if there is a way to set a differential to 2 degrees, so it wont turn on until measured temp is 16. And the output/oven wont go on/off all the time. Maybe differentiate the rising and falling measured value?

 

Share this post


Link to post
Share on other sites

I think i have figured out question nr 2.

But the clock view is still a mystery.. Any tips on showing it as 24h?

 

And a new question, we want to set a time on the hmi, and we've found a ''DateTimeKeypad'' pop-up that is the right data type, time of day. But we don't like that its a roll-down menu, we would rather have a keypad with the numbers. Any tips on how to change this?

 

I see i have'nt written earlier that this is for a school project that's due in 1 week, so any and all help is much appreciated! We're not so experienced in sysmac yet..

61053299_335799950353088_7936810460169371648_n.png

61268463_342260163100534_2135561291232706560_n.png

Share this post


Link to post
Share on other sites

Apparently it's not so easy. Have you seen this post? http://forums.mrplc.com/index.php?/topic/35045-custom-keypads/

As far as the 24 Hr. format, I did a brief test. The "Short Time" should be 24 Hr. format but it didn't work in my simulator. Maybe it's a simulator bug. Have you tried it in the actual NA5? Alternatively, have you tried the UseCustomDateTimePattern? It will follow the rules of DotNet, for example:  MM/dd/yyy HH:mm:ss.

Share this post


Link to post
Share on other sites

Yes that did the trick for the 24hr format, thank you! It worked with the UseCustomDateTimePattern with HH:mm:ss. We also used MM/dd/yy for the date.

As for the keypad, we are using the same type as the one that was discussed in that link. We'll see if we'll spend any more time on it, or just let be for now.

Share this post


Link to post
Share on other sites

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