I'm building my first s-function block from compiled C code. Everything is going fine, except that the s-function block demands that its interface variables are of type double
, even though the underlying C interface variables are not. The block raises an error if I connect a boolean signal to the input and try to run.
I'm getting the variables in the code by calling ssGetInputPortSignal
and ssGetOutputPortSignal
, and casting the void pointers they return into the correct pointer types.
How do I configure the types of an s-function block's parameters in Simulink?