Logopaede
Hello,

as I mentioned recently in another thread, I'm building my first Hello_World environment with a physical button and a LED. At this point I'm having the Raspberry Pi4B with OpenPLC running and connected via Modbus to ScadaBR in a Linux-Container (LXC). Works as expected so far.

I found a lot LED-Symbols in ScadaBR's Graphic views, perfect.

But for my physical push-button I'm searching for a graphical representation. I can't find more than one single (!) symbol for a button, called "Liga/Desliga (Botao)".

Are there really not more switch/button symbols existing in ScadaBR??

Attached, how that button looks like.

Thank you.
Reply 0 0
thiagoralves
I usually use the HTML button for push buttons and style it with inline CSS as needed. But you can also add any graphical element you want to ScadaBR library. I believe there is some information on how to do it on the ScadaBR forums. If I'm not mistaken it consists of dropping a GIF image of your component on the right folder and add a little XML description about the item. That's it.
Reply 0 0
Logopaede
Thank you, then DIY is the recommended way to go. I never scripted CSS in HTML, so it is a little show-stopper. But it should be easy and I hope I have time to "design" it in the next days.

It would be great although, if someone could share one universal button/switch symbol with the community.
Reply 0 0
thiagoralves
Google has plenty: https://www.google.com/search?q=switch+button+image&safe=active&sxsrf=ALeKk02OJIKyDFmAaOm7o8qc4a14o9i_Nw:1597415145670&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiHssOS85rrAhUnqlkKHTFgCRgQ_AUoAXoECA0QAw&biw=1920&bih=973
Reply 0 0
Logopaede
Most images need licensing, I guess, so I tried to find something public domain. The only one I found so far is:
https://commons.wikimedia.org/wiki/File:Light_switch_widget.svg


With Inkscape I made two .png from this .svg:

Light_switch_widget_off_24.png
Light_switch_widget_on_24.png

The library you mentioned I found in the folder <ScadaBR_home>/graphics/ (here /opt/tomcat6/apache-tomcat-6.0.53/webapps/ScadaBR/graphics/).

There I created a directory ToggleSwitches and copied my two png into, together with an info.txt:
name=Toggle_Switches1
type=imageSet
#width=60
#height=60
text.x=14
text.y=2


To get a graphical representation of the binary status of my physical button in ScadaBR's Graphical Views, I have to choose Components->Binary graphic->data Point->Image set Toggle_Switches1->Zero image->One image->save and done.

I attached the two images and the info.txt.

Thank you for pushing me in the right direction.
Reply 0 0
thiagoralves
Iconfinder has a lot of free (and paid) icons as well, which might be useful:  https://www.iconfinder.com
Reply 1 0
Logopaede
Interesting source, thank you, although I cannot find anything useful filtering with "Free icons only / no link back". I will take a look at iconfinder again in a few weeks, when the content will have changed.
Reply 0 0
Logopaede
Update:
A nice .svg is available at openclipart.org:
https://openclipart.org/detail/203164/ui-toggle-button


I derived two .png from it (attached) and copied them to my aforementioned directory (ToggleSwitches). They were usable in my Graphical Views instantly.
Reply 1 0
Logopaede
Summary:
I finished my first project.
I leant on this and just changed a few things for the Raspberry Pi4:

* PB1 and PB2 connected to %IX0.0 and %IX0.1 and Ground. LED on %QX0.0 with 1K to Ground.
* Setting Negated for PB1 and Normal for PB2 in the ladder diagram (see attachment)

Also attached are my ScadaBR Graphic View and the program (*.st) for my raspi4.
Reply 1 0
Marcel
i make a Arduino as slave. i can't use ScadaBr to find the address for Arduino. Could you help me....
Reply 0 0
Marcel
this is my programm
Reply 0 0
thiagoralves
Make sure OpenPLC is running and is reachable from ScadaBR 
Reply 0 0
Marcel
name=Toggle_Switches1
type=imageSet
#width=60
#height=60
text.x=14
text.y=2




in the Progamm, what means x and y? Could you help me
Reply 0 0
Marcel
sometimes is x equal to 0... i am crazy about it
Reply 0 0
Marcel
by the way, i understand not width and height. how define man this
Reply 0 0
Reply