Milofish
Member
Hi,
I am looking for a little help here. What I have is two counters, both are set to a PV of 9999, when counter 1 CV = 9999 it increments the 2nd counter by 1 and then resets and starts over.
What I want to do is to combine the two CVs into one DINT. I am attempting to take the 2nd counter and multiply by 10000, and store that value into a DINT and then add it to the CV of the 1st counter.
My issue is how, S7 will not let me use the MUL_I with a DINT declared for the output, and a MUL_DI will not allow me to add a value of 10000 to IN2.
I only understand LAD programming, so if this has to be done in STL someone will need to walk me through that.
Any Help?
Thanks
Kris
I am looking for a little help here. What I have is two counters, both are set to a PV of 9999, when counter 1 CV = 9999 it increments the 2nd counter by 1 and then resets and starts over.
What I want to do is to combine the two CVs into one DINT. I am attempting to take the 2nd counter and multiply by 10000, and store that value into a DINT and then add it to the CV of the 1st counter.
My issue is how, S7 will not let me use the MUL_I with a DINT declared for the output, and a MUL_DI will not allow me to add a value of 10000 to IN2.
I only understand LAD programming, so if this has to be done in STL someone will need to walk me through that.
Any Help?
Thanks
Kris