This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

create a "Toggle" button from LM
#1
Hi, 


i'm trying to get my LM to work together with my PLC.

So far, communication and mapping for status works fine.
in my plc i got a toggle function for my real life push buttons.

now i want to also write to the plc from my LM but the basis touch UI give a 0 or a 1 and does nog toggle so i can't interoperate between smartphone/physical buttons.

any ideas how to fix this ?

make "toggle" buttons in LM or try something else.

thx
Reply
#2
Hi,

By default the button is a toggle button, only when you enter a fixed value it will send 0 or 1.

BR,

Erwin
Reply
#3
hi erwin,
 
i think i might do something wrong,

what i did:
- map 1 bool for the button, knx address 1/1/1 to modbus
- map 1 status for the feedback of the bulb to 2/2/2

in logicmachine i went to visualisation, added 1 new object, main 1/1/1 en status 2/2/2
1/1/1 = type switch
2/2/2 = type bool

when i use my phone and click on the button the first time, 1/1/1 goes to "on", the feedback of the bulb works an my icon lits up.
but 1/1/1 stays "on" and i can't change it again.

any idea whats wrong ?
Reply
#4
Hi,

Should work like that..

Can you add a event script to 1/1/1 and add: log(event.getvalue()) to it and switch a few times?

I wunder if the value is send like it should and that something on the modbus side goes wrong.

BR,

Erwin
Reply
#5
Hey Ewin,

it goes on the first time and afterwards i only get the "off" value written in the logs Sad

to reply on my own post, i think i got the misunderstanding.

the visu button is a toggle on its own. while i'm doing the toggle in my PLC.

so i just need the "push", not the "toggle" ....
Reply
#6
Hi,

You might want to only send 1 by using 'send fixed value' and set it to 1 on the vis object, or if you use the new FW you can now set the button as a 'doorbell' by using the visparams on the object, select type start/stop for sending 1 on press and 0 on release or stop/start for sending a 0 on press and a 1 on release.

BR,

Erwin
Reply


Forum Jump: