πŸŽ“ Lesson 4 D3

SPN/PGN Mapping Logic and Scaling Principles

SPN/PGN mapping is how a virtual terminal (VT) translates raw sensor data or control commands into meaningful, standardized messages that machines and displays can understand and use correctly.

🎯 Learning Objectives

  • βœ“ Explain the hierarchical relationship between PGNs, SPNs, and ISO 11783-6 data structures
  • βœ“ Design a compliant SPN-to-PGN mapping table for a custom blast monitoring VT screen
  • βœ“ Analyze VT configuration files to identify misaligned SPN scaling or offset errors
  • βœ“ Calculate scaled parameter values from raw CAN bytes using defined linear scaling formulas
  • βœ“ Apply ISO 11783-6 Annex B scaling rules to validate vendor-provided VT object pool definitions

πŸ“– Why This Matters

In mining blasting operations, real-time monitoring of detonation timing, hole pressure, and vibration requires seamless communication between downhole sensors, blast modules, and the operator’s Virtual Terminal (VT). If SPN/PGN mappings are incorrectly scaled or misassigned β€” even by a single bit β€” the VT may display 50 MPa instead of 5.0 MPa, triggering false overpressure alarms or masking critical failures. This lesson bridges the gap between low-level CAN messaging and human-machine interface integrity: mastering SPN/PGN mapping logic prevents costly misinterpretations in safety-critical blasting workflows.

πŸ“˜ Core Principles

SPN/PGN mapping operates at the intersection of three standards: SAE J1939 (transport layer), ISO 11783 (ISOBUS application layer), and ISO 11783-6 (Virtual Terminal specification). A PGN is a 18-bit identifier grouping related parameters (e.g., PGN 65273 = 'Blast Initiation Status'); each PGN contains one or more SPNs β€” atomic data elements like 'Detonator Voltage' (SPN 520324). Scaling is applied per SPN via linear transformation: Physical Value = (Raw Data Γ— Resolution) + Offset. Resolution and offset are defined in ISO 11783-6 Annex B and must be consistent across all VTs and ECUs sharing that SPN. Misalignment occurs when vendors interpret resolution as integer vs. floating-point, omit sign handling for signed SPNs, or ignore byte-order (endianness) during multi-byte decoding β€” all leading to systematic bias in displayed values.

πŸ“ Linear SPN Scaling Formula

All SPNs with physical units use linear scaling per ISO 11783-6 Β§7.3.2. The formula converts raw unsigned integer data (from CAN message payload bytes) into engineering units. It accounts for bit-length, resolution (LSB size), and offset β€” critical for precision-critical measurements like borehole pressure or time-of-arrival.

SPN Physical Value Calculation

PV = (Raw Γ— R) + O

Converts raw integer value from CAN payload into physical engineering units using standardized resolution and offset.

Variables:
SymbolNameUnitDescription
PV Physical Value V, MPa, ms, etc. Scaled, human-readable parameter value displayed on VT or used in control logic
Raw Raw Data count Unsigned integer extracted from specified CAN message bytes (bit-aligned per SPN definition)
R Resolution V/count, MPa/count, ms/count Least Significant Bit (LSB) size β€” defined in ISO 11783-6 Annex B for each SPN
O Offset V, MPa, ms Zero-reference correction applied after scaling; typically 0 for most blasting SPNs
Typical Ranges:
Detonator Voltage (SPN 520324): 0.0 – 200.0 V
Borehole Pressure (SPN 520326): 0.0 – 1000.0 MPa
Initiation Delay (SPN 520328): 0 – 10000 ms

πŸ’‘ Worked Example

Problem: SPN 520324 (Detonator Voltage) is transmitted in bytes 3–4 of PGN 65273. Raw CAN bytes received: 0x0A3C (little-endian). SPN definition specifies: 16-bit unsigned, Resolution = 0.01 V/bit, Offset = 0.0 V.
1. Step 1: Convert little-endian hex 0x0A3C β†’ decimal: 0x3C0A = 15370 (note byte swap for little-endian interpretation)
2. Step 2: Apply scaling: Physical Value = (15370 Γ— 0.01) + 0.0 = 153.70 V
3. Step 3: Verify against safe operating range for detonator circuits (typically 0–200 V): 153.70 V is valid and within 77% of max rating.
Answer: The decoded detonator voltage is 153.70 V, which falls within the safe operational range of 0–200 V.

πŸ—οΈ Real-World Application

At Newmont’s Boddington Mine (WA), a VT-based blast verification system flagged inconsistent 'initiation delay' values across 12 detonators. Investigation revealed that two ECU vendors used different interpretations of SPN 520328 (Time Since Trigger): Vendor A applied Resolution = 1 ms/bit with Offset = 0; Vendor B mistakenly used Resolution = 0.1 ms/bit due to misreading ISO 11783-6 Annex B Table B.3. Correcting the mapping restored Β±0.5 ms timing accuracy required for seismic wavefront analysis β€” directly enabling compliance with Australian Standard AS 2187.2–2013 blast vibration limits.

πŸ“‹ Case Connection

πŸ“‹ VT Task Controller Handshake Failure Diagnosis at Australian Cotton Farm

VT session drops after 8–12 minutes during high-load harvesting, triggering safety shutdowns

πŸ“š References