Question about calling FC's in S7

uptown47

Lifetime Supporting Member
Join Date
Feb 2008
Location
Over there, next to those boxes
Posts
1,146
Hi all

I've translated an S5 program into S7 but unfortunately it doesn't work.

I've even used the S5 converter to check my conversion and it seems fine.

Within the S5 there are several calls to the same block, FC 83, which is a S5-S7 Block 16bit Multiplier.

My question is this...

Could it cause a problem calling this block several times from within the one block and sending different parameters to it?

Or is it perfectly acceptable to call these blocks as many times as you want and just send different values each time??

If it was an FB I would put different Instance DB's with every call but with it being an FC I don't have that option...

Can anyone clarify this for me

Many thanks in advance

:)
 
An FC can be called as many times as you want, one after the other if you want.

The rules with an FC, internally is simply, if the parameter is an IN, then do not write to it in the block, if its an OUT, then ensure that you condition it in the block prior to using it.

If you need to update an IN or remember an OUT, then it has to be IN_OUT.

Providing the above is adhered to you should be fine.

Regarding the data passed in and out, ensure the same addresses are not being used which can cause errors.
 
Can you be more specific about what is not working ?

(e.g. I've just built a nuclear power station and it's not working - can anyone help) :)
 

Similar Topics

Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
180
Good morning! Let me start by saying, I am still learning about this type of HMI programming. I recently watched a video about recipes and how it...
Replies
1
Views
103
I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
101
I have an HMI 2711R - T4T Series B, and I want to know which PLCs, besides Micro 820, can communicate with it.
Replies
2
Views
108
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
97
Back
Top Bottom