{"id":1595,"date":"2021-04-02T12:47:55","date_gmt":"2021-04-02T12:47:55","guid":{"rendered":"https:\/\/imperix.com\/doc\/?p=1595"},"modified":"2026-01-29T12:15:31","modified_gmt":"2026-01-29T12:15:31","slug":"angle-decoder","status":"publish","type":"post","link":"https:\/\/imperix.com\/doc\/software\/angle-decoder","title":{"rendered":"DEC &#8211; Angle decoder input"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-right-text counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\/#Simulink-block\" >Simulink block<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\/#Signal-specification\" >Signal specification<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\/#Parameters\" >Parameters<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\/#PLECS-block\" >PLECS block<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\/#Signal-specification-2\" >Signal specification<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\/#Parameters-2\" >Parameters<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\/#C-functions\" >C++ functions<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>The angle decoder (DEC) block decodes quadrature-encoded signals produced by incremental encoders for motor drive applications.<\/p>\n\n\n\n<p>The imperix controllers provide decoder inputs for quadrature-encoder speed\/position sensor signals (usually called A and B), with or without a reset line (usually called Z). These inputs are either configurable as four independent inputs or two differential inputs. Each decoder module counts all 4 edges of the A and B inputs, leading to an angular resolution 4 times superior to the PPR value usually specified for a given encoder. The position counter can be reset either at a specified value or using the Z signal provided by the sensor. Finally, the position is latched similarly and simultaneously to the sample-&amp;-hold feature of the ADC inputs.<\/p>\n\n\n\n<p>Performance specifications are available in the following datasheets:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Box_4_Datasheet.pdf\">B-Box 4 datasheet<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Box_Datasheet.pdf\">B-Box RCP<sup>3.0<\/sup>&nbsp;datasheet<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Box_micro_Datasheet.pdf\">B-Box Micro datasheet<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Board_Datasheet.pdf\">B-Board PRO datasheet<\/a><\/li>\n<\/ul>\n\n\n\n<p>Alternatively, the <a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/Motor_interface_Datasheet.pdf\">Motor Interface for B-Box RCP<\/a> also supports incremental encoders. In this case, please refer to the <a href=\"https:\/\/imperix.com\/doc\/software\/incremental-encoder-interface\">incremental encoder module (INC)<\/a>.<\/p>\n\n\n\n<p>Information on how to use this block is available in <a href=\"https:\/\/imperix.com\/doc\/help\/using-the-angle-decoder-modules\">Using the angle decoder modules (PN104)<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-simulink-block\"><span class=\"ez-toc-section\" id=\"Simulink-block\"><\/span>Simulink block<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-signal-specification\"><span class=\"ez-toc-section\" id=\"Signal-specification\"><\/span>Signal specification<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<ul id=\"block-a3502a93-0a47-42b4-93e4-e8af05c3ca71\" class=\"wp-block-list\">\n<li>The output signal is the decoded angle in radians.<\/li>\n\n\n\n<li>The <code>sim<\/code> input signal is used in simulation and represents the actual angle value in radian, computed by the simulation plant model.<\/li>\n\n\n\n<li>The <code>&gt;<\/code> input signal needs to be connected to the CONFIG block to account for the exact sampling instant in simulation.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"104\" height=\"62\" src=\"https:\/\/cdn.imperix.com\/doc\/wp-content\/uploads\/2021\/04\/blockset-Simulink-1-7.png\" alt=\"Angle decoder Simulink block\" class=\"wp-image-2365\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-parameters\"><span class=\"ez-toc-section\" id=\"Parameters\"><\/span>Parameters<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Device ID<\/code>&nbsp;selects which B-Box\/B-Board to address when used in a multi-device configuration<\/li>\n\n\n\n<li><code>Input mode<\/code>&nbsp;selects if the decoder considers one GPI input per encoder signal (<em>Single-ended<\/em>) or two GPI with complementary signals (<em>Differential<\/em>).<\/li>\n\n\n\n<li><code>DEC module<\/code>&nbsp;selects which GPI inputs are used. See the <a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Box_Datasheet.pdf\">B-Box datasheet<\/a> or <a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Board_Datasheet.pdf\">B-Board datasheet<\/a> to check where to connect the encoder signals.<\/li>\n\n\n\n<li><code>Pulses per rotation<\/code>&nbsp;defines the number of pulses of the A or B signal during one complete rotation of the encoder, as given by the manufacturer.<\/li>\n\n\n\n<li><code>Reset mode<\/code> selects the counter reset mode. If <em>Z input<\/em>&nbsp;is selected, the pulse counter value is reset on the rising edge of the Z signal. If <em>maximum value<\/em>&nbsp;is selected, it is reset as soon as it has reached the number of pulses per rotation.<\/li>\n\n\n\n<li><code>Direction<\/code> defines, when A is leading B, if the angle increase (<em>Clockwise<\/em>) or decreases (<em>Counterclockwise<\/em>).<\/li>\n\n\n\n<li><code>Invert input signals<\/code> configures the decoder to consider the inverted logical value of the considered GPI inputs.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"424\" height=\"487\" src=\"https:\/\/cdn.imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110337.png\" alt=\"Angle decoder Simulink dialog parameters\" class=\"wp-image-2367\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110337.png 424w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110337-261x300.png 261w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-plecs-block\"><span class=\"ez-toc-section\" id=\"PLECS-block\"><\/span>PLECS block<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-signal-specification-1\"><span class=\"ez-toc-section\" id=\"Signal-specification-2\"><\/span>Signal specification<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<ul class=\"wp-block-list\">\n<li>The output signal is the decoded angle in radians.<\/li>\n\n\n\n<li>The target inport (only visible at the atomic subsystem level) is used in simulation and represents the actual angle value in radian, computed by the simulation plant model.<\/li>\n\n\n\n<li>The <code>&gt;<\/code> input signal needs to be connected to the ADC output of the CONFIG block to account for the exact sampling instant in simulation.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"92\" height=\"68\" src=\"https:\/\/cdn.imperix.com\/doc\/wp-content\/uploads\/2021\/04\/blockset-1-7.png\" alt=\"Angle decoder PLECS block\" class=\"wp-image-2371\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-parameters-1\"><span class=\"ez-toc-section\" id=\"Parameters-2\"><\/span>Parameters<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Device ID<\/code>&nbsp;selects which B-Box\/B-Board to address when used in a multi-device configuration<\/li>\n\n\n\n<li><code>Input mode<\/code>&nbsp;selects if the decoder considers one GPI input per encoder signal (<em>Single-ended<\/em>) or two GPI with complementary signals (<em>Differential<\/em>).<\/li>\n\n\n\n<li><code>DEC module<\/code>&nbsp;selects which GPI inputs are used. See the <a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Box_Datasheet.pdf\">B-Box datasheet<\/a> or <a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/B-Board_Datasheet.pdf\">B-Board datasheet<\/a> to check where to connect the encoder signals.<\/li>\n\n\n\n<li><code>Pulses per rotation<\/code>&nbsp;defines the number of pulses of the A or B signal during one complete rotation of the encoder, as given by the manufacturer.<\/li>\n\n\n\n<li><code>Reset mode<\/code> selects the counter reset mode. If <em>Z input<\/em>&nbsp;is selected, the pulse counter value is reset on the rising edge of the Z signal. If <em>maximum value<\/em>&nbsp;is selected, it is reset as soon as it has reached the number of pulses per rotation.<\/li>\n\n\n\n<li><code>Direction<\/code> defines, when A is leading B, if the angle increase (<em>Clockwise<\/em>) or decreases (<em>Counterclockwise<\/em>).<\/li>\n\n\n\n<li><code>Invert input signals<\/code> configures the decoder to consider the inverted logical value of the considered GPI inputs.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"360\" height=\"357\" src=\"https:\/\/cdn.imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110214.png\" alt=\"Angle decoder PLECS dialog parameters 1\" class=\"wp-image-2369\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110214.png 360w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110214-300x298.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110214-150x150.png 150w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"360\" height=\"357\" src=\"https:\/\/cdn.imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110204.png\" alt=\"Angle decoder PLECS dialog parameters 2\" class=\"wp-image-2370\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110204.png 360w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110204-300x298.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-20200910-110204-150x150.png 150w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-c-functions\"><span class=\"ez-toc-section\" id=\"C-functions\"><\/span>C++ functions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<style>.kt-accordion-id1595_1f6893-a0 .kt-accordion-inner-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:1px;}.kt-accordion-id1595_1f6893-a0 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;background:#ffffff;padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px;}.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;background:#ffffff;font-size:16px;line-height:24px;letter-spacing:0px;font-weight:bold;text-transform:none;color:var(--global-palette3, #1A202C);padding-top:12px;padding-right:10px;padding-bottom:8px;padding-left:16px;}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette3, #1A202C);}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger{background:var(--global-palette3, #1A202C);}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger:before{background:#ffffff;}.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0 .kt-blocks-accordion-header:focus-visible{color:#444444;background:#ffffff;border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:before, body:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-blocks-accordion--visible .kt-blocks-accordion-icon-trigger:after, body:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:before{background:#444444;}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger, body:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger{background:#444444;}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:before, body:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:after, body:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:before{background:#ffffff;}.kt-accordion-id1595_1f6893-a0 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{color:var(--global-palette3, #1A202C);background:var(--global-palette9, #ffffff);border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette3, #1A202C);}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger{background:var(--global-palette3, #1A202C);}.kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1595_1f6893-a0:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette9, #ffffff);}@media all and (max-width: 1024px){.kt-accordion-id1595_1f6893-a0 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;}}@media all and (max-width: 1024px){.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;}}@media all and (max-width: 1024px){.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0 .kt-blocks-accordion-header:focus-visible{border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}}@media all and (max-width: 1024px){.kt-accordion-id1595_1f6893-a0 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}}@media all and (max-width: 767px){.kt-accordion-id1595_1f6893-a0 .kt-accordion-inner-wrap{display:block;}.kt-accordion-id1595_1f6893-a0 .kt-accordion-inner-wrap .kt-accordion-pane:not(:first-child){margin-top:1px;}.kt-accordion-id1595_1f6893-a0 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;}.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;}.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id1595_1f6893-a0 .kt-blocks-accordion-header:focus-visible{border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}.kt-accordion-id1595_1f6893-a0 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id1595_1f6893-a0 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}}<\/style>\n<div class=\"wp-block-kadence-accordion alignnone\"><div class=\"kt-accordion-wrap kt-accordion-id1595_1f6893-a0 kt-accordion-has-9-panes kt-active-pane-0 kt-accordion-block kt-pane-header-alignment-left kt-accodion-icon-style-arrow kt-accodion-icon-side-left\" style=\"max-width:none\"><div class=\"kt-accordion-inner-wrap\" data-allow-multiple-open=\"false\" data-start-open=\"none\">\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-2 kt-pane1595_14d3bd-af\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code><code>Dec_ConfigureInputMode<\/code> <\/code><strong>\u2014 <strong>Select between single-ended or differential inputs<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Dec_ConfigureInputMode<\/span><span class=\"hljs-params\">(tDecChannel channel, tDecInputMode inputMode, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> device=<span class=\"hljs-number\">0<\/span>)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Configures the input mode for the selected decoder module to be used with single-ended or differential signals.<\/p>\n\n\n\n<p>It has to be called in <code>UserInit()<\/code>.<\/p>\n\n\n\n<p><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>channel<\/code>: the decoder module to configure (<em>DECODER_CHANNEL_0<\/em>, <em>DECODER_CHANNEL_1<\/em>, <em>DECODER_CHANNEL_2<\/em>or <em>DECODER_CHANNEL_3<\/em>).<\/li>\n\n\n\n<li><code>inputMode<\/code>: selects if the decoder considers one GPI input per encoder signal (<em>SINGLEENDED<\/em>) or two GPI with complementary signals (<em>DIFFERENTIAL<\/em>).<\/li>\n\n\n\n<li><code>device<\/code>: the id of the addressed device (optional, used in multi-device configuration only).<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-3 kt-pane1595_b65a8e-6a\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code><code>Dec_ConfigurePulsePerRotation<\/code> <\/code><strong>\u2014 <strong>Set the number of pulses per rotation<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Dec_ConfigurePulsePerRotation<\/span><span class=\"hljs-params\">(tDecChannel channel, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> pulsePerRotation, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> device=<span class=\"hljs-number\">0<\/span>)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Defines the number of pulses of the A or B signal during one complete rotation of the encoder, as given by the manufacturer.<\/p>\n\n\n\n<p>It has to be called in <code>UserInit()<\/code>.<\/p>\n\n\n\n<p><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>channel<\/code>: the decoder module to configure (<em>DECODER_CHANNEL_0<\/em>, <em>DECODER_CHANNEL_1<\/em>, <em>DECODER_CHANNEL_2<\/em>or <em>DECODER_CHANNEL_3<\/em>).<\/li>\n\n\n\n<li><code>pulsePerRotation<\/code>: the number of pulses of the A or B signal during one complete rotation of the encoder.<\/li>\n\n\n\n<li><code>device<\/code>: the id of the addressed device (optional, used in multi-device configuration only).<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-4 kt-pane1595_eff071-50\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code><code>Dec_ConfigureResetMode<\/code> <\/code><strong>\u2014 <strong>Set the counter reset mode<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Dec_ConfigureResetMode<\/span><span class=\"hljs-params\">(tDecChannel channel, tDecResetMode resetMode, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> device=<span class=\"hljs-number\">0<\/span>)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Defines if the pulse counter is reset on the rising edges of the Z signal, or when it reaches the PPR value.<\/p>\n\n\n\n<p>It has to be called in <code>UserInit()<\/code>.<\/p>\n\n\n\n<p><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>channel<\/code>: the decoder module to configure (<em>DECODER_CHANNEL_0<\/em>, <em>DECODER_CHANNEL_1<\/em>, <em>DECODER_CHANNEL_2<\/em>or <em>DECODER_CHANNEL_3<\/em>).<\/li>\n\n\n\n<li><code>resetMode<\/code>: the reset method of the pulse counter (<em>ZINPUT<\/em>or <em>MAXVALUE<\/em>).<\/li>\n\n\n\n<li><code>device<\/code>: the id of the addressed device (optional, used in multi-device configuration only).<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-5 kt-pane1595_55108a-f8\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code><code>Dec_ConfigureResetPerRotation<\/code> <\/code><strong>\u2014 <strong><strong>Set the number of Z pulses per rotation<\/strong><\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Dec_ConfigureResetPerRotation<\/span><span class=\"hljs-params\">(tDecChannel channel, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> resetPerRotation, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> device=<span class=\"hljs-number\">0<\/span>)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Configures the number of Z pulses per complete rotation of the encoder, as given by the manufacturer. It can only be used if the <em>ZINPUT <\/em>reset mode is selected.<\/p>\n\n\n\n<p>It has to be called in <code>UserInit()<\/code>.<\/p>\n\n\n\n<p><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>channel<\/code>: the decoder module to configure (<em>DECODER_CHANNEL_0<\/em>, <em>DECODER_CHANNEL_1<\/em>, <em>DECODER_CHANNEL_2<\/em>or <em>DECODER_CHANNEL_3<\/em>).<\/li>\n\n\n\n<li><code>resetPerRotation<\/code>: the number of Z pulses per rotation.<\/li>\n\n\n\n<li><code>device<\/code>: the id of the addressed device (optional, used in multi-device configuration only).<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-6 kt-pane1595_5b7362-95\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code><code>Dec_ConfigureDirection<\/code> <\/code><strong>\u2014 <strong><strong>Set the rotation direction<\/strong><\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Dec_ConfigureDirection<\/span><span class=\"hljs-params\">(tDecChannel channel, tDecDirection direction, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> device=<span class=\"hljs-number\">0<\/span>)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Configures what rotation direction leads to an increasing angle (positive direction). If clockwise is selected, the angle is increased when A leads B.<\/p>\n\n\n\n<p>It has to be called in <code>UserInit()<\/code>.<\/p>\n\n\n\n<p><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>channel<\/code>: the decoder module to configure (<em>DECODER_CHANNEL_0<\/em>, <em>DECODER_CHANNEL_1<\/em>, <em>DECODER_CHANNEL_2<\/em>or <em>DECODER_CHANNEL_3<\/em>).<\/li>\n\n\n\n<li><code>direction<\/code>: the positive direction, clockwise (<em>CW)<\/em> or counter-clockwise (<em>CCW<\/em>).<\/li>\n\n\n\n<li><code>device<\/code>: the id of the addressed device (optional, used in multi-device configuration only).<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-7 kt-pane1595_8a971d-e2\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code><code>Dec_ConfigureInputPolarity<\/code> <\/code><strong>\u2014 <strong>Set the polarity of the input signals<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Dec_ConfigureInputPolarity<\/span><span class=\"hljs-params\">(tDecChannel channel, tDecPolarity polarity, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> device=<span class=\"hljs-number\">0<\/span>)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Defines the polarity of the encoder signals. If inverted is selected, the decoder considers the inverted of the GPI signal.<\/p>\n\n\n\n<p>It has to be called in <code>UserInit()<\/code>.<\/p>\n\n\n\n<p><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>channel<\/code>: the decoder module to configure (<em>DECODER_CHANNEL_0<\/em>, <em>DECODER_CHANNEL_1<\/em>, <em>DECODER_CHANNEL_2<\/em>or <em>DECODER_CHANNEL_3<\/em>).<\/li>\n\n\n\n<li><code>polarity<\/code>: the encoder signals polarity, normal (<em>NORM) <\/em>or inverted (<em>INV<\/em>).<\/li>\n\n\n\n<li><code>device<\/code>: the id of the addressed device (optional, used in multi-device configuration only).<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-9 kt-pane1595_dd11a9-ca\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code><code>Dec_GetAngle<\/code> <\/code><strong>\u2014 <strong>Get the decoded position angle<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">float<\/span> <span class=\"hljs-title\">Dec_GetAngle<\/span><span class=\"hljs-params\">(tDecChannel channel, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> device=<span class=\"hljs-number\">0<\/span>)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Returns the value of the position angle decoded by the selected decoder module (in radians and in the range \\(-2\\pi\\) to \\(2\\pi\\)).<\/p>\n\n\n\n<p>It has to be called during the control interrupt.<\/p>\n\n\n\n<p><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>channel<\/code>: the decoder module to configure (<em>DECODER_CHANNEL_0<\/em>, <em>DECODER_CHANNEL_1<\/em>, <em>DECODER_CHANNEL_2<\/em>or <em>DECODER_CHANNEL_3<\/em>).<\/li>\n\n\n\n<li><code>device<\/code>: the id of the addressed device (optional, used in multi-device configuration only).<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n<\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The angle decoder (DEC) block decodes quadrature-encoded signals produced by incremental encoders for motor drive applications. The imperix controllers provide decoder inputs for quadrature-encoder speed\/position&#8230;<\/p>\n","protected":false},"author":4,"featured_media":33315,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[16],"tags":[],"software-environments":[105,103,104],"provided-results":[],"related-products":[50,31,32,92,166,51,114],"guidedreadings":[],"tutorials":[],"user-manuals":[],"coauthors":[70],"class_list":["post-1595","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","software-environments-c-plus-plus","software-environments-matlab","software-environments-plecs","related-products-acg-sdk","related-products-b-board-pro","related-products-b-box-rcp","related-products-b-box-micro","related-products-b-box-rcp-3-0","related-products-cpp-sdk","related-products-motor"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DEC - Angle decoder input - imperix Simulink, PLECS and C++ documentation<\/title>\n<meta name=\"description\" content=\"This blocks implements an angle decoder that decodes quadrature-encoded signals produced by incremental encoders for motor drive applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DEC - Angle decoder input - imperix Simulink, PLECS and C++ documentation\" \/>\n<meta property=\"og:description\" content=\"This blocks implements an angle decoder that decodes quadrature-encoded signals produced by incremental encoders for motor drive applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/imperix.com\/doc\/software\/angle-decoder\" \/>\n<meta property=\"og:site_name\" content=\"imperix\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-02T12:47:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-29T12:15:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"334\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Beno\u00eet Steinmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Beno\u00eet Steinmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder\"},\"author\":{\"name\":\"Beno\u00eet Steinmann\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/a69a3bda75b05d0923cc76d7268cc94f\"},\"headline\":\"DEC &#8211; Angle decoder input\",\"datePublished\":\"2021-04-02T12:47:55+00:00\",\"dateModified\":\"2026-01-29T12:15:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder\"},\"wordCount\":1118,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"articleSection\":[\"Software reference\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder\",\"name\":\"DEC - Angle decoder input - imperix Simulink, PLECS and C++ documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"datePublished\":\"2021-04-02T12:47:55+00:00\",\"dateModified\":\"2026-01-29T12:15:31+00:00\",\"description\":\"This blocks implements an angle decoder that decodes quadrature-encoded signals produced by incremental encoders for motor drive applications.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#primaryimage\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"width\":500,\"height\":334},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/angle-decoder#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge base\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software reference\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/category\\\/software\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"DEC &#8211; Angle decoder input\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"name\":\"imperix\",\"description\":\"power electronics\",\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/imperix.com\\\/doc\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\",\"name\":\"imperix\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"width\":350,\"height\":120,\"caption\":\"imperix\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/a69a3bda75b05d0923cc76d7268cc94f\",\"name\":\"Beno\u00eet Steinmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g3b3f3d8e66019ebcb2848094940b98c0\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g\",\"caption\":\"Beno\u00eet Steinmann\"},\"description\":\"Benoit is an embedded systems expert and the leader of software and firmware developments at imperix. On the knowledge base, he is the author of numerous software reference documents.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/benoit-steinmann\\\/\"],\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/author\\\/steinmann\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DEC - Angle decoder input - imperix Simulink, PLECS and C++ documentation","description":"This blocks implements an angle decoder that decodes quadrature-encoded signals produced by incremental encoders for motor drive applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/imperix.com\/doc\/software\/angle-decoder","og_locale":"en_US","og_type":"article","og_title":"DEC - Angle decoder input - imperix Simulink, PLECS and C++ documentation","og_description":"This blocks implements an angle decoder that decodes quadrature-encoded signals produced by incremental encoders for motor drive applications.","og_url":"https:\/\/imperix.com\/doc\/software\/angle-decoder","og_site_name":"imperix","article_published_time":"2021-04-02T12:47:55+00:00","article_modified_time":"2026-01-29T12:15:31+00:00","og_image":[{"width":500,"height":334,"url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","type":"image\/png"}],"author":"Beno\u00eet Steinmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Beno\u00eet Steinmann","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder#article","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder"},"author":{"name":"Beno\u00eet Steinmann","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/a69a3bda75b05d0923cc76d7268cc94f"},"headline":"DEC &#8211; Angle decoder input","datePublished":"2021-04-02T12:47:55+00:00","dateModified":"2026-01-29T12:15:31+00:00","mainEntityOfPage":{"@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder"},"wordCount":1118,"commentCount":0,"publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"image":{"@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","articleSection":["Software reference"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/imperix.com\/doc\/software\/angle-decoder#respond"]}]},{"@type":"WebPage","@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder","url":"https:\/\/imperix.com\/doc\/software\/angle-decoder","name":"DEC - Angle decoder input - imperix Simulink, PLECS and C++ documentation","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder#primaryimage"},"image":{"@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","datePublished":"2021-04-02T12:47:55+00:00","dateModified":"2026-01-29T12:15:31+00:00","description":"This blocks implements an angle decoder that decodes quadrature-encoded signals produced by incremental encoders for motor drive applications.","breadcrumb":{"@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/imperix.com\/doc\/software\/angle-decoder"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder#primaryimage","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","width":500,"height":334},{"@type":"BreadcrumbList","@id":"https:\/\/imperix.com\/doc\/software\/angle-decoder#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Knowledge base","item":"https:\/\/imperix.com\/doc\/"},{"@type":"ListItem","position":2,"name":"Software reference","item":"https:\/\/imperix.com\/doc\/category\/software"},{"@type":"ListItem","position":3,"name":"DEC &#8211; Angle decoder input"}]},{"@type":"WebSite","@id":"https:\/\/imperix.com\/doc\/#website","url":"https:\/\/imperix.com\/doc\/","name":"imperix","description":"power electronics","publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/imperix.com\/doc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/imperix.com\/doc\/#organization","name":"imperix","url":"https:\/\/imperix.com\/doc\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","width":350,"height":120,"caption":"imperix"},"image":{"@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/a69a3bda75b05d0923cc76d7268cc94f","name":"Beno\u00eet Steinmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g3b3f3d8e66019ebcb2848094940b98c0","url":"https:\/\/secure.gravatar.com\/avatar\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g","caption":"Beno\u00eet Steinmann"},"description":"Benoit is an embedded systems expert and the leader of software and firmware developments at imperix. On the knowledge base, he is the author of numerous software reference documents.","sameAs":["https:\/\/www.linkedin.com\/in\/benoit-steinmann\/"],"url":"https:\/\/imperix.com\/doc\/author\/steinmann"}]}},"_links":{"self":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/1595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/comments?post=1595"}],"version-history":[{"count":19,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/1595\/revisions"}],"predecessor-version":[{"id":41428,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/1595\/revisions\/41428"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media\/33315"}],"wp:attachment":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media?parent=1595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/categories?post=1595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tags?post=1595"},{"taxonomy":"software-environments","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/software-environments?post=1595"},{"taxonomy":"provided-results","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/provided-results?post=1595"},{"taxonomy":"related-products","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/related-products?post=1595"},{"taxonomy":"guidedreadings","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/guidedreadings?post=1595"},{"taxonomy":"tutorials","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tutorials?post=1595"},{"taxonomy":"user-manuals","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/user-manuals?post=1595"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/coauthors?post=1595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}