go-mcprotocol is a Go library and tool for accessing Programmable Logic Controllers (PLCs) using the MELSEC Communication Protocol, enabling register data collection and local file dumping. go-mcprotocol is a Go
go-mcprotocol is a Go library and tool designed for accessing Programmable Logic Controllers (PLCs) using the MELSEC Communication Protocol (MC Protocol).
Work In Progress
The library allows reading PLC registers, as demonstrated in the provided Go code snippet. It showcases initializing a 3EClient, reading from a specified register (e.g., "D" register at offset 100, reading 3 registers), and parsing the binary response. A health check function is also available to verify the connection to the PLC.
The plcmirror tool collects register values from a PLC using the MC Protocol and dumps them to local CSV files. Each line in the CSV contains a timestamp and a Base64 encoded MC Protocol response. Example usage involves specifying the PLC host, port, target register, offset, number of registers to read, and output directory. Options include host, port, device register, offset, number of points, output directory, and mirroring interval.
Apache 2
future-architect/go-mcprotocol
October 11, 2019
March 28, 2025
Go