There seems to be a confusion regarding array indexing. Modelica uses 1-based indexing of arrays, so expressions like these are problematic: array_input_var1[0]. If I change index 1 to 2, index 0 to 1, and set int_limit = 3, then the block simulates fine with a recent version of System Modeler. I could also successfully perform FMI 2 CS export of the block. How does that work for you?