MSI Barcode
MSI (Modified Plessey) is a specialized barcode format developed by the MSI Data Corporation. It's primarily used for inventory control, warehouse management, and retail shelf marking. The format supports numeric digits (0-9) and includes various checksum options for error detection.
Basic Usage
import { barcode } from '@stacksjs/qrx'
barcode('#barcode', '123456789', {
format: 'MSI'
})
Available Variants
qrx supports multiple MSI variants with different checksum calculations:
// Basic MSI (no checksum)
barcode('#barcode', '1234', { format: 'MSI' }) // Result: 1234
// With Mod 10 checksum
barcode('#barcode', '1234', { format: 'MSI10' }) // Result: 12344
// With Mod 11 checksum
barcode('#barcode', '1234', { format: 'MSI11' }) // Result: 12343
// With double Mod 10 checksum
barcode('#barcode', '1234', { format: 'MSI1010' }) // Result: 123448
// With Mod 11 & Mod 10 checksum
barcode('#barcode', '1234', { format: 'MSI1110' }) // Result: 123430
[!NOTE] Image needed: Visual comparison of different MSI variants
Customization Options
import { barcode } from '@stacksjs/qrx'
barcode('#barcode', '123456789', {
format: 'MSI',
width: 2,
height: 100,
displayValue: true,
fontSize: 20,
font: 'monospace',
textAlign: 'center',
textPosition: 'bottom',
textMargin: 2,
background: '#ffffff',
lineColor: '#000000'
})
Common Applications
Retail
- Shelf marking
- Price labels
- Inventory tags
Warehouse
- Location marking
- Bin labels
- Storage containers
Inventory Control
- Asset tracking
- Stock management
- Item identification
[!NOTE] Image needed: Real-world application examples
Error Handling
import { barcode } from '@stacksjs/qrx'
barcode('#barcode', '123456789', {
format: 'MSI',
valid: (valid) => {
if (!valid) {
console.error('Invalid MSI barcode input')
// Handle invalid input
}
}
})
Technical Specifications
Character Set
- Numeric only (0-9)
- Variable length
- Optional checksums
Structure
- Start character
- Data digits
- Optional check digit(s)
- Stop character
Variants Available
Best Practices
Checksum Selection
- Use MSI10 for basic error detection
- Use MSI1010 for enhanced reliability
- Use MSI1110 for maximum security
Implementation Guidelines
- Validate numeric input
- Consider scanner compatibility
- Test checksum verification
Print Quality
- Maintain quiet zones
- Ensure adequate contrast
- Verify scanner readability
[!NOTE] Image needed: Best practices visualization
Migration Guide
If transitioning from MSI to modern formats:
// Current MSI implementation
barcode('#barcode', '123456789', { format: 'MSI' })
// Modern alternative (CODE128)
barcode('#barcode', '123456789', { format: 'CODE128' })
For detailed information about specific MSI variants, see: