Author Topic: Timer trigger by PLC tag?  (Read 218 times)

cojuancarlos

  • Newbie
  • *
  • Posts: 4
    • View Profile
Timer trigger by PLC tag?
« on: April 16, 2025, 05:27:54 PM »
Code: [Select]
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

     If PE_101.Value = 1 Then
         Timer_CntUp1.Text += 0.1
     End If

 End Sub


Is there any work around with this? I am trying to start a timer with the PLC tag triggers but it is not adding up. I tried using loop as well, but it didn't work also.

bachphi

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
Re: Timer trigger by PLC tag?
« Reply #1 on: April 18, 2025, 10:21:21 AM »
You have two options to consider:
Option 1: If your goal is to have a PLC tag trigger a timer, it sounds like you should look into using the DataSubscriber component.

Option 2: There are similar solutions that were posted as seen below, savvy?
« Last Edit: April 18, 2025, 10:23:17 AM by bachphi »
UCL =================
This is NOT alt.read.my.mind.No such thing is sh^t-for-brains
unless you are posting to alt.read.my.mind. Savvy?
My understanding of computer is well below six Σ.
Unless what I say is logically defined in a PLC, everything else might be beyond my control.
LCL ================

cojuancarlos

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Timer trigger by PLC tag?
« Reply #2 on: April 20, 2025, 12:13:38 PM »
I have never tried that one. I will play with the DataSubscribers.

What are similar solutions?

cojuancarlos

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Timer trigger by PLC tag?
« Reply #3 on: April 30, 2025, 07:23:35 AM »
Update:

Works good using DataSubscriber!