×
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

Function block prog. in Pascal

Function block prog. in Pascal

Function block prog. in Pascal

(OP)
Dear Fellows,
 Can any body let me know the web address or other stuff from where I can learn programming the function blocks in pascal for S7.

I have a problem in understanding a command

temp:=DWORD_TO_REAL(db20.dbd0)

how it works.

Bye,
Umar Zia

RE: Function block prog. in Pascal

Hello, mumarzia;
I only saw your post today, ans I hoope this answer will still be usefull.

Siemens' Pascal-like language is called SCL, and you can find the SCL programming manual at this address:

http://www4.ad.siemens.de/-snm-0135030360-1084460314-0000003309-0000000211-1087584982-enm-WW/llisapi.dll?func=cslib.csinfo&lang=en&objid=5581793

The instruiction you are looking at is a Typecast function; the value in DB20.DBD0 is a DWORD format, which you convert to a REAL (IEEE floating-point value) before loading it to the variable "temp" (which presumably has been declared as a REAL value).

Hope this helps,
Daniel Chartier

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