This will be one way to do it:
- Add a BasicLabel to the form
- In the Properties window, change the Name property to Built1Label
- Set ComComponent property to BSA1
- Set PLCAddressValue to Counter_Built_Out.acc
- Add another BasicLabel
- Change Name property to Built2Label
- Set ComComponent property to BSA2
- Set PLCAddressValue to Counter_Built_Out.acc
- From the All Windows group in the Toolbox, add a Label
- In the properties Window, change the Name to ResultLabel
- Right click on your form and select View Code
- Add this code:
Private Sub BasicLabel1_ValueChanged(sender As Object, e As EventArgs) Handles Built1Label.ValueChanged, Built2Label.ValueChanged
Try
ResultLabel.Text = CInt(TextBox1.Text) - (CInt(Built1Label.Text) + CInt(Built2Label.Text))
Catch ex As Exception
End Try
End Sub