2
« on: November 06, 2020, 12:29:20 PM »
Hi, I'm brand new to AHMI and VB. Just building a little test application with an existing PLC. I've added a BasicButton and I've tied it to a controller scoped tag named 'OTMakeupVlvSoftAuto'. The tag is a BOOL and I want to simply toggle the value, so I set the BasicButton OutputType to 'Toggle'. When I run the application and press the button, nothing happens.
Following the advice from another post, I added the following code to MainForm.vb to generate a tag list, and indeed my tag is spelled correctly:
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim t() As MfgControl.AdvancedHMI.Drivers.CLXTag
t = EthernetIPforCLXCom1.GetTagList(60000)
Using sw As New System.IO.StreamWriter(".\TagList.txt")
For i = 0 To t.Length - 1
sw.WriteLine(t(i).TagName)
Next
End Using
End Sub
(As a side question, I added the code to MainForm_Load and it worked as expected. I don't understand why so maybe someone could add some context.)
Thanks in advance for your help.