Hello thank you for the reply. I have finally got it working with much success. I'm still not sure where the "inlined" error came from but now it's gone.
I have a question for you. I'm trying to use global variables throughout the simulink model. It works if I call the variable within the same s-function as your guide said. However, if I call that variable in another S-function it gives me an error " error: <variable> undeclared (first use in this function)" pertaining to the wrapper file. I find this strange since all my calls to functions within the "#includes" headers work.
For example, my includes section looks as shown below: