Siemens S7 SBR

garryt1

Member
Join Date
Jun 2002
Location
n.ireland
Posts
128
Can Someone with siemens s7 experience please confirm my thoughts on how a subroutine is called and returned,as far as i know the following is the correct method but i would just like some reassurance from an S7 expert.

network ?

I.?
----||----------------Sbr ?

Then within the subroutine at the end of the code:

----------(RET).

Can someone confirm this please! beerchug beerchug
 
I am NOT an expert but I do watch things about Siemens. I assume this is an S7-200 since the S7-300/400 doesnt have an SBR command.

The Siemens support site has some downloadable examples of subroutines etc.SIEMENS S7-200 DOWNLOADS<the link to them
 
If this is an S7-200, I believe you call the subroutine using the CALL instruction with the desired subroutine number. The subroutine itself should be setup with the SBR instruction (with the appropriate number), the subroutine code, and a non-conditional RET instruction. Conditional RET instructions can exist in the subroutine if needed. All subroutines must be after the main ladder END instruction.
 
Hi could you tell me which S7 CPU you are using either S7-200 S7-300 or S7-400 series and are you wanting to pass any data to the sub or just jump and return?

We only use seimens at work so we will try to help
 
Hi Homer,

It is a type S7 214 cpu,i am only jumping to the sbr and scanning some logic then returning to OB1.

thanks
 
Hi garry

I am not 100% certain because I haven't used a 200 my self but if you usr the call statment in stl this will jump to your sub when the sub has finished it should just jump back to the next command in OB1.

As I say I am not sure but I will try to find out tonight when I am at work. Then post a more definate reply.

Get back to you soon :cool:
 

Similar Topics

Hi everyone hope you'll well. Is it possible for me to download a Crack version of tia portal v13..sorry to say this but the software is very...
Replies
3
Views
63
I have established an online connection to a machine using an S314 processor. I am using an mpi connector and simatic manager. The online...
Replies
3
Views
71
Hi everyone, i have a Siemens S7-300 Cpu 314C-2 DP with several cards of i/o and servos my laptop has TIA version 16 and 17 loaded and...
Replies
4
Views
134
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
216
Good morning fellow sea captains and wizards, I am being asked to do the above and obtain 4 values from each slave, I know about the MRX and MWX...
Replies
27
Views
565
Back
Top Bottom