AdvancedHMI Software

General Category => Support Questions => Topic started by: ronj on November 22, 2015, 11:48:05 PM

Title: Message display by value in reverse
Post by: ronj on November 22, 2015, 11:48:05 PM
Hi Archie,
Is there a control or some technique to allow a PLC value to be updated according to a value from a list (maybe a dropdown list)?

What I am looking for is almost the exact inverse of the "message display by value" or ideally a way to add a feature to the "message display by value" so that, in addition to the existing functionality, the message list could be used to allow the user to select a message and set the PLC to the corresponding numeric value from the list.

Regards,
Ron
Title: Re: Message display by value in reverse
Post by: bachphi on November 24, 2015, 04:15:51 PM
I would a have list box on the leftside, and list out values with description , on the rightside a basic label with PLCAddressKeypad set to PLC address you want to change its value.
Title: Re: Message display by value in reverse
Post by: Archie on November 26, 2015, 07:04:23 AM
You could add a ListBox to the form, add the Items, then double click to get to code:

    Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
        EthernetIPforCLXCom1.Write("ClickedItem", ListBox1.SelectedIndex)
    End Sub