WSUB, DWSUB

WSUB s1, s2, d
DWSUB s1, s2, d

These commands subtracts s2 from s1 and store the result in d. WADD subtracts word values and DWADD subtracts double word values.

P M F S C T D Constants
s1 O O O O
s2 O O O O
d O O O

In the ladder above, D1 will get 95.

Go CUBLOC Ladder Logic home