AdvancedHMI Software

General Category => Support Questions => Topic started by: cojuancarlos on April 16, 2025, 05:27:54 PM

Title: Timer trigger by PLC tag?
Post by: cojuancarlos 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.
Title: Re: Timer trigger by PLC tag?
Post by: bachphi 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?
Title: Re: Timer trigger by PLC tag?
Post by: cojuancarlos on April 20, 2025, 12:13:38 PM
I have never tried that one. I will play with the DataSubscribers.

What are similar solutions?
Title: Re: Timer trigger by PLC tag?
Post by: cojuancarlos on April 30, 2025, 07:23:35 AM
Update:

Works good using DataSubscriber!