S7200 function blocks

Fiona

Member
Join Date
Apr 2004
Posts
14
Hi Guys

I've programmed on S7-300s and created my own FB,s

Now I've been asked to write similar code for the S7-200 platform.

My question: is it possible to write FB's using S7-200. I've had a quick look at the s/w and can't see any obvious reference.

Thanks in advance

Fiona.
 
Hello Fiona,

You can do similar S7-300 FC's in S7-200 not FB's because you need the instance DB, i dont know your application but normally you can replace the FB with an FC.
i´m using MicroWin v3.1 sp1, maybe your version is an old one.
Otherwise you can simulate an FC by passing the input parameters before call the subroutine, and then call the routine, and after that you update from the output parameters your output variables...Uff its not very easy to explain, but feel free to ask more...

Ol the best,
 
Hi

Have created this example using user defined library. Is this what you meant?

Think I can translate my S7-300 FBs into this form for the S7-200.

Thanks

Fiona.

fb.jpg
 
right

hi fiona,

the latest version is microwin v3.2 .(for programming s7 200 plcs)

I always creat a subroutine and then add it to the user library
which is the only way i think ?? please somebody correct me if i am wrong.


regards.spiro
 
Hi Fiona,

I dont work with S7-200 or MicroWin, but I can see one potential problem.
Your S7-200 Function looks very much like an FC in S7-300/S7-400.
But you did say "FB" not "FC" and thats a little bit different.
FBs in S7-300/S7-400 MUST have an associated instance datablock (like friberio says). An instance datablock is some data memory reserved for each call to the FB.
You can make something functionally similar in S7-200 by reserving some data memory to each Function. If the original S7-300 FB uses some of the DB memory inside its code, then you carefully have to convert both code and data to something similar in S7-200.

That said, it is actually possible to create S7-300 FBs that does not use the DB to anything, but in that case it would have been more natural to create it as an FC.
 
Hi Guys

The good thing about FB's and DB's is it is portable and I only need 6 input parameters.

In the FB I'm collecting data for a SCADA (winCC) to use abd have set it up so that the winCC tags reference the instance DB.

Inside the FB I'm reading the CPU clock, converting it to integer values to get hour minutes and seconds to use in comparison blocks that move the data to different data block areas, eg "Shift 1 total", "shift 2 total" etc.

I'm also monitoring machine performance such as cycle times, idle time etc. In all there is quite a lot of data in the data block mostly in integer format. The data is read by winCC and the manipulation is done by winCC.

So now I'm thinking that for S7-200 I can make my 'FB' into an 'FC' and set parameters when writing the subroutine so that I can assign the outputs of the subroutine to data block locations (available for winCC to read). Not as convenient as S7-300 FBs but it should work

Thanks again

Fiona.
 

Similar Topics

Hi there! I know this is playing in archeologist, but I need to tune a bit some older Kollmorgen/AKD Digifas 7100 servo drive. Any chance of...
Replies
3
Views
1,137
hey guys here first time for me in this awesome forum actually i have S7-200 connected to Winview HMI and HMI project file has lost and broken...
Replies
0
Views
600
If a TD200 program was created with the wizard in Microwin does anyone know if the code for the TD200 would be uploaded to micowin when doing a...
Replies
0
Views
1,176
Hi, I have a S7200 PLC with PC based WinCC Scada. This PC was replaced due HD failure and replace with a back-up PC provided by the contractor...
Replies
2
Views
1,625
Hi guys, I have a client with a siemens S7200 PLC (1215C CPU),which has an on board ethernet port (marked "profinet" on the PLC) and I need to...
Replies
1
Views
1,534
Back
Top Bottom