Jump to content

RTC and DTI


LE BERRE

Recommended Posts

Chers tous,

J'essaye de sauvegarder les données avec la date et la date.

Par exemple : je voudrais enregistrer une valeur comme UINT16 chaque jour et faire un DTI avec les 365 jours de l'année et enregistrer la mise

Le DTI ressemblera à ceci:

rangée valeur Date
1 12 01/02/2020
2 52 02/02/2020
3 65 03/02/2020
4 78 04/02/2020
5 92 05/02/2020
6 15

06/02/2020

La meilleure économie sera à minuit. Et je voudrais enregistrer si le processeur est allumé si sur la ligne du DTI sera vide.

Je ne sais pas si c'est possible?

 

BR

 

 

  • Upvote 1
Link to comment
Share on other sites

  • MVP 2023

Definitely possible.  If you look in the UniStream examples (separate download) there is something to convert the current date to an ASCII string which you can store in your table.  Include the "PLC on at Midnight" bit in your Data Table.   I'd include a string of the time as well.

You can use the RTC Schedule function to trigger your Data Table write.

I would set a bit when I wrote the table and then look later in the day with another Schedule block or when the PLC powers up to make sure it was set.  If it's set, you clear it.  If it wasn't set, you could write a line to the Data Table showing it wasn't set.

If you're having trouble with the code, post it here and we'll have a look.

Joe T.

  • Thanks 1
Link to comment
Share on other sites

  • 2 years 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.