The most flexible block for implementing custom code (similar to S-Function) is the C-Script block. It has a bit of a learning curve if you are not familiar with C. I would recommend you read the manual if you want to use some of the more advanced features, but for simple algebraic expressions it should be straightforward. There also is a tutorial on the website about how to use the C-Script block for implementing controllers: https://plexim.com/support/tutorials
There also is a “function” block which allows you to implement simple one liner functions using C syntax. Take a look at the help documentation of this component to see what arithmetic functions it supports.
If your S-Function just has basic arithmetic, you can also use standard blocks from the PLECS Library (Product, Divide, Math Function, etc.)