Protocol conversion enables communication between systems that speak different languages. Success depends on understanding both protocols, careful planning, and thorough testing.
Translating data and commands between different communication protocols:
Device A Gateway Device B
[Modbus RTU] → [Conversion] → [BACnet/IP]
Most common BAS conversion:
Challenges:
Best Practices:
Legacy integration:
Challenges:
Best Practices:
OEM equipment integration:
Challenges:
Best Practices:
Map source data to appropriate BACnet objects:
| Source Data | BACnet Object | Notes |
|---|---|---|
| Temperature sensor | Analog Input | Read-only |
| Setpoint | Analog Value | Read-write |
| Equipment status | Binary Input | Read-only |
| Start/stop command | Binary Output | Writable |
| Operating mode | Multi-state | Enumerated |
Numeric Conversions:
Modbus 16-bit integer (0-65535)
→ BACnet float (scaled)
Example: Raw value 725 ÷ 10 = 72.5°F
Bit Manipulation:
Modbus status word (16 bits)
→ Multiple BACnet binary points
Bit 0 → BI-1 (Running)
Bit 1 → BI-2 (Alarm)
Bit 2 → BI-3 (Manual)
Apply appropriate scaling:
| Raw Value | Scale | Offset | Result |
|---|---|---|---|
| 725 | ÷10 | 0 | 72.5 |
| 1000 | ÷100 | -50 | -40 |
| 4096 | ×0.0244 | 0 | 100% |
Balance responsiveness vs. load:
| Data Type | Typical Poll | Rationale |
|---|---|---|
| Critical alarms | 1-5 sec | Fast response needed |
| Control values | 5-15 sec | Process response time |
| Monitoring | 30-60 sec | Acceptable latency |
| Configuration | On-demand | Rarely changes |
Understand end-to-end timing:
Source poll + Gateway processing + Destination = Total
500ms + 100ms + 200ms = 800ms
Handle gracefully:
Failure Detection:
- Poll timeout after 3 retries
- Set point quality to "offline"
- Generate communication alarm
- Continue attempting recovery
Recovery:
- Resume polling on response
- Clear communication alarm
- Log failure duration
Map status appropriately:
| Source Status | BACnet Flags |
|---|---|
| Good | Normal |
| Out of range | Fault |
| No communication | No_Comm |
| Manual override | Override |
| Not configured | Out_Of_Service |
Protect against bad data:
Different alarm models:
Modbus: No native alarms
LON: SNVT-based
Modbus Status Register:
Bit 0: Running
Bit 1: Fault (→ Generate alarm)
Bit 2: Warning (→ Generate event)
Gateway Logic:
IF Bit 1 transitions 0→1 THEN
Create BACnet alarm
Set Priority = High
Timestamp = Now
Ensure reliable command execution:
Command Sequence:
1. Receive BACnet write
2. Translate to source protocol
3. Send command
4. Wait for confirmation
5. Update feedback
6. Report result
Implement command priorities:
BACnet Priority Array:
Priority 1 (Manual-Life Safety) → Immediate
Priority 8 (Manual Operator) → Normal
Priority 16 (Default) → Background
Confirm commands executed:
Test Matrix:
1. Read all mapped points
2. Verify values against source
3. Test all writable points
4. Verify command execution
5. Test alarm generation
6. Verify alarm acknowledgment
Stress Tests:
- Maximum poll rate
- Simultaneous commands
- Communication failure/recovery
- Full point count
Record all test results:
Good protocol conversion is invisible to operators—data just appears where it should. The work happens in careful planning, thorough mapping, and extensive testing.