Use SFC20 in FC

S7PP

Member
Join Date
Sep 2010
Location
Toronto
Posts
134
Hi Guys,

I defined OUT1 as an UDT, I want to transfer data to it.

Why am I not able to use a SFC20 to copy block in an FC? I know I can do it in FB.

Is there any way to do it in FC?

Thanks a lot.

SFC20.jpg
 
Hi!
Hi Guys,

I defined OUT1 as an UDT, I want to transfer data to it.

Why am I not able to use a SFC20 to copy block in an FC? I know I can do it in FB.

Is there any way to do it in FC?

Thanks a lot.

I guess it has to do with the IO parameters on an FC being pointers. Perhaps you get an extra pointer level?

If you BLKMOVE to a similar structure in the L-area and do L / T to the outputs, it should func, I think.

Kalle
 
Load/Transfer loop required in FC. See example project.

FC parameters are passed by pointer hence SFC20 will not accept an FC parameter as an argument.

FB parameters are passed by value (except an INOUT of type UDT) hence SFC20 can be used as the parameter can be defined as an absolute address.
 
That's very cool. I have to learn this pointer and any data type. I'm not used to deal with it yet.

Thanks a lot. You always have a solution. Great!
 

Similar Topics

I have a very strange issue and I cannot figure out why it is not working. I read input of type pointer and store it to local temp type any. I...
Replies
4
Views
1,953
Hello everyone! I'm moving string value from DB to Q area for displaying it at WinCC. I see some value is presented in DB in Variable Table...
Replies
16
Views
5,704
Hello all, IN S7-300 Does anyone know if its possible to address sfc20 source and destination with variable addresses? ie Indirect addresses...
Replies
10
Views
2,998
In one network SFC20(BLkMOV) is used to transfer 8 byte data from P#DB500.DBX8.0(SRC BLK) to P#DB20.DBX4.0(DST BLK). I would like to change...
Replies
2
Views
4,301
Hi all, i have learned siemens sample code by using sfc 20 for data move. but i don't know how i can adapt this sample code if i would like to...
Replies
0
Views
2,009
Back
Top Bottom