AdvancedHMI Software
General Category => Support Questions => Topic started by: jwick on June 22, 2016, 05:18:35 AM
-
Hello,
I have taken ModbusTCP Driver on my form and trying to assign comm component property of my basic label ,but it is throwing error as Commcomponent property not set.
below is my code [Advanced HMI V35]
BasicLabel1.CommComponent = ModbusTCPCom1
BasicLabel1.PLCAddressValue = TextBox6.Text
-
- In Solution Explorer, expand down the AdvancedHMIControl project
- Under AdvancedHMIControl, expand dowm the Controls folder
- Right click BasicLabel.vb and select View Code
- Modify the SubscribeToComDriver routine as show here:
Private Sub SubscribeToComDriver()
If Not DesignMode And IsHandleCreated Then
'* Create a subscription handler object
If SubScriptions Is Nothing Then
SubScriptions = New SubscriptionHandler
SubScriptions.Parent = Me
AddHandler SubScriptions.DisplayError, AddressOf DisplaySubscribeError
End If
SubScriptions.ComComponent = m_ComComponent
SubScriptions.SubscribeAutoProperties()
End If
End Sub