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

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
39
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
54
I'm working with a project that contains some routines in ST but mostly in ladder. Am I correct in assuming this 'rung': DB1001DO._01AV55_OPEN :=...
Replies
4
Views
92
Is there a way to reset the count on the RS Logix BackUp?? XXXXX PROGRAM IN PROGRESS_BAK445.RSS XXXXX PROGRAM IN PROGRESS_BAK446.RSS XXXXX...
Replies
8
Views
245
I have a few questions about Studio5000. 1. Why is my RA folder so big? its well over 100 GB. 2. How do you delete versions or extra files...
Replies
3
Views
270
Back
Top Bottom