User Tools

Site Tools


en-us_products:mpino_studio2:box_functions:conversion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en-us_products:mpino_studio2:box_functions:conversion [2026/09/09 17:54] – 만듦 - 바깥 편집 127.0.0.1en-us_products:mpino_studio2:box_functions:conversion [2026/09/10 01:05] (current) – 바깥 편집 127.0.0.1
Line 5: Line 5:
 {{ :en-us_products:mpino_studio2:conversion-flow.svg?1000 |These commands invert bits or signs and convert BCD values. }} {{ :en-us_products:mpino_studio2:conversion-flow.svg?1000 |These commands invert bits or signs and convert BCD values. }}
  
-This ladder screen contains INV and H2D.+===== Box Function List =====
  
-{{ :en-us_products:mpino_studio2:ladder-inv-h2d-2x.png?1000 |This ladder screen contains INV and H2D. }} +^ Command ^ Meaning ^ 
- +| [[en-us_products:mpino_studio2:box_functions:conversion:inv|INV]] | Inverts every bit in the source WORD and stores the result. | 
-===== 1. INV and NEG ===== +| [[en-us_products:mpino_studio2:box_functions:conversion:neg|NEG]] | Reverses the sign of the source value and stores the result. | 
- +| [[en-us_products:mpino_studio2:box_functions:conversion:h2d|H2D]] | Interprets a source WORD containing four BCD digits as a decimal integer and stores the result. | 
-==== INV ==== +| [[en-us_products:mpino_studio2:box_functions:conversion:d2h|D2H]] | Converts a decimal integer from 0 to 9999 into four-digit BCD and stores it in a WORD. |
- +
-**Invert** +
- +
-Inverts every bit in the source WORD and stores the result. It performs the same operation as WNOT from the Conversion category. +
- +
-**Syntax:** ''INV D0 D1'' +
- +
-**Arguments** +
- +
-  * 1st = Ssource address or constant to invert +
-  * 2nd = Dresult destination address +
- +
-^ Run condition ^ Before ^ Command entered ^ Expected result ^ +
-Left condition ON D0=0x0001 | ''INV D0 D1'' | D1=0xFFFE | +
- +
-==== NEG ==== +
- +
-**Negate** +
- +
-Reverses the sign of the source value and stores the result. +
- +
-**Syntax:** ''NEG D0 D1'' +
- +
-**Arguments** +
- +
-  * 1st = Ssource address or constant to negate +
-  * 2nd = Dresult destination address +
- +
-^ Run condition ^ Before ^ Command entered ^ Expected result ^ +
-Left condition ON D0=10 | ''NEG D0 D1'' | D1=-10 | +
- +
-===== 2. H2D and D2H ===== +
- +
-==== H2D ==== +
- +
-**BCD Decode (Hex to Decimal)** +
- +
-Interprets a source WORD containing four BCD digits as a decimal integer and stores the result. +
- +
-**Syntax:** ''H2D D0 D1'' +
- +
-**Arguments** +
- +
-  * 1st = Ssource word address to interpret as BCD (D/C/T) +
-  * 2nd = Ddestination word address to store the decoded decimal value +
- +
-^ Run condition ^ Before ^ Command entered ^ Expected result ^ +
-Left condition ON D0=0x1234 | ''H2D D0 D1'' | D1=1234 | +
- +
-==== D2H ==== +
- +
-**BCD Encode (Decimal to Hex)** +
- +
-Converts a decimal integer from 0 to 9999 into four-digit BCD and stores it in a WORD+
- +
-**Syntax:** ''D2H D0 D1'' +
- +
-**Arguments** +
- +
-  * 1st = source: WORD address holding a decimal integer from 0 to 9999 +
-  * 2nd = destination: WORD address that stores the BCD result +
- +
-^ Run condition ^ Before ^ Command entered ^ Expected result ^ +
-| Left condition ON | D0=1234 | ''D2H D0 D1'' | D1=0x1234 | +
- +
-===== 3. Troubleshooting ===== +
- +
-^ Symptom ^ What to check ^ +
-| The H2D result is unexpected. | Check that every hexadecimal digit in the input WORD is from 0 to 9. | +
-| The D2H input has more than four digits. | Use the 16-bit BCD range from 0 to 9999. |+
  
 ===== Related Documentation ===== ===== Related Documentation =====
  
   * [[en-us_products:mpino_studio2:box_functions|Phase 4 · Box Functions]]   * [[en-us_products:mpino_studio2:box_functions|Phase 4 · Box Functions]]
-  * [[en-us_products:mpino_studio2:box_functions:bit_operations|Bitwise Operation Box Functions]] 
-  * [[en-us_products:mpino_studio2:box_functions:logic_control|Logic Control Box Functions]] 
   * [[en-us_products:mpino_studio2|MPINO STUDIO 2 User Manual]]   * [[en-us_products:mpino_studio2|MPINO STUDIO 2 User Manual]]
  
en-us_products/mpino_studio2/box_functions/conversion.1788944071.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki