×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

STEP-7 using timer data
3

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.

RE: STEP-7 using timer data

I believe it is as simple as a Load and transfer instructions. (MOV instrucion in AB)

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

(OP)
Yes this has done the trick with a DI_I conversion at the end.

Thanks very much for the help.
 

RE: STEP-7 using timer data

(OP)
Thanks looks like some handy stuff.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources