While int64 and uint64 are supported as built-in Simulink data types since R2019a, int64/uint64 variables as block parameters are not yet supported.
The restriction is specifically with the 'Value' parameter of Constant, or similar edit-boxed blocks (e.g. Gain blocks, Bias blocks, etc.). int64/uint64 are supported for simulation, but values cannot be cast to it.
In R2019a and later, as long as the "Output data type" is set to the correct data type, the type during simulation will be int64/uint64:
>> set_param(gcb,'Value','1')
>> set_param(gcb,'OutDataTypeStr','int64')
To create a value with the desired data type, you can also use a Simulink.Parameter and set the data type information using the 'DataType' field. This will make sure that the value in Simulink is a 64-bit integer without needing to specify it in the 'Value' field. For example:
>> x = Simulink.Parameter(1000);
>> x.DataType = 'int64';
Unfortunately, the 'Value' of the Simulink.Parameter cannot be a 64-bit integer, but Simulink will treat operations as 64-bit since the DataType is specified as such.
An enhancement request has been submitted to development to improve the error message, and add support for int64/uint64 variables as block parameters.
Best Answer