How danomagnum/gologix works
gologix is a native Go Ethernet/IP and CIP driver for ControlLogix, CompactLogix, and Micro820 PLCs. Its primary workflow is to connect a client to a PLC, perform tag reads or writes (including batches and discovery), and return typed values to the Go caller. Separate capabilities include a CIP message interface, a server that accepts PLC messages and routes them to tag providers, L5X project-file parsing, and canned diagnostics. The graph follows documented relationships; some internal call details are not established by the excerpts or source index.
Main entry points: client.go Client · faults.go Fault and force diagnostics · server.go Server · connect.go Connection setup
Components 18
PLC Client
- Client
client.go - Connection setup
connect.go - Tag reads
read.go - Tag writes
write.go - Tag and program discovery
listalltags.go - Generic CIP messages
messages.go
CIP Protocol
- CIP definitions and services
cip_definitions.go - CIP data packing
pack.go
CIP Server
- Server
server.go - Path router
server_router.go - Map tag provider
server_router.go
L5X Projects
- L5X schema
l5x/schema.go - L5X tag and comment extraction
l5x/load_tags.go
Diagnostics And Types
- Fault descriptions
canned/fault_descriptions.go - Fault and force diagnostics
canned/faults.go - Logix structured types
lgxtypes/timer.go
Other components
- Go application
- Ethernet/IP PLC
Connections 21
- Go application → Client: creates and uses
- Client → Connection setup: connects
- Connection setup → Ethernet/IP PLC: opens Ethernet/IP
- Client → Tag reads: requests reads
- Client → Tag writes: requests writes
- Client → Tag and program discovery: lists tags and programs
- Client → Generic CIP messages: sends custom messages
- Tag reads → Ethernet/IP PLC: reads tag data
- Tag writes → Ethernet/IP PLC: writes tag data
- Tag and program discovery → Ethernet/IP PLC: queries controller
- Generic CIP messages → Ethernet/IP PLC: sends CIP request
- Go application → Server: starts server
- Ethernet/IP PLC → Server: sends MSG or IO
- Server → Path router: routes requests
server.go - Path router → Map tag provider: dispatches tag access
server_router.go - Go application → L5X tag and comment extraction: loads project data
- L5X tag and comment extraction → L5X schema: uses project structures
- Go application → Fault and force diagnostics: requests diagnostics
- Fault and force diagnostics → Client: requests fault data
canned/faults.go - Fault and force diagnostics → Fault descriptions: looks up descriptions
canned/faults.go - Go application → Logix structured types: uses typed values