1
Open Discussion / Re: DataSubscriber for PLC Boolean Array to Modify Basiclabel properties
« on: March 24, 2020, 05:56:57 PM »Since you are using BasicLabels then you should resort to using their Highlight property to change the back color instead of changing the fore color.
I would be content to use the Highlight Property, but how do I link that to an alternative PLC Tag (boolean)?
Have you tried the 6 standard steps?
What are the 6 standard steps?
You need to specify the exact messages.
DataSubscriber2 should always be chosen over DataSubscriber since it is its extended version.
So, looking at the properties for each, the only "extension" seems to be the pollrate, sychobject, and value under the 'misc' tab as well as how it handles the PLCAddressValue(Items). So, does this mean that the regular DataSubscriber has a standard poll rate but the DataSubscriber2 allows for a modified poll rate and an array of plc tags instead of a single tag?
While I appreciate the input of information, I don't feel like this feedback helps resolve my issue.. The code I've come up with so far, but have not tested online is below:
Private Sub DataSubscriber1_DataChanged(sender As Object, e As Drivers.Common.PlcComEventArgs) Handles DataSubscriber1.DataChanged
Dim Aindex As Integer = 0
Dim BL As String
BL = "BasicLabel" & (Aindex + 37).ToString
For Aindex = 0 To 57
If CBool(e.Values(Aindex)) = True Then
Me.BL.ForeColor = Color.DarkRed
Else
Me.BL.ForeColor = Color.Black
End If
Next Aindex
End Sub
I'm hoping to test it first thing in the morning to see if it performs as expected on the fore color. Thanks!