S7PP Member S Join Date Sep 2010 Location Toronto Posts 134 May 25, 2011 #1 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.
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.
KalleOlsen Member K Join Date Oct 2008 Location Norway (moustache area) Posts 1,782 May 25, 2011 #2 Hi! S7PP said: 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. Click to expand... 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
Hi! S7PP said: 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. Click to expand... 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
S7PP Member OP S Join Date Sep 2010 Location Toronto Posts 134 May 25, 2011 #3 Thanks Kalle, it sounds complicated to me. I gave it up, I'll use FB instead. Thanks anyway.
L D[AR2P#0.0] Lifetime Supporting Member L Join Date Nov 2006 Location UK Posts 6,702 May 25, 2011 #4 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.
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.
S7PP Member OP S Join Date Sep 2010 Location Toronto Posts 134 May 26, 2011 #5 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!
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!