I've realized that implementing math functions on the DL06 is much more difficult for me than it is on the Allen Bradley processors that I am most familiar with.
Lets consider a real-world example, taken directly from a project I am working on.
I have a TMRA that I want to calculate the percentage complete.
TMRA is T4
Preset for the timer is in V13002
Result is to be a real number stored in V12000
Here is how I did it:
LD K100
MULD TA4
DIVD V13002
BIN
BTOR
DIVR R100
OUTD V12000
Is there a better way?
Lets consider a real-world example, taken directly from a project I am working on.
I have a TMRA that I want to calculate the percentage complete.
TMRA is T4
Preset for the timer is in V13002
Result is to be a real number stored in V12000
Here is how I did it:
LD K100
MULD TA4
DIVD V13002
BIN
BTOR
DIVR R100
OUTD V12000
Is there a better way?