mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			48 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!--
 | |
|   Copyright JS Foundation and other contributors, http://js.foundation
 | |
| 
 | |
|   Licensed under the Apache License, Version 2.0 (the "License");
 | |
|   you may not use this file except in compliance with the License.
 | |
|   You may obtain a copy of the License at
 | |
| 
 | |
|   http://www.apache.org/licenses/LICENSE-2.0
 | |
| 
 | |
|   Unless required by applicable law or agreed to in writing, software
 | |
|   distributed under the License is distributed on an "AS IS" BASIS,
 | |
|   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | |
|   See the License for the specific language governing permissions and
 | |
|   limitations under the License.
 | |
| -->
 | |
| 
 | |
| <script type="text/x-red" data-help-name="range">
 | |
|     <p>数値を異なる範囲の値に変換します。</p>
 | |
|     <h3>入力</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload<span class="property-type">数値</span></dt>
 | |
|         <dd>数値を指定します。数値以外を指定した場合は、数値に変換します。変換不能な場合はエラーとなります。</dd>
 | |
|     </dl>
 | |
|     <h3>出力</h3>
 | |
|     <dl class="message-properties">
 | |
|         <dt>payload <span class="property-type">数値</span></dt>
 | |
|         <dd>新しい範囲に変換した結果の値。</dd>
 | |
|     </dl>
 | |
|     <h3>詳細</h3>
 | |
|     <p>このノードは受け取った数値を線形スケーリングします。デフォルトでは、結果の値はノードに設定した範囲内に限定しません。</p>
 | |
|     <p>「<i>入力値の範囲外の値を最小値/最大値として拡大/縮小</i>」を指定すると、値が指定した範囲外の値にならないようにします。</p>
 | |
|     <p>「<i>入力値の範囲外の値を範囲幅で割った余りとし拡大/縮小</i>」を指定すると、結果を範囲幅で折り返します。</p>
 | |
|     <p>例: 入力値0 - 10を0 - 100に変換</p>
 | |
|     <table style="outline-width:#888 solid thin">
 | |
|         <tr><th width="80px">モード</th><th width="80px">入力</th><th width="80px">出力</th></tr>
 | |
|         <tr><td><center>scale</center></td><td><center>12</center></td><td><center>120</center></td></tr>
 | |
|         <tr><td><center>limit</center></td><td><center>12</center></td><td><center>100</center></td></tr>
 | |
|         <tr><td><center>wrap</center></td><td><center>12</center></td><td><center>20</center></td></tr>
 | |
|     </table>
 | |
|     <br/>
 | |
|     モード:<br/>
 | |
|     <ul>
 | |
|         <li>scale: msg.payloadの値を拡大/縮小</li>
 | |
|         <li>limit: 入力値の範囲外の値を最小値/最大値とし拡大/縮小</li>
 | |
|         <li>wrap: 入力値の範囲外の値を範囲幅で割った余りとし拡大/縮小</li>
 | |
|     </ul>
 | |
| </script>
 |