s7200 subroutines

maniec

Member
Join Date
Sep 2006
Location
South Africa
Posts
29
May seem silly, but ive been trying to use subroutines in s7 microwin as I would in Step7, ie to create on subroutine (for example for analogue HH, H, L LL Alarms and then callinf the subroutine numerous times wit different in and out variables. Doesnt seem to work?????/ Anybody have any ideas???
 
maniec said:
May seem silly, but ive been trying to use subroutines in s7 microwin as I would in Step7, ie to create on subroutine (for example for analogue HH, H, L LL Alarms and then callinf the subroutine numerous times wit different in and out variables. Doesnt seem to work?????/ Anybody have any ideas???
It does work, but only with the second generation S7-200s (S7-22X). You didn't mention what CPU you tried it on, so this could be the problem.
DDV said:
Do you want to use it like you would a FB in Step7?
Now that is completely impossible. Subroutines in S7-22X are equivalent to FCs in S7-300/400.

Kind regards,
 
jvdcande said:
It does work, but only with the second generation S7-200s (S7-22X). You didn't mention what CPU you tried it on, so this could be the problem.
Now that is completely impossible. Subroutines in S7-22X are equivalent to FCs in S7-300/400.

Kind regards,
Yes DDV, like an FB. I'm using a CPU224 brand new out the box (think v2.01). If subroutines are like FC's in step 7 then obviously I cant???
 
No not like a FB. You can create recipes that you can add “variable” tags to. Play with the Recipe Wizard and see how it works.

Ek weet nie of dit jou doel gaan dien nie, ek sal bietjie rond krap en jou laat weet wat ek kry.
 
DDV said:
No not like a FB. You can create recipes that you can add “variable” tags to. Play with the Recipe Wizard and see how it works.

Ek weet nie of dit jou doel gaan dien nie, ek sal bietjie rond krap en jou laat weet wat ek kry.

Want to use it as a multiple instance, but seems its not possible to call the same SR multiple times, because there is nowhere to assign a specific working memory area for it, ie. in a call the SR with a db area attatched to it, like in step7.
 
The data is stored in local memory; I’m not sure how this affects what you want to do. The only problem will be in the nesting depth, I think the block can only be called 8 times…..



As I understand FB’s in Step7 I believe that this is the closest you will get to it using a 200, it’s pretty close I think?
 
DDV said:
The data is stored in local memory; I’m not sure how this affects what you want to do. The only problem will be in the nesting depth, I think the block can only be called 8 times…..



As I understand FB’s in Step7 I believe that this is the closest you will get to it using a 200, it’s pretty close I think?
Might be wrong here, but the only way I get it to work at the moment is by duplicating the SR (making a lot of the same SR's)
 
Well that sort of defeats the object doesn’t it? In my example you can see that I call the same subroutine twice, I loaded it on a 224 XP and it works fine….



Zip your code and post it, then I can have a look.
 
DDV said:
Well that sort of defeats the object doesn’t it? In my example you can see that I call the same subroutine twice, I loaded it on a 224 XP and it works fine….



Zip your code and post it, then I can have a look.

Have a look at SBR11 where sbr30 and 31 is used
 

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,138
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