easy-forum
English Support - Hardware => easy topics (general) => Thema gestartet von: behemoth am September 29, 2005, 12:02:46 Nachmittag
-
Helo
I try to described my problem in other way. Mayby someone can help me now.
I have for example 3 words:MW2 MW3 and MW4 and 2 flags(markers):
M01 and M02.
I want to make in my program, when:
1) M0=1 and M02=0 that AQ1=MW2
2) M0=0 and M02=1 that AQ1=MW3
3) M0=0 and M02=0 that AQ1=0
1) M0=1 and M02=1 can't happen in my program how can I make it?
Thanks
-
Hallo behemoth,
Try this
In this example, the function is
1) M01=1 and M02=0 that AQ1=MW2
2) M01=0 and M02=1 that AQ1=MW3
3) M01=0 and M02=0 that AQ1=0
4) M01=1 and M02=1 that AQ1=0 for security, can be deleted.
-
Hallo
Viele danke fur Dich Juergen.
Your program works good,but value of MW4 and so AQ1 change to value of MW2 or MW3 only when m02 or m03 changes. I need(I've didn't written it in my first question) that AQ1 is changed continously when MW02 or MW03 are changed.
And I don't now how can I realise this.
Thanks
-
Hello behemoth,
use a second LS function block (LS01 with MW02 at LS01I1 and LS02 with MW03 at LS02I1) and a BV function block in OR mode to merge the values of LS01QV and LS02QV.
Enable LS01 with M01 and /M02 and LS02 with /M01 and M02 (The example is written with easySoft V5.11).
If you don't need to scale your values, take VC function blocks instead of the LS ones, they save memory and calculation time, because the LS function block uses floating point arithmetics!
Best regards
Bernhard
-
wow it works!!!
viele danke Bernhard.
It's very smart way of using BV block, I think I couldn't manage by my self with it. So thank you ones again.
Greetings
behemoth