31
Support Questions / Re: code help
« on: January 18, 2016, 09:23:21 AM »
I've never seen a select case done like that.
I think it should be like this:
Also, if you put in a break-point(F9) then you can see what addresses are coming through and step-through the code.
I think it should be like this:
Code: [Select]
Private Sub DataSubscriber21_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber21.DataChanged
Select Case e.PlcAddress
Case "400001"
Integer1.Text = e.Values(0)
Hex1.Text = Conversion.Hex(e.Values(0))
Case "400002"
Integer2.Text = e.Values(0)
Hex2.Text = Conversion.Hex(e.Values(0))
Case "400003"
Integer3.Text = e.Values(0)
Hex3.Text = Conversion.Hex(e.Values(0))
Case "400004"
Integer4.Text = e.Values(0)
Hex4.Text = Conversion.Hex(e.Values(0))
End Select
Also, if you put in a break-point(F9) then you can see what addresses are coming through and step-through the code.