×
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

S7 Read_Clk how do I pull all 8 bytes into DataBlock?
2

S7 Read_Clk how do I pull all 8 bytes into DataBlock?

S7 Read_Clk how do I pull all 8 bytes into DataBlock?

(OP)
I am finshing a project but need to parse out the DateTime from the Read_CLK SFC1.  Can I just call the SFC1 and place the CDT result in a datablock?

Lance

RE: S7 Read_Clk how do I pull all 8 bytes into DataBlock?

Yes.

Regards,

Jacek

Do it right or don't do it at all.

RE: S7 Read_Clk how do I pull all 8 bytes into DataBlock?

(OP)
Good, now....how do I do it.  I am missing something becasue I just can't seem to get things right. I tried the direct method by calling SFC1 and putting the results into DB9 but the types are different or something.

Is there an easy way to do this?

Lance

RE: S7 Read_Clk how do I pull all 8 bytes into DataBlock?

Hi,
a bit late but,

create a temp-var Typ DT e.g. #tmp_DT;
and then:

      CALL  "READ_CLK"
       RET_VAL:=MW200
       CDT    :=#tmp_DT

      CALL  "BLKMOV"
       SRCBLK :=#tmp_DT
       RET_VAL:=MW200
       DSTBLK :=P#M 300.0 BYTE 8

to transfer the DT e.g. to--> MB300 - MB307


HTH

Rolf

RE: S7 Read_Clk how do I pull all 8 bytes into DataBlock?

(OP)
Rolf,

 That's it!  Thanks.  It is simple once you figure it out, hehe.

I am learning that I need to learn the Standard blocks to see what all tools are in there. I was looking for the Block Move myself.

Now I just have to be able to take the 8 bytes and convert them to DT formate to Set the Clock and I am done.

Thanks again.

Lance

RE: S7 Read_Clk how do I pull all 8 bytes into DataBlock?

When I said "yes" I ment:

      CALL  "READ_CLK"
       RET_VAL:=#iRetVal
       CDT    :=DB1.DT1

where DT1 is data of type DT defined in DB1.

Regards,

Jacek

Do it right or don't do it at all.

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