Functions in S7200

Join Date
Jan 2009
Location
Bangalore
Posts
2
Dear All,


How to define a function in S7200 and how to use it?

Can we pass timers as arguments for a function if so how it can be done?


Regards
Vishwanath
 
Hello Vishwakrishnan;
S7-200 uses subroutines instead of functions; you can use parameters to setup the specific call of your subroutine.
See the following extract of the S7-200 System Manual:

Calling a Subroutine With Parameters​
Subroutines can contain passed parameters. The parameters are defined in the local variable
table of the subroutine. The parameters must have a symbol name (maximum of 23 characters), a
variable type, and a data type. Sixteen parameters can be passed to or from a subroutine.
The variable type field in the local variable table defines whether the variable is passed into the
subroutine (IN), passed into and out of the subroutine (IN_OUT), or passed out of the subroutine
(OUT). Table 6-79 describes the parameter types for a subroutine. To add a parameter entry,
place the cursor on the variable type field of the type (IN, IN_OUT, or OUT) that you want to add.
Click the right mouse button to get a menu of options. Select the Insert option and then the Row​
Below option. Another parameter entry of the selected type appears below the current entry

Look up the manual at the following link, or use the information in the online help of Microwin for more details.
http://support.automation.siemens.com/WW/view/en/1109582
Hope this helps,
Daniel Chartier
 

Similar Topics

Two questions for GE/Emerson e.g. PACSystemsRX3i (CPE330): 1. Is it possible to use 2D arrays inside a function as a local member? (I can only...
Replies
0
Views
104
For a while, I have been working with InTouch 10.1. The problem I am currently facing is the need to implement certain functions that do not...
Replies
0
Views
504
I've uploaded a raw program from an old Hitachi EC-40HARP that is to be replaced by something else. I have to do some reverse engineering as the...
Replies
1
Views
449
Is there a way in CX-Programmer to call functions from a structured text program? I have found this manual that seems to describe the process...
Replies
1
Views
1,094
I am working on a project on an s7-1200 with an hmi, but I am looking to remove the HMI and substitute its functionality using the User-Defined...
Replies
2
Views
1,941
Back
Top Bottom