AdvancedHMI Software
General Category => Support Questions => Topic started by: cmullis on October 29, 2015, 11:19:19 PM
-
I am trying to build a c# console app for interfacing with a CompactLogic PLC. I have the subscription setup and is retrieving tags from the controller. My problem is that I need to only fire the callback when data has changed. Now it is firing every time it polls. I would greatly appreciate the help.
-
You would have to use a DataSubscriber. It will filter the data returned from the driver and return it to a DataChanged event.
-
Is there any sample code anywhere that you know of?
-
Here is a rough piece of code that may help get you started:
Private ds As New AdvancedHMIControls.DataSubscriber
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
AddHandler ds.DataChanged, AddressOf DataChangedCallback
ds.PLCAddressValue = "MyTag"
.
.
End Sub