{"id":956,"date":"2021-03-29T09:55:09","date_gmt":"2021-03-29T09:55:09","guid":{"rendered":"https:\/\/imperix.com\/doc\/?p=956"},"modified":"2025-10-30T13:28:24","modified_gmt":"2025-10-30T13:28:24","slug":"analog-front-end-configuration-on-b-box-rcp","status":"publish","type":"post","link":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp","title":{"rendered":"Analog front-end configuration on B-Box RCP 3.0"},"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\/help\/analog-front-end-configuration-on-b-box-rcp\/#Front-end-configuration-hardware\" >Front-end configuration (hardware)<\/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\/help\/analog-front-end-configuration-on-b-box-rcp\/#Configuring-the-hardware-safety-limits\" >Configuring the hardware safety limits<\/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\/help\/analog-front-end-configuration-on-b-box-rcp\/#Storing-and-restoring-a-configuration\" >Storing and restoring a configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp\/#Reading-and-writing-configuration-files\" >Reading and writing configuration files<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp\/#Software-configuration\" >Software configuration<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp\/#Simulink-blockset\" >Simulink blockset<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp\/#PLECS-blockset\" >PLECS blockset<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp\/#CC-configuration\" >C\/C++ configuration<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n<p>The B-Box RCP 3possesses 16 analog inputs with strictly identical channels. The equivalent schematic of the complete data acquisition chain is depicted below. Each channel consists of two parts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <strong>hardware <\/strong>part, which contains a configurable input impedance, a programmable gain amplifier (PGA), a low-pass filter (LPF), and the analog-to-digital converter (ADC).<\/li>\n\n\n\n<li>A <strong>software <\/strong>part, which is notably responsible for transferring all data to the CPU memory in the shortest possible time as well as transforming the converted value into a meaningful quantity (i.e. considering the sensitivity of the whole chain, from the sensor to the converted value).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"348\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-174-1024x348.png\" alt=\"Simplified schematics of the B-Box analog input\" class=\"wp-image-957\" title=\"Product notes &gt; PN105: Analog front-end configuration on B-Box RCP &gt; image-20200312-150026.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-174-1024x348.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-174-300x102.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-174-768x261.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-174-1536x522.png 1536w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-174-2048x696.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">The B-Box RCP offers a fully-configurable front-end, which is not available on the <a href=\"https:\/\/imperix.com\/products\/control\/power-inverter-controller\/\">B-Box micro<\/a> or the <a href=\"https:\/\/imperix.com\/products\/control\/inverter-control-board\/\">B-Board PRO<\/a>. Nevertheless, on the latter, their characteristics are designed such that analog input chains are 100% compatible<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-front-end-configuration-hardware\"><span class=\"ez-toc-section\" id=\"Front-end-configuration-hardware\"><\/span>Front-end configuration (hardware)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"97\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-20200312-152642-1024x97.png\" alt=\"Front view of the B-Box RCP with analog inputs\" class=\"wp-image-965\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-20200312-152642-1024x97.png 1024w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-20200312-152642-300x28.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-20200312-152642-768x73.png 768w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-20200312-152642-1536x146.png 1536w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-20200312-152642.png 2035w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The LCD screen and rotary-push button allow editing all configuration parameters of the analog front-end. To access the related menu:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Push once, select <code>ANALOG INPUTS<\/code> and confirm (push again).<\/li>\n\n\n\n<li>Select the desired input channel and confirm.<\/li>\n<\/ol>\n\n\n\n<p>The following options are available:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th><strong>Menu<\/strong><\/th><th><strong>Available values<\/strong><\/th><th><strong>Comment<\/strong><\/th><\/tr><tr><td><strong>Input impedance<\/strong><\/td><td>Low, High<\/td><td>Low = 100\u03a9 \/ High = 3k\u03a9<\/td><\/tr><tr><td><strong>Gain<\/strong><\/td><td>1x, 2x, 4x, 8x<\/td><td>This is equivalent to setting the input scale to \u00b110V, \u00b15.0V, \u00b12.5V and \u00b11.25V.<\/td><\/tr><tr><td><strong>Filter<\/strong><\/td><td>0.5kHz, 1kHz, 1.6kHz, 2.5kHz, 4kHz, 6.4kHz, 8kHz, 10kHz, 16kHz, 20kHz, 32kHz, 40kHz<\/td><td>More information on the corresponding group delay can be found in the B-Box RCP <a href=\"https:\/\/imperix.com\/products\/control\/bbox\">datasheet<\/a>.<\/td><\/tr><tr><td><strong>Limit high<\/strong><\/td><td>-10V to +10V<\/td><td>Increments of 0.1V. Precision is approx \u00b10.2V.<\/td><\/tr><tr><td><strong>Limit low<\/strong><\/td><td>-10V to +10V<\/td><td>Increments of 0.1V. Precision is approx \u00b10.2V.<\/td><\/tr><tr><td><strong>Disable safety<\/strong><\/td><td>Yes \/ No<\/td><td>Can be used to disregard the protection thresholds. In this case, the green LED indicator switches off on the corresponding input channel.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">The low-impedance input configuration is often useful when interfacing the B-Box RCP with LEM sensors (or similar), which present a current that is proportional to the sensed quantity (instead of a voltage).<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-configuring-the-hardware-protection-limits\"><span class=\"ez-toc-section\" id=\"Configuring-the-hardware-safety-limits\"><\/span>Configuring the hardware safety limits<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The analog frontend of the B-Box RCP provides a hardware protection mechanism that blocks its operation if one of the analog inputs exceeds a configured limit value. This protection is particularly valuable during the development phase of control algorithms and, if configured properly, ensures that the ratings of the controlled power converter are never exceeded. Furthermore, this mechanism is totally independent from the user code running on the device.<\/p>\n\n\n\n<p>As seen on the schematic at the top of this page, the amplified analog input is compared to the programmed <em>Limit High<\/em> and <em>Limit Low<\/em> values. Thus, the limit values have to be expressed in volts and taking the the programmable gain value into account.<\/p>\n\n\n\n<p>On B-Box 3, the reaction time of the protections cannot be configured. It is always ~1.6\u03bcs. This reaction time may be further limited by the bandwidth of the employed sensor.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"h-numerical-example\">Numerical example<\/h5>\n\n\n\n<p>We consider a sinusoidal current measured by a <a href=\"https:\/\/cdn.imperix.com\/wp-content\/uploads\/document\/DIN-50A.pdf\">DIN50A<\/a> sensor, that should not exceed 20 A (RMS value). The sensor sensitivity is 99.0 mV\/A and a gain of x2 is configured on that analog input channel. The <em>Limit High<\/em> and <em>Limit Low<\/em> values are computed as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Maximum acceptable instantaneous current:&nbsp;\\(\\pm 20\\,\\text{A}\\times\\sqrt{2}=\\pm 28.28\\,\\text{A}\\)<\/li>\n\n\n\n<li>Corresponding sensor output:&nbsp;\\(\\pm 28.28\\,\\text{A} \\times 99\\,\\text{mV\/A} = \\pm 2.8\\,\\text{V}\\)<\/li>\n\n\n\n<li><em>Limit High<\/em> and <em>Limit Low<\/em> values: \\(\\pm 2.8\\,\\text{V}\\times 2 = \\pm 5.6\\,\\text{V}\\)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-storing-and-restoring-a-configuration\"><span class=\"ez-toc-section\" id=\"Storing-and-restoring-a-configuration\"><\/span>Storing and restoring a configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The configuration of the front panel can be saved on a USB key, using the <code>BACKUP CONFIG<\/code> menu of the front panel. The configuration is automatically (and always!) stored in a file named \u201cfrontpanel0.bbox\u201d on the USB key. In this way, the configuration can be saved for different applications.<\/p>\n\n\n\n<p>The configuration can be restored by using the <code>RESTORE CONFIG<\/code> menu. The B-Box will search for files named \u201cfrontpanel#.bbox\u201d in the imperix folder of the USB key, # being a number. The configuration file with the highest number is restored.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-reading-and-writing-configuration-files\"><span class=\"ez-toc-section\" id=\"Reading-and-writing-configuration-files\"><\/span>Reading and writing configuration files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The configuration file can be generated using Cockpit. To do so:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On a computer, edit the desired configuration using Cockpit.<\/li>\n\n\n\n<li>Click \u201csave as\u201d and reach the root of the USB key.<\/li>\n\n\n\n<li>Create a folder named \u201cimperix\u201d.<\/li>\n\n\n\n<li>Store the configuration file as frontpanel#.bbox within the \u201cimperix\u201d folder. The # number can be incremented at wish.<\/li>\n\n\n\n<li>Move the USB key from the computer to the B-Box and restore the saved configuration file using the <code>RESTORE CONFIG<\/code> option. Only the last file (largest # number) can be loaded.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"877\" height=\"785\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2024\/02\/image-31.png\" alt=\"\" class=\"wp-image-24456\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2024\/02\/image-31.png 877w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2024\/02\/image-31-300x269.png 300w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2024\/02\/image-31-768x687.png 768w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">The front-end is physically independent of the main processing circuit <em>by design<\/em>. This guarantees superior reliability of the safety settings, which cannot be altered by software. For this reason, the configuration <em>cannot <\/em>be automatically loaded from Cockpit; using a USB key is necessary.<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-software-configuration\"><span class=\"ez-toc-section\" id=\"Software-configuration\"><\/span>Software configuration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In addition to (and independently of) the hardware configuration of the analog front-end, the B-Box RCP must have its software configured such that the corresponding parameters are appropriately accounted for.<\/p>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-warning\" role=\"alert\">For the same reason as above, the front-end configuration cannot be automatically reported into the user-level software (C++, Simulink, or PLECS). All parameters must, therefore, be manually adjusted.<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-simulink-blockset\"><span class=\"ez-toc-section\" id=\"Simulink-blockset\"><\/span>Simulink blockset<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">The dedicated Simulink block is described in\u00a0<a href=\"\/doc\/software\/analog-data-acquisition\">ADC &#8211; Analog data acquisition<\/a>.<\/div>\n\n\n\n<p>The ADC blocks allow reporting the selected analog input gain (second tab, Acquisition parameters), as well as to indicate the sensors parameters (first tab). When imperix sensors are used, the associated parameters can be automatically loaded from a drop-down list.<\/p>\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=\"424\" height=\"739\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-177.png\" alt=\"ADC gain configuration dialog in Simulink\" class=\"wp-image-961\" title=\"Product notes &gt; PN105: Analog front-end configuration on B-Box RCP &gt; 2020-09-22 13_36_34-Block Parameters_ ADC.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-177.png 424w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-177-172x300.png 172w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/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=\"424\" height=\"739\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-176.png\" alt=\"ADC sensitivity configuration dialog in Simulink\" class=\"wp-image-960\" title=\"Product notes &gt; PN105: Analog front-end configuration on B-Box RCP &gt; 2020-09-22 13_35_09-Block Parameters_ ADC.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-176.png 424w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-176-172x300.png 172w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-plecs-blockset\"><span class=\"ez-toc-section\" id=\"PLECS-blockset\"><\/span>PLECS blockset<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">The dedicated PLECS block is described in\u00a0<a href=\"https:\/\/imperix.com\/doc\/software\/adc-analog-data-acquisition\">ADC &#8211; Analog data acquisition<\/a>.<\/div>\n\n\n\n<p>The same configuration parameters are accessible from the PLECS blockset, as shown below.<\/p>\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=\"435\" height=\"484\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-178.png\" alt=\"ADC gain configuration dialog in PLECS\" class=\"wp-image-962\" title=\"Product notes &gt; PN105: Analog front-end configuration on B-Box RCP &gt; ADC.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-178.png 435w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-178-270x300.png 270w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><\/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=\"435\" height=\"484\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-179.png\" alt=\"ADC sensitivity configuration dialog in PLECS\" class=\"wp-image-963\" title=\"Product notes &gt; PN105: Analog front-end configuration on B-Box RCP &gt; adc-plecs-2.png\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-179.png 435w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/image-179-270x300.png 270w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-c-c-configuration\"><span class=\"ez-toc-section\" id=\"CC-configuration\"><\/span>C\/C++ configuration<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-info\" role=\"alert\">The dedicated C\/C++ routines are described in\u00a0<a href=\"https:\/\/imperix.com\/doc\/software\/adc-analog-data-acquisition\">ADC &#8211; Analog data acquisition<\/a>.<\/div>\n\n\n\n<p>Each ADC channel must be configured during the initialization phase using <code>Adc_ConfigureInput()<\/code>:<\/p>\n\n\n<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\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Adc_ConfigureInput<\/span><span class=\"hljs-params\">(uint channel, <span class=\"hljs-keyword\">float<\/span> gain, <span class=\"hljs-keyword\">float<\/span> offset, uint bboxid=<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<ul class=\"wp-block-list\">\n<li><code>channel<\/code> is the analog input channel number.<\/li>\n\n\n\n<li><code>gain<\/code> and <code>offset<\/code> must be configured considering that the returned value during operation is computed as \\(y=a x + b\\), where \\(a\\) is the gain and \\(b\\) the offset.<\/li>\n\n\n\n<li>bboxid is the ID of the addressed B-Box (optional parameter, useful in a multi-B-Box configuration only).<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-numerical-example-1\">Numerical example:<\/h4>\n\n\n\n<p>This example considers the current sensor of a <a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/PEB8024.pdf\">PEB8024 <\/a>module. Its sensitivity is \\(S=50.0\\,[\\text{mV\/A}]\\). As recommended in the <a href=\"https:\/\/imperix.com\/wp-content\/uploads\/document\/PEB8024.pdf\">datasheet<\/a>, the chosen front-end gain is selected as \\(G=2\\). Considering that the ADC offers 16 bits over the \u00b110V input range, this results in a total sensitivity of \\(\\alpha = S\\cdot G\\cdot 32768\/10=327.68\\,[\\text{bit\/A}]\\).<\/p>\n\n\n\n<p>In this example, <code>gain<\/code> must therefore be equal to \\(a=1\/\\alpha=3.052\\,[\\text{mA\/bit}]\\). The <code>offset<\/code> value can be adjusted empirically to cancel the measured value when no current is flowing through the sensor (static offset).<\/p>\n\n\n\n<p>Subsequently, within each interrupt, the latest value can be retrieved using <code>Adc_GetValue()<\/code>:<\/p>\n\n\n<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\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">float<\/span> <span class=\"hljs-title\">Adc_GetValue<\/span><span class=\"hljs-params\">(uint channel, uint bboxid=<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<ul class=\"wp-block-list\">\n<li><code>channel<\/code> is the analog input channel number.<\/li>\n\n\n\n<li><code>bboxid<\/code> is the ID of the addressed B-Box (optional parameter, useful in multi-B-Box configuration only).<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The B-Box RCP 3possesses 16 analog inputs with strictly identical channels. The equivalent schematic of the complete data acquisition chain is depicted below. Each channel&#8230;<\/p>\n","protected":false},"author":3,"featured_media":2994,"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":[3],"tags":[],"software-environments":[],"provided-results":[],"related-products":[166],"guidedreadings":[],"tutorials":[],"user-manuals":[137],"coauthors":[69,91],"class_list":["post-956","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-help","related-products-b-box-rcp-3-0","user-manuals-b-box-rcp-3-0"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Analog front-end configuration on B-Box RCP 3.0 - imperix<\/title>\n<meta name=\"description\" content=\"The page covers the configuration of the analog front-end of a B-Box RCP, including the programmable gain and the hardware protection limits.\" \/>\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\/help\/analog-front-end-configuration-on-b-box-rcp\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Analog front-end configuration on B-Box RCP 3.0 - imperix\" \/>\n<meta property=\"og:description\" content=\"The page covers the configuration of the analog front-end of a B-Box RCP, including the programmable gain and the hardware protection limits.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp\" \/>\n<meta property=\"og:site_name\" content=\"imperix\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-29T09:55:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-30T13:28:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN105.png\" \/>\n\t<meta property=\"og:image:width\" content=\"450\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nicolas Cherix, Benedikt Borter\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nicolas Cherix, Benedikt Borter\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp\"},\"author\":{\"name\":\"Nicolas Cherix\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/44e7187157f1379207dce2b570f63f86\"},\"headline\":\"Analog front-end configuration on B-Box RCP 3.0\",\"datePublished\":\"2021-03-29T09:55:09+00:00\",\"dateModified\":\"2025-10-30T13:28:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp\"},\"wordCount\":1130,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN105.png\",\"articleSection\":[\"Product notes\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp\",\"name\":\"Analog front-end configuration on B-Box RCP 3.0 - imperix\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN105.png\",\"datePublished\":\"2021-03-29T09:55:09+00:00\",\"dateModified\":\"2025-10-30T13:28:24+00:00\",\"description\":\"The page covers the configuration of the analog front-end of a B-Box RCP, including the programmable gain and the hardware protection limits.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#primaryimage\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN105.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/3_2_ratio_PN105.png\",\"width\":450,\"height\":300,\"caption\":\"Simplified schematics of the B-Box analog input\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/help\\\/analog-front-end-configuration-on-b-box-rcp#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge base\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product notes\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/category\\\/help\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Analog front-end configuration on B-Box RCP 3.0\"}]},{\"@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\\\/44e7187157f1379207dce2b570f63f86\",\"name\":\"Nicolas Cherix\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07fe58bb65e7c65d6f4c53854ee4045d0c6cb2eb7b2cd3f58f03c926fab246c7?s=96&d=mm&r=gaafd9afe469fe587a71b66de1b538283\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07fe58bb65e7c65d6f4c53854ee4045d0c6cb2eb7b2cd3f58f03c926fab246c7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07fe58bb65e7c65d6f4c53854ee4045d0c6cb2eb7b2cd3f58f03c926fab246c7?s=96&d=mm&r=g\",\"caption\":\"Nicolas Cherix\"},\"description\":\"Nicolas is the chief engineer and product director at imperix. On the knowledge base, he is the author, co-author, or reviewer of numerous notes.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/nicolas-cherix-268a2b83\\\/\"],\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/author\\\/cherix\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Analog front-end configuration on B-Box RCP 3.0 - imperix","description":"The page covers the configuration of the analog front-end of a B-Box RCP, including the programmable gain and the hardware protection limits.","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\/help\/analog-front-end-configuration-on-b-box-rcp","og_locale":"en_US","og_type":"article","og_title":"Analog front-end configuration on B-Box RCP 3.0 - imperix","og_description":"The page covers the configuration of the analog front-end of a B-Box RCP, including the programmable gain and the hardware protection limits.","og_url":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp","og_site_name":"imperix","article_published_time":"2021-03-29T09:55:09+00:00","article_modified_time":"2025-10-30T13:28:24+00:00","og_image":[{"width":450,"height":300,"url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN105.png","type":"image\/png"}],"author":"Nicolas Cherix, Benedikt Borter","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nicolas Cherix, Benedikt Borter","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#article","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp"},"author":{"name":"Nicolas Cherix","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/44e7187157f1379207dce2b570f63f86"},"headline":"Analog front-end configuration on B-Box RCP 3.0","datePublished":"2021-03-29T09:55:09+00:00","dateModified":"2025-10-30T13:28:24+00:00","mainEntityOfPage":{"@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp"},"wordCount":1130,"commentCount":0,"publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"image":{"@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN105.png","articleSection":["Product notes"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#respond"]}]},{"@type":"WebPage","@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp","url":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp","name":"Analog front-end configuration on B-Box RCP 3.0 - imperix","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#primaryimage"},"image":{"@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN105.png","datePublished":"2021-03-29T09:55:09+00:00","dateModified":"2025-10-30T13:28:24+00:00","description":"The page covers the configuration of the analog front-end of a B-Box RCP, including the programmable gain and the hardware protection limits.","breadcrumb":{"@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#primaryimage","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN105.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/3_2_ratio_PN105.png","width":450,"height":300,"caption":"Simplified schematics of the B-Box analog input"},{"@type":"BreadcrumbList","@id":"https:\/\/imperix.com\/doc\/help\/analog-front-end-configuration-on-b-box-rcp#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Knowledge base","item":"https:\/\/imperix.com\/doc\/"},{"@type":"ListItem","position":2,"name":"Product notes","item":"https:\/\/imperix.com\/doc\/category\/help"},{"@type":"ListItem","position":3,"name":"Analog front-end configuration on B-Box RCP 3.0"}]},{"@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\/44e7187157f1379207dce2b570f63f86","name":"Nicolas Cherix","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/07fe58bb65e7c65d6f4c53854ee4045d0c6cb2eb7b2cd3f58f03c926fab246c7?s=96&d=mm&r=gaafd9afe469fe587a71b66de1b538283","url":"https:\/\/secure.gravatar.com\/avatar\/07fe58bb65e7c65d6f4c53854ee4045d0c6cb2eb7b2cd3f58f03c926fab246c7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/07fe58bb65e7c65d6f4c53854ee4045d0c6cb2eb7b2cd3f58f03c926fab246c7?s=96&d=mm&r=g","caption":"Nicolas Cherix"},"description":"Nicolas is the chief engineer and product director at imperix. On the knowledge base, he is the author, co-author, or reviewer of numerous notes.","sameAs":["https:\/\/www.linkedin.com\/in\/nicolas-cherix-268a2b83\/"],"url":"https:\/\/imperix.com\/doc\/author\/cherix"}]}},"_links":{"self":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/956","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/comments?post=956"}],"version-history":[{"count":22,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/956\/revisions"}],"predecessor-version":[{"id":36358,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/956\/revisions\/36358"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media\/2994"}],"wp:attachment":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media?parent=956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/categories?post=956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tags?post=956"},{"taxonomy":"software-environments","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/software-environments?post=956"},{"taxonomy":"provided-results","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/provided-results?post=956"},{"taxonomy":"related-products","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/related-products?post=956"},{"taxonomy":"guidedreadings","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/guidedreadings?post=956"},{"taxonomy":"tutorials","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tutorials?post=956"},{"taxonomy":"user-manuals","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/user-manuals?post=956"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/coauthors?post=956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}