74
« on: May 24, 2023, 09:07:49 AM »
The very first thing I would do is to use version 3.99y Beta from this forum.
I think you can simplify your code because the BasicLabel uses the string for PLCAddresses and not the new complex address object.
Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked Then
OmronEthernetFINSCom1.IPAddress = "192.168.1.80"
BasicLabel36.PLCAddressValue = "D4082"
Label23.Text = BasicLabel36.PLCAddressValue
End sub
Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked Then
OmronEthernetFINSCom1.IPAddress = "192.168.1.81"
BasicLabel36.PLCAddressValue = "D4120"
Label23.Text = BasicLabel36.PLCAddressValue
End sub
This is what I would do to see what is happening.
- View Code on BasicLabel.vb
- Go to line 740 and look for this:
Private Sub SubscribeToComDriver()
If Not DesignMode And IsHandleCreated Then
CreateSubscriptionHandler()
SubScriptions.SubscribeAutoProperties()
End If
End Sub
- Set a breakpoint at "SubScriptions.SubscribeAutoProperties()"
- Step through the code using F11
- When it gets to this code, look at the variable values:
If PA Is Nothing Then
SubscribeTo(PLCAddress, 1, Nothing, PropertyToWrite, 1, 0)
Else
SubscribeTo(PLCAddress, 1, Nothing, PropertyToWrite, PA.ScaleFactor, PA.ScaleOffset)
End If