HMI Tutorial: Timers

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • This video tutorial will walk you through the steps of creating a counter. This running counter will increment seconds, minutes, hours and will be displayed on the HMI at all time. For more information please visit anaheimautomat....

КОМЕНТАРІ • 16

  • @krisantuzzi
    @krisantuzzi 10 років тому +7

    Thank you! These videos are a life saver!!

  • @farahramadhani8066
    @farahramadhani8066 3 роки тому +1

    Hi, can you read the rtc and display in the text input using macro?

    • @Anaheimautomationinc
      @Anaheimautomationinc  3 роки тому +1

      Hello Farah,
      You do not need a macro to display the RTC. The HMIs have built in system registers for reading the RTC. Those registers are as follows:
      LW10000: RTC Seconds (0-59)
      LW10001: RTC Minutes (0-59)
      LW10002: RTC Hours (0-23)
      LW10003: RTC Day (1-31)
      LW10004: RTC Month (1-12)
      LW10005: RTC Year (2000 - 2037)
      LW10006: RTC Week (0-6)
      By simply using a Number Component, you can display these system registers in the order of your choosing and display the Real Time Counter.
      Thank you for contacting us. Hope this helps!

    • @farahramadhani8066
      @farahramadhani8066 3 роки тому

      @@Anaheimautomationinc Thank you, very helpful. Do you know how to control the timer? start and stop the timer using bit button? I can start the timer using triggered address but cannot stop it..:))

  • @siddharthjp94
    @siddharthjp94 6 років тому +1

    can you show to print data from hmi to thermal printer

  • @bestadceu904
    @bestadceu904 5 років тому +1

    The timer skips 1 second every minute. At 59 seconds the program immediately sets seconds to 0, instead of waiting for the 59th second to pass.

    • @Anaheimautomationinc
      @Anaheimautomationinc  5 років тому +1

      Hello,
      This video was made to reset the timer at 59. The easiest way to change the macro from 59 to 60 for the if statements:
      if(seconds == 60){
      seconds = 0;
      minutes++;
      }
      if(minutes == 60 && seconds === 60){
      seconds = 0;
      minutes = 0;
      hours++
      }
      Hope this helps solve the issue for you. If you have any further questions, please feel free to contact us at 714-992-690 or applications@anaheimautomation.com to speak directly with one of our applications engineers. Have a great day!

    • @constructor1958
      @constructor1958 3 роки тому +1

      En la macro hay que poner como comparación 60 en vez de 59, de esta manera salta cuando realmente ha llegado a 60.

  • @Welcome22025
    @Welcome22025 2 роки тому

    i want to know the kinco hmi macro programming regarding read and write the data from two different hmi,i have two hmi i need to read the data from one of the register from 1st hmi and that value to be write in other register in another hmi how to do this please help me out

  • @manolomanu1243
    @manolomanu1243 2 роки тому

    Hello, I have copied this macro, and I have put 60. The seconds run as if they were milliseconds. The minutes don't tick right, and when they hit 99. It gets out of range.
    I have a HMI GL 100E, software D.tools V3.5.3. I would like to use the hour counter, when a physical or network output of a plc is activated. And to be able to reset it. (plc is a siemens 8 logo). Could you tell me how to do it.
    Thank you and regards

    • @Anaheimautomationinc
      @Anaheimautomationinc  2 роки тому

      Hello, thank you for reaching out to us. We have reviewed your comment and made corrections to the code as shown below. This should properly increment the number components so that you no longer have issues with the minutes or hours. Also, please verify that your timer execution cycle on your timer is set to 10 (*100 ms) rather than the default of 1 (*100ms). This will more accurately reflect the seconds time increment as opposed to the milliseconds you were experiencing.
      In order to reset the timer, you can designate a local bit (LB) to trigger a reset. One way to do this is to add the first batch of code shown below after seconds++, and for testing purposes a bit-state switch can be added into the frame with the timer. Assign address type LB with address 0 to the bit state switch and change the switch type on the second tab titled "Bit State Switch" to Set 1 Pulse and the Pulse Width to 10 (*100ms). In the macro window, create a new parameter for reset making it a bit data type and LB0 for the address and address type. Upon testing, you will find that activating this bit to 1 will designate all values to equal 0 and will resume counting when the bit value is 0 again.
      seconds++;
      if(reset == 1){
      seconds = 0;
      minutes = 0;
      hours = 0;
      }
      if(seconds == 60){
      seconds = 0;
      minutes++;
      if(minutes == 60){
      minutes=0;
      hours++;
      }
      }
      We hope this helps.

    • @manolomanu1243
      @manolomanu1243 2 роки тому

      @@Anaheimautomationinc Thanks for answering, I have modified the time in the timer, it already counts the seconds well. The minutes should mark up to 60. And they reach 99. In numeric data I should put min 0 max 60 or put min 0 max 99, I have put both. and when it reaches 99 it goes out of range. The hours do not mark them.
      I don't know how to do macros, I haven't studied c language.
      Could you do the macro?
      When a PLC output is active, it starts counting, and you can reset it.
      I would be grateful to you.
      Thank you and regards

    • @Anaheimautomationinc
      @Anaheimautomationinc  2 роки тому

      @@manolomanu1243 We apologize for the inconvenience. The macro we provided in our previous response should have given the results you're looking for. If the difficulty persists, we recommend contacting our applications engineers directly. They can be reached by email at applications@anaheimautomation.com or by phone at (714) 992-6990. They will be able to assist you more thoroughly.

    • @manolomanu1243
      @manolomanu1243 2 роки тому

      Hello, very good videos. I have made the macro, the hour counter. On the HMI When the HMI is switched off, the accumulated hours are deleted. What can be done so that the accumulated hours are not deleted when the HMI is disconnected.
      Thank you and regards@@Anaheimautomationinc

  • @vladimirperez511
    @vladimirperez511 5 років тому

    how reset this timer at 0