S7 - Using FC Parameters

JayD

Member
Join Date
Aug 2009
Location
Australia
Posts
53
Hey All,

Hoping for some help with using FC parameters as parameters for another 2nd FC within the 1st FC.

I understand that FC parameters are passed as DB pointers and am unable to directly use them as an input parameter to another FC.

What I currently do is to copy the parameter to temp and then use the temp as the new parameter. Can anyone suggest a better alternative?

Cheers
JD
 
All FC parameters are passed as Area pointers, not DB pointers. Can you post a simple example showing the passing on of parameters ?

Create your example code, create a new library (as opposed to a project), insert an S7Program into the library then copy the blocks to the library. Archive the library and then attach to your post.
 
My issues is again with UDTs, not with basic elements. A UDT parameter(In or In_Out) of a main FC can't be used as an In to a sub FC. See the example code...

Is there a way of copying the pointer and providing that as the input to a sub FC?
 
Is there a way of copying the pointer and providing that as the input to a sub FC?

Yes, but as the sub FC is now receiving an any pointer, the code in the sub FC cannot use the UDT element names. You could refer to the elements using indirect addressing, but, if the UDT changes you will have to manually edit the block to change the offsets. The example I've shown in the attached library copies the udt to the temp area so you can process using the UDT names, the temp area is then copied back to the udt.
 

Similar Topics

Hey! I couldn't find any answer for my question anywhere, so maybe You can help me. Most of the time I was working with Siemens. I created an AOI...
Replies
4
Views
1,227
Using CCW version 11 or 12, downloading parameters to powerflex 700s failed. Unknown DPI error. (From message DPI: 81 00 :: 30.1.5) (Heidenhain...
Replies
0
Views
1,948
Hi techsperts! I was wondering if anyone could help me... I have a project where I've configured a (Micro850) PLC as well as a (Powerflex) VSD...
Replies
4
Views
2,046
I found a ladder program that uses JSR instructions with no input or return parameters. And none of the subroutines it calls for have SBR and RET...
Replies
8
Views
3,304
I have seen how to read extra parameter's from a Powerflex40 drive using messages. Is there any way to use an array to get lets say amps from...
Replies
4
Views
1,784
Back
Top Bottom