You can't do an exact match to the Siemens FB calls since there is no such thing as instance data blocks with CLX (there are no data blocks at all). However, you can do something that might be acceptable.
With the S7 you can enter the in, out and stat parameters you need as the devolop your application. In CLX, make up a user defined data type for this function. Include all the dtaa you need for the function. Then use a JSR to this file. You wil have one input and one output parameter. They will both be the same instance of the data type you created when you made your function.
So if I wanted to control a motor, in your main program in CLX:
JSR (Motor_Control, 1, Motor_1, Motor_1)
Motor_Control is tha name of my fictional function
The number 1 tells the JSR that there is one input parameter
Motor_1 is an instance of a user defined data type Motor
Motor contains:
Motor_Forward BOOL
Motor_Reverse BOOL
Desired_Speed INT
Actual_Speed INT
Overload BOOL
This is a pretty simple example but you get the idea.
In the called function you would have at the top:
SBR(Motor_Instance)
and at the bottom:
RET (Motor_Instance)
Motor_Instance being data type Motor.
You could then call the subroutine as many times as you want with different data structures going in at the JSR.
Now to Seppo's point. Thism type of programming can be VERY hard to troubleshoot. Many people who use plcs like the idea that you can look at a piece of logic on the screen and determine it's status. Once you start doing multiple calls to a given subroutine you give up this ability. Now you need to have the logic open as well as a tag window showing the instance structure you are interested in. This can be annoying at best and debilatatingly confusing at worst. Especially when the plant manager is looking over your shoulder because the machine doesn't work.
I now that using separate programs does not allow you make a single change and have it propogate across all your programs. But people who look at your stuff in the future will be much more comfortable if you keep the structure straightforward.
Keith