Announcement

Collapse
No announcement yet.

how can I trigger an event by clock time?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • how can I trigger an event by clock time?

    Hey!

    So, I want to perform a task at 12:00 each day (take a reading, do some math, send an e-mail).

    I know I can use a timer ... count 24 hours ... reset ...

    Just don't like the idea that the timer can over a long period go out of sync (I think).

    Is there a way of triggering an even based on clock time?

    I searched all the help files and just can't find it.

    Side note ... is there a way I can sync the plc clock to / over the internet say once a week? The PLC and a C-more are connected to a cellular modem.

    Thanks .... Mike

    PS ... using a BRX


  • #2
    You can use a compare instruction $Now.Hour = 12. Or if you mean 12 midnight you could also use a delta instruction delta $Now.Day to trigger your sequence. Yes, you can update time from a server. You can find it in the help file too.
    Attached Files

    Comment



    • #3
      YOU ARE THE MAN ....hmmm ... blot or woman ... don't want to be sexist :-)

      I searched everywhere ... so so I thought ... in the help files and just could not find this but I new you must be able to do it.

      I am using the PLC as a totalizer (have a flow meter sending an instantaneous flow reading in gal/min) ... got it to read into the PLC ... did the math so it adds to a register every second ... now just need to send the total out (e-mail) once a day and reset the total to zero.

      I have the PLC and a C-more in the system ... sending out an e-mail is the project of the day.

      Thanks again !!!!!!!!!!!!!!

      Mike

      PS ... Thanks for the hint on the clock ... I will keep searching for the help file .. found all kinds of things on setting the clock manually and with a button but must have missed it from a server. Had never touched a BRX or C-more before last week (used AB and GE about 10 years ago) .... lots of 12 - 14 hours days ... lots of reading .... thanks again!

      Comment



      • #4
        OK ... soooooo close!

        Couple of follow up questions.

        I did try the compare ... and it worked!

        Now. If I want to send an e-mail at midnight, is that 0 or 24 hours?

        Next, if I want this to only happen once ... is there a "one shot" I can put in place or do I do this by using contacts or ? I tried the compare just to move some data to see if I understood the command ... it moved the data over and over again for the entire minute ... hmmmmm.. I did fix it using the "edge" option (first time I tried it) but I am not sure if there is a similar option in the e-mail (never tried this yet).

        Thanks so much again !

        Mike

        Comment



        • #5
          You're welcome. See my attached screenshots. I didn't mean to send you searching the help file, you're looking for the NETTIME instruction.

          0:00 is the first minute of the day, 23:59 the last of the day.

          Yes, you want to use a one shot or edge instruction, to keep from the task occurring for a whole minute. See my screenshot, it has inline one shot instructions.

          Comment



          • #6
            WOW ... spent all weekend getting the e-mail in the c-more to work (turned out to be a simple, enter a DNS address).

            Now I can try getting the e-mail to send once a day ....

            Thanks so much again !!!!!!!!

            Mike

            Comment



            • #7
              You can also send the email directly from the BRX using the EMAIL instruction. It can be set to trigger as a one shot.

              Comment



              • #8
                I was not sure which would be the better (easier) way of sending the e-mail. I knew having the PLC and Panel both capable of e-mails gave me options.

                Thanks .... Mike

                Comment

                Working...
                X