Step-by-step guide to connect FrameworX to a Programmable Logic Controller (PLC). This tutorial uses Allen-Bradley ControlLogix as an example, but includes notes for other brands.
What You'll Learn
- Configure PLC communication driver
- Import tag database from PLC
- Map PLC addresses
- Optimize communication performance
Prerequisites
- PLC network details (IP address, slot number)
- PLC programming software for tag export (optional)
Step 1: Select Your PLC Protocol
Navigate to Devices → Channels and choose protocol:
PLC Brand | Protocol | Port |
---|---|---|
Allen-Bradley ControlLogix | AB ControlLogix | 44818 |
Siemens S7 | Siemens S7 | 102 |
Modbus devices | Modbus TCP | 502 |
Schneider | Modbus or OPC UA | Varies |
Step 2: Configure Channel
Create channel for ControlLogix:
- Name:
CLX_Channel
- Protocol:
AB ControlLogix
- Connection: Ethernet/IP
- Timeout: 5000ms
- Max Connections: 16
Step 3: Add PLC Node
- Go to Devices → Nodes
- Create node:
- Name:
MainPLC
- Channel:
CLX_Channel
- IP Address:
192.168.1.100
- Slot: 0 (CPU slot)
- Connection Path: Leave blank for local
- Name:
Step 4: Import Tags from PLC
Method 1 - Online Import:
- Right-click node → Import Tags Online
- Connect to PLC
- Select tags to import
- Map to FrameworX namespace
Method 2 - Offline Import (L5X file):
- Export from RSLogix/Studio 5000
- In FrameworX: Tools → Import → ControlLogix L5X
- Browse to file
- Select tags and data types
Step 5: Create Device Points
For manual configuration:
Controller Tag:
- Name:
Line_Speed
- Node:
MainPLC
- Address:
Line_Speed
(tag name in PLC) - Data Type: REAL/Float
- Scan Rate: 1000ms
Array Element:
- Name:
Alarm_Active_01
- Address:
Alarms[0]
- Data Type: BOOL
UDT Member:
- Name:
Motor1_Running
- Address:
Motor1.Running
- Data Type: BOOL
Step 5: Optimize Communication
- Create Scan Groups:
- Fast: 100ms (critical values)
- Normal: 1000ms (standard)
- Slow: 10000ms (setpoints)
- Assign Points to Groups:
- Alarms → Fast
- Process values → Normal
- Configurations → Slow
Step 6: Test Connection
- Start Runtime
- Check Devices → Monitor
- Verify:
- Connection status green
- Values updating
- Scan time acceptable
Step 7: Troubleshooting
Issue | Solution |
---|---|
Cannot connect | Check firewall, ping PLC |
Wrong slot | Verify CPU slot number |
Tags not found | Check controller/program scope |
Slow updates | Reduce points per packet |
Connection lost | Increase timeout value |
PLC-Specific Notes
Siemens S7:
- Requires DB number and offset
- Example:
DB100.DBD10
(Double at offset 10)
Modbus:
- Use register addresses
- 40001 = Holding registers
- 30001 = Input registers
OPC UA:
- Browse available nodes
- Use NodeId for address
Best Practices
- Import tags to maintain consistency
- Use structured addressing
- Group related tags
- Set appropriate scan rates
- Monitor communication load
Next Steps
- [Define Alarms] - Add alarms to PLC values
- [Historian] - Log PLC data
- [Operator UI Design] - Display PLC status