Mogman
I am having a little trouble creating two HMI switches (that can be controlled from the HMI), from what I have searched and read (if I understand correctly) it must be created as an "output" in ladder logic, and that any location outside of the range of locations for the devices is a "memory" location.
 So once again I am stuck at go, when I create a switch and set it for BOOL and OUTPUT I cannot give it a location. I am still working on the "first" project I just want to add a couple switches so I can turn the LED on and off from the HMI.
Quote 0 0
thiagoralves
Output meaning a physical output, which is anything on the %QX range. The class of the variable must be local for you to be able to set a location.
Quote 0 0
Mogman
Thanks! I have them programmed but for some reason when I am in the monitor mode (OpenPLC runtime) the false values are flashing,(not the true values) and it looks like the word BOOL is appearing for a very short time, any idea where I have gone wrong here?
Quote 0 0
Mogman
OK I have banged my head for a couple days and give up! I need step by step direction to add two HMI switches to the "first project" because I just don't get it, I have read all I can and still it is clear as mud.
I added a contact in parallel with the led and PB1 contacts, and a contact in series (negated) with the PB2 contact and the LED coil and of course it works fine in simulation.
I gave the two switches the location of %QX10,0 and %QX10.1 so these are memory locations yes? this should correspond to 80 and 81 in scadabr?
 I did read these switches must be output but have no clue where that is defined, I can find no reference in the Data Sources point details.
 I am sorry for being so stupid and hope sooner or later the light will turn on and I will start to understand.
 I do have graphics for PB1, PB2 and LED on the graphical view page and they work as they should.
Quote 0 0
thiagoralves
Add two buttons on your ScadaBR graphical view and associate them with PB1 (coil 80) and PB2 (coil 81). Done!
Quote 0 0
Mogman
OK have done that but how do I use the switches, if I hover over them I just get the menu to edit etc.
 EDIT the "HMI" switches I added are "HMI1" and "HMI2" as I already have PB1 and PB2 programmed as the physical switches. not really important but just to be clear.
 I am trying to add switches that can be controlled from the graphical "HMI" view.
Quote 0 0
Mogman
Anyone?
Quote 0 0
thiagoralves
They say a picture is worth more than a thousand words. Here are a couple of them...
pic1.png  pic2.png  pic3.png  pic4.png  pic5.png  pic6.png  pic7.png  pic8.png  pic9.png  pic10.png  pic11.png  pic12.png  pic13.png  pic14.png  pic15.png  pic16.png  pic17.png  pic18.png 
Quote 0 0
Mogman
COOL!!! That works!! One of the biggest mistakes I was making was to forget to save it at the bottom of the page
Any way to make the switch momentary?
Quote 0 0
thiagoralves
Not in a simple way. For that you would actually have to write a script that writes true and then false after a short period of time (which can be complicated to do for a beginner) and instead of using a button (write) you would have to use a button (script) associated with the script you created.
Quote 0 0
Mogman
Baby steps! I am going to play with timers now, THANKS for the help
Quote 0 0