en-us_products:mpino_studio2:box_functions:conversion
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en-us_products:mpino_studio2:box_functions:conversion [2026/09/09 18:44] – 바깥 편집 127.0.0.1 | en-us_products:mpino_studio2:box_functions:conversion [2026/09/10 01:05] (current) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| {{ : | {{ : | ||
| - | This ladder screen contains INV and H2D. | + | ===== Box Function List ===== |
| - | {{ :en-us_products: | + | ^ Command ^ Meaning ^ |
| - | + | | [[en-us_products: | |
| - | {{ : | + | | [[en-us_products:mpino_studio2:box_functions:conversion: |
| - | + | | [[en-us_products:mpino_studio2:box_functions:conversion: | |
| - | ===== 1. INV and NEG ===== | + | | [[en-us_products:mpino_studio2:box_functions:conversion: |
| - | + | ||
| - | ==== INV ==== | + | |
| - | + | ||
| - | **Invert** | + | |
| - | + | ||
| - | Inverts every bit in the source WORD and stores the result. | + | |
| - | + | ||
| - | **Syntax:** '' | + | |
| - | + | ||
| - | **Arguments** | + | |
| - | + | ||
| - | * 1st = S: source address or constant to invert | + | |
| - | * 2nd = D: result destination address | + | |
| - | + | ||
| - | ^ Run condition ^ Before ^ Command entered ^ Expected result ^ | + | |
| - | | Left condition ON | D0=0x0001 | '' | + | |
| - | + | ||
| - | ==== NEG ==== | + | |
| - | + | ||
| - | **Negate** | + | |
| - | + | ||
| - | Reverses the sign of the source value and stores the result. | + | |
| - | + | ||
| - | **Syntax:** '' | + | |
| - | + | ||
| - | **Arguments** | + | |
| - | + | ||
| - | * 1st = S: source address or constant to negate | + | |
| - | * 2nd = D: result destination address | + | |
| - | + | ||
| - | ^ Run condition ^ Before ^ Command entered ^ Expected result ^ | + | |
| - | | Left condition ON | D0=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:** '' | + | |
| - | + | ||
| - | **Arguments** | + | |
| - | + | ||
| - | * 1st = S: source word address to interpret as BCD (D/C/T) | + | |
| - | * 2nd = D: destination word address to store the decoded decimal value | + | |
| - | + | ||
| - | ^ Run condition ^ Before ^ Command entered ^ Expected result ^ | + | |
| - | | Left condition ON | D0=0x1234 | '' | + | |
| - | + | ||
| - | ==== 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:** '' | + | |
| - | + | ||
| - | **Arguments** | + | |
| - | + | ||
| - | * 1st = source: WORD address holding a decimal integer from 0 to 9999 | + | |
| - | * 2nd = destination: | + | |
| - | + | ||
| - | ^ Run condition ^ Before ^ Command entered ^ Expected result ^ | + | |
| - | | Left condition ON | D0=1234 | '' | + | |
| - | + | ||
| - | ===== 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: | * [[en-us_products: | ||
| - | * [[en-us_products: | ||
| - | * [[en-us_products: | ||
| * [[en-us_products: | * [[en-us_products: | ||
en-us_products/mpino_studio2/box_functions/conversion.1788947072.txt.gz · Last modified: by 127.0.0.1
