Getting Started
Start Here
Use this package when you want the shortest Python path to KEYENCE KV Host Link communication through the public high-level API.
Recommended first path:
- Install
kv-hostlink. - Open one connection with
open_and_connect. - Read one safe
DMword. - Write only to a known-safe test word or bit after the first read is stable.
First PLC Registers To Try
Start with these first:
DM0DM10DM100:SDM200:DDM50.3
Do not start with these:
- large chunked reads
- validation sweeps
- addresses outside the current public register table
Minimal Async Pattern
from hostlink import HostLinkConnectionOptions, open_and_connect
options = HostLinkConnectionOptions(host="192.168.250.100", port=8501)
First Successful Run
Recommended order:
read_typed(client, "DM0", "U")write_typed(client, "DM10", "U", value)only on a safe test wordread_named(client, ["DM0", "DM1:S", "DM2:D", "DM4:F", "DM10.0"])
Common Beginner Checks
If the first read fails, check these in order:
- correct host and port
- start with
DMinstead of a timer/counter or less common area - use one scalar read before trying
.bitor typed views