STEP-7 using timer data
STEP-7 using timer data
(OP)
Hi everyone, this is my first time using Siemens gear (STEP-7, ladder logic and CPU224) and I would appreciate any ideas anyone can offer.
Basically I have a pick-up sensing a wheel with a single tooth giving me an aprox 1Hz square wave signal with a low M/S ratio.
The frequency of this signal will vary a small amount, so I would like to use this signal to generate a variable that can be adjusted using a math function, and then applied to the PT of another timer. The timer then turns on a punch, so basically I am trying to create a speed compensation system.
So far I have the following:
1. I have used a BGN_ITIME and CAL_ITIME instructions to find my time value - a DWORD value.
2. Next I take the DWORD value, use a MULT_R instruction and multiply my time value by a coefficient, generating a new REAL value output.
3. Now I'm stuck, I've tried applying my REAL value output directly to the PT of my final TON timer but I get an error - data type is not valid for the instruction operand.
I'm guessing the data type is the wrong size for the PT input, so my question is how do I convert it? I've tried the convert instructions but none seem suitable. Anybody point me in the right direction?
Or am I going about this the wrong way, is there an easier more straight forward way?
Sorry for the long post and thanks for looking if you've got this far.
Basically I have a pick-up sensing a wheel with a single tooth giving me an aprox 1Hz square wave signal with a low M/S ratio.
The frequency of this signal will vary a small amount, so I would like to use this signal to generate a variable that can be adjusted using a math function, and then applied to the PT of another timer. The timer then turns on a punch, so basically I am trying to create a speed compensation system.
So far I have the following:
1. I have used a BGN_ITIME and CAL_ITIME instructions to find my time value - a DWORD value.
2. Next I take the DWORD value, use a MULT_R instruction and multiply my time value by a coefficient, generating a new REAL value output.
3. Now I'm stuck, I've tried applying my REAL value output directly to the PT of my final TON timer but I get an error - data type is not valid for the instruction operand.
I'm guessing the data type is the wrong size for the PT input, so my question is how do I convert it? I've tried the convert instructions but none seem suitable. Anybody point me in the right direction?
Or am I going about this the wrong way, is there an easier more straight forward way?
Sorry for the long post and thanks for looking if you've got this far.





RE: STEP-7 using timer data
Create data type that will be accepted by the instruction that you are trying use. Load the value you are using and transfer into the new variable.
Load REAL_variable
Transfer Dword_Variable
RE: STEP-7 using timer data
Thanks very much for the help.
RE: STEP-7 using timer data
http://ww
RE: STEP-7 using timer data