MSI1010 (Double Mod 10)
MSI1010 uses two Mod 10 check digits for enhanced error detection. This variant adds an additional layer of security by applying the Mod 10 algorithm twice, making it more reliable than single-check variants.
Basic Usage
ts
import { barcode } from '@stacksjs/qrx'
barcode('#barcode', '1234', { format: 'MSI1010' }) // Result: 123448
[!NOTE] Image needed: Basic MSI1010 barcode example
Double Mod 10 Checksum Calculation
The checksum is calculated in two stages:
First Mod 10 check digit calculation
- Multiply alternate digits by 2, right to left
- Sum all digits
- Calculate first check digit
Second Mod 10 check digit calculation
- Add first check digit to original number
- Repeat Mod 10 calculation
- Calculate second check digit
Example:
Data: 1234
First Check Digit:
Step 1: 1 2 3 4 → (1)(2×2)(3)(4×2)
Step 2: 1 4 3 8
Step 3: 1 + 4 + 3 + 8 = 16
Step 4: First check digit = 4
Intermediate: 12344
Second Check Digit:
Step 1: 1 2 3 4 4 → (1)(2×2)(3)(4×2)(4)
Step 2: 1 4 3 8 4
Step 3: 1 + 4 + 3 + 8 + 4 = 20
Step 4: Second check digit = 8
Final Result: 123448
Advanced Options
ts
import { barcode } from '@stacksjs/qrx'
barcode('#barcode', '1234', {
format: 'MSI1010',
width: 2,
height: 100,
displayValue: true,
fontSize: 20,
font: 'monospace',
textAlign: 'center',
textPosition: 'bottom',
textMargin: 2,
background: '#ffffff',
lineColor: '#000000'
})
Error Detection
ts
import { barcode } from '@stacksjs/qrx'
barcode('#barcode', '1234', {
format: 'MSI1010',
valid: (valid) => {
if (!valid) {
console.error('Invalid MSI1010 input')
// Handle invalid input
}
}
})
Common Applications
Critical Inventory
- High-value items
- Regulated materials
- Sensitive products
Quality Control
- Production tracking
- Batch verification
- Process validation
[!NOTE] Image needed: Real-world application examples
Best Practices
Input Validation
- Verify numeric-only input
- Check maximum length
- Validate both check digits
Implementation
- Test scanner compatibility
- Verify double checksum calculation
- Maintain adequate quiet zones
When to Use MSI1010
- High-security applications
- Critical data accuracy needed
- Double validation required
Comparison with Other MSI Variants
Feature | MSI1010 | MSI10 | MSI11 | MSI1110 |
---|---|---|---|---|
Check Digits | 2 | 1 | 1 | 2 |
Algorithm | Mod 10×2 | Mod 10 | Mod 11 | Mod 11+10 |
Error Detection | Better | Basic | Good | Best |
Data Length | Longer | Shorter | Shorter | Longer |
[!NOTE] Image needed: Visual comparison of variants
Error Detection Capabilities
MSI1010 can detect:
- Single digit errors
- Double digit errors
- Most transposition errors
- Many random errors
- Sequential errors
Migration Considerations
ts
// Upgrade from MSI10
barcode('#barcode', '1234', { format: 'MSI10' }) // Single check
barcode('#barcode', '1234', { format: 'MSI1010' }) // Double check
// Alternative double-check option
barcode('#barcode', '1234', { format: 'MSI1110' }) // Mod 11 + Mod 10
Technical Notes
Length Considerations
- Two additional digits
- Longer than single-check variants
- Scanner configuration needed
Validation Process
- Two-step verification
- Independent check digits
- Enhanced error detection
Implementation Tips
- Verify scanner support
- Test both checksums
- Consider space requirements
[!NOTE] Image needed: Technical diagram showing double check digit calculation