Hi @falkena,
Sure, but:
- I have the wiring done differently with one Q for power and another one for direction instead of Q for up and down.
- it’s not as nice as yours (structure and formatting).
BR,
Jacek
Hi @falkena,
Sure, but:
BR,
Jacek
Hi @skazi,
Cool Hardware lock is more safe as software one i use (see my post above). I’ll rewire relais at least 2 years. This spring it’s time to do this.
I hope, i can get the logic. I hope to get an idea, if it’s possible to have less M-Blocks.
Kind regards,
Alexander
Hi @falkena
Here’s my roller-shutter-controller UDF:
And this is the UDF definition file: roller-shutter-controller.lma.xml (19.9 KB) (remove the xml extension!)
BR,
Jacek
Hello everybody,
i hope, i’ve fixed pulse-thing. Please, find updated version in my binary repository.
If it works, i’ll open PR to main repository.
Kind regards,
Alexander
Sorry, I don’t get the Pulse thing.
The updated documentation states:
If
observe
is not set or set equalblock
, simply pulse with lengthpulse
milliseconds is send toblock
. Ifobserve
is set and differ fromblock
, binding will wait for value change onobserve
and send then a pulse with lengthpulse
milliseconds to block. Please note, update rate for change detection depends on bridge refresh value. For both use cases: ifblock
was0
then1
is send and vice versa.
So. If the observed block does not change, the pulse is never sent?
In your rollershutter example, NI23 or NI24 can never change, because V2.6 (or V2.7) never change value, because the Binding will never send a pulse?
Do you mean that the pulse is only sent, if the observed state differs from the state of the Switch item?
@falkena maybe adding some timing diagram for the pulse thing (like this: https://upload.wikimedia.org/wikipedia/commons/f/fc/SR_latch_impulse_diagram.png) would finally solve the confusion?
Continuing the discussion from Integrate Siemens Logo (plclogo) in OpenHAB 2:
Hello everybody,
i just tried to figure out how this works. At the moment I can’t write Network inputs on my Logo 8.
I am gonna show you my settings.
PLCGarten.items:
Contact PLCGarten_24V "24V Ok" { channel="plclogo:digital:PLCGarten:NetworkOutputs:NQ1:state" }
Contact PLCGarten_I2 { channel="plclogo:digital:PLCGarten:NetworkOutputs:NQ2:state" }
Switch PLCGarten_R1 { channel="plclogo:digital:PLCGarten:NetworkInputs:NI1" }
Switch PLCGarten_R2 "Licht 1" <light> { channel="plclogo:digital:PLCGarten:NetworkInputs:NI2" }
Switch PLCGarten_R3 "Licht 2" <light> { channel="plclogo:digital:PLCGarten:NetworkInputs:NI3" }
Switch PLCGarten_R4 "Licht 3" <light> { channel="plclogo:digital:PLCGarten:NetworkInputs:NI4" }
PLCGarten.things
Bridge plclogo:device:PLCGarten [ address="192.168.xxx.xxx", family="0BA8", localTSAP="0x3000", remoteTSAP="0x2000", refresh=100 ]
{
Thing digital Inputs [ kind="I"]
Thing digital Outputs [ kind="Q" ]
Thing digital NetworkOutputs [ kind="NQ" ]
Thing digital NetworkInputs [ kind="NI" ]
}
With this configuration my PaperUI shows me this:
I think this fine and should just work.
This ist what i programmed on my Logo:
In the Network overwiew i made an serverconnection:
Can you tell me what I am missing? Thank you for your help!
Hi @eXact,
you need memory thing for each network input. On example for NI1
Thing memory VB30_0 [ block="VB30.0" ]
EDIT: Inputs are contacts, output are switches. Please, fix the *.items
Kind regards,
Alexander
Yeah, but documentation states that
If observe
is set and differ from block
, binding will wait for value change on observe
and send then a pulse with length pulse
milliseconds to block.
However, this is obviosly not, what a Pulse thing really does.
@falkena Trying to reproduce your rollershutter example.
I saved your UDF to be compatible with Logo7.
In addition I included an emergency-stop flag - hoping this is at the optimal position to keep the UDF intact. The 3rd input is connected to a magnetic door-switch which is normally-ON (input is ‘high’ when door is closed).
Works in Logo, but so far does not work in openHAB:
Logo7 does not support reading NI (network inputs) directly, this might be a problem?
Thing pulse VB2_6 [ block="VB2.6", observe="NI23", pulse=500 ]
Thing pulse VB2_7 [ block="VB2.7", observe="NI24", pulse=500 ]
Or can I replaces this with:
Thing pulse VB2_6 [ block="VB2.6", observe="VB2.6", pulse=500 ]
Thing pulse VB2_7 [ block="VB2.7", observe="VB2.7", pulse=500 ]
(Pulse thing is still a bit mysterious to me).
Thanks,
Arnd
FYI, I have updated the 2 PLCLogo tutorials, these are fool-proof now (or mention issues).
@falkena, could you provide the sitemap for your rollershutter example?
Apologies, had no time to check your latest binding update (with pulse fixes).
Hi @tv-arnd,
sorry about late reply, i was quite busy last days. Regarding your questions
My sitemap is very simple:
Switch item=Rollo
The scaling factor is not really self-explained. I set it to max(T_Up, T_Do) * 100. Example: If T_Up is 17seconds and T_Do 15seconds, then T_Sc will be 1700. That’s right: Counting is more or less precise for one direction only. My wife told me, that rollos must be opened completely and closed with some gaps It was a time to think really hard: Each motor has physical endpoints. Means, i can drive high as long i will. But down i must measure the time the rollo will stop: i was simply too lazy to setup motor endpoints with a screwdriver The program can be extended to calculate rest time to drive dependend on current position. My Logo program for Easter calculation is meanwhile done, so why not take a look
And yes, you can use
Thing pulse VB2_6 [ block="VB2.6", observe="VB2.6", pulse=500 ]
instead of
Thing pulse VB2_6 [ block="VB2.6", observe="NI23", pulse=500 ]
BTW: I would couple emergency signal with both directions and wire them to R trigger input
Kind regards,
Alexander
Ok, Rollo goes up & down controlled via the UI up/down-buttons. Rollo stops using the UI’s up/down-buttons. Rollo STOP does not work using the UI’s X-button.
Error in Log: [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘RolloDrive’: Unknown variable or command ‘==’; line 11, column 11, length 15
Something is wrong with the code line
if (Direction == UP) {
Hi @tv-arnd.
try to add follow lines at top of the rule file:
import org.eclipse.smarthome.core.types.Command
import org.eclipse.smarthome.core.types.RefreshType
import org.eclipse.xtext.xbase.lib.Procedures
Kind regrads,
Alexander
Hello everybody,
again update in binary repository: Hardening pulse thing on slow network.
Kind regards,
Alexander
@falkena, allright with the 3 'import’s it works.
I do not see any button-activity (e.g. color change, when button is pressed - would by nice to see the ‘down’-button highlighted when rollo goes down).
The following one gave me a hard time
Contact RolloIsHi { channel="plclogo:pulse:LogoController:VB2_6:observed" }
Contact RolloIsDo { channel="plclogo:pulse:LogoController:VB2_7:observed" }
Actually, these are not used at all?
Tutorial is in the making.
@falkena I have intalled the new binding version 2.5.0.
I can still ‘create’ hanging pulse things (i.e. NI stays ON forever, Logo flashing required). Can be reproduced with the 2nd example in
https://community.openhab.org/t/plclogo-solution-logo-output-switching/64264/2
This happens if the Logo-refresh time is longer than the pulse-length!! I think it is a good design guideline to make a pulse at least twice as long as the Logo-refresh time.
@All Just try the new binding:
Regards,
Arnd