Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

snydl0ga

Industrial
May 26, 2004
12
US
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
 
Replies continue below

Recommended for you

Yes.



Regards,

Jacek

Do it right or don't do it at all.
 
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
 
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
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top