# Data type of State Machine outputs

**URL:** <https://forum.plexim.com/t/data-type-of-state-machine-outputs/2058>\
**Category:** PLECS\
**Tags:** state-machine, code-generation\
**Created:** [April 23, 2025, 9:58am UTC](https://forum.plexim.com/t/data-type-of-state-machine-outputs/2058 "2025-04-23T09:58:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lingvo](https://avatars.discourse-cdn.com/v4/letter/l/97f17d/32.png) [@lingvo](https://forum.plexim.com/u/lingvo)\
**Post date:** [April 23, 2025, 9:58am UTC](https://forum.plexim.com/t/data-type-of-state-machine-outputs/2058/1 "2025-04-23T09:58:41Z")

</div>

Hello

I’m using State Machine block in PLECS Model to control the switches. However there is no possibility to specify the type of state machine outputs, and it seems they are floating point type.

This is not convenient for code generation - I would like them to be boolean, therefore my question - is it possible to specify the type of outputs of state machine?

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [April 24, 2025, 2:11pm UTC](https://forum.plexim.com/t/data-type-of-state-machine-outputs/2058/2 "2025-04-24T14:11:06Z")

</div>

As you identified, the State Machine outputs are always floating point type. At this time you cannot configure the outputs to have a different data type. You can cast the output signals to bool in your schematic using the “Data Type” block, although I recognize that is not optimal for code generation.
