hourglass

tulip

Member
Join Date
Oct 2005
Location
ist
Posts
236
I want to a program for Simatic S7-300 Plc system that while a value is decreasing another value will increase at the same quantity like a hourglass.I could not success..
Thanks for your quıck reply and efforts.
 
Let's assume -

MW0 : Increasing value
MW2 : Decreasing value
MW4 : Rate

So,

L MW0
L MW4
+I
T MW0

L MW2
L MW4
-I
T MW2



Now presumably you also need to check on the starting values for MW0 and MW2, the current values (do you care if MW2 goes negative?), the value in MW4 (what if it's negative? the increasing value will decrease and vice versa) etc.
But basically these few lines are what you've asked for. There has to be more to it that this ... ?

Ken
 
Excuse me you understood me wrong.You think a data word.This data's value is decreasing ( 100,99,98,97 ...)while this value is decreasing at the same time and same quantity another data word will increasing..like a hourglass.


for example:
dw100=100 ---------------> dw200=0
dw100=99 ---------------> dw200=1
dw100=98 ---------------> dw200=2
...
.

.
.
.
dw100=0 --------------> dw200=100
 
tulip said:
Excuse me you understood me wrong.You think a data word.This data's value is decreasing ( 100,99,98,97 ...)while this value is decreasing at the same time and same quantity another data word will increasing..like a hourglass.


for example:
dw100=100 ---------------> dw200=0
dw100=99 ---------------> dw200=1
dw100=98 ---------------> dw200=2
...
.

.
.
.
dw100=0 --------------> dw200=100

LD SM0.1
MOVD VD100, VD100

LD SM0.0
MOVD VD104, VD200
-D VD100, VD200

when ever the value in vd100 is decreased...the value in vd 200 is increased by the same amout and if vd100 increases..then the value in vd200 will be updated accordingly!! is that what you want to do??

anyhows

hope this help.K
 
Back
Top Bottom