This all kind of sounds complex and without really knowing your data or your programming knowledge, I will just make some general suggestions:
- If you have several schedules per single date then you could have 2 dropdowns (date, schedule) and your date dropdown would have to control what schedules show in the schedule dropdown
- If you have only 1 schedule per single date then you could have only 1 dropdown (date)
- You might consider having a "Load" button next to dropdown(s) and use its Click event to actually send values to the PLC by checking what date or schedule was selected
As for your schedules, you can possibly create a dictionary (of string, string) for each schedule, where the key could be the PLC address and the value would be the data, from your table, that you want to write to that address. So it might look something like this:
Dim schedule1 As New Dictionary(Of String, String)
' Add some elements to the dictionary. There are no
' duplicate keys, but some of the values are duplicates.
schedule1.Add("N7:0", "whateverSQLvalue1")
schedule1.Add("N7:1", "whateverSQLvalue2")
schedule1.Add("N7:3", "whateverSQLvalue3")
schedule1.Add("N7:4", "whateverSQLvalue4")
This was adopted from here so you better check what import it is using and the rest of the code:
https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2?view=net-5.0Then you would use the driver to actually write each (key,value) pair from selected dictionary (which is a schedule) in a for loop.
Here is a link to one example of how to iterate in dictionary:
https://stackoverflow.com/questions/18628917/how-can-iterate-in-dictionary-in-vb-net/18628972AdvancedHMI drivers have this format for Write:
driverName.Write(startAddress As String, dataToWrite As String)
so from the dictionary, for each (key,value) pair it would be writing:
driverName.Write(key, value)
Google is your best friend, so look up stuff.