Difference between revisions of "Controlling Page/Form Display From a PLC Value"
(Created page with "Sometimes it is desired to control the current page being displayed by a register in the PLC. Although not directly obvious, but this is possible to do with AdvancedHMI. The...") |
(No difference)
|
Revision as of 10:41, 5 October 2016
Sometimes it is desired to control the current page being displayed by a register in the PLC. Although not directly obvious, but this is possible to do with AdvancedHMI.
The key to doing this is to use a hidden form that monitors the PLC value and selects the corresponding form to display. For this sample, the MainForm will be used as the controlling form. The code in this sample is somewhat advanced.
1) In Solution Explorer, double click MainForm.vb to open the form in Design View
2) From the Toolbox, add the desired communication driver and set its properties
3) From the Toobox, add a DataSubscriber
4) Set PLCAddressValue to the PLC register/tag to use for form switching
5) Double click the DataSubscriber to get back to the code