Skip to main content

Keyence KV (Upper Link / Host Link)

Collects data from Keyence KV series PLCs such as KV-7500 / KV-8000 using the Upper Link (上位リンク) ASCII protocol. Because plain-text commands are exchanged over the built-in Ethernet port, no separate communication unit is required.

Both reading and writing are supported.

Not yet verified on real equipment

The communication format of this driver was implemented based on public specifications and has not been verified against actual KV equipment. On first integration, start with a few tags and confirm that the values are correct. If the format differs, only the command assembly section of the driver needs to be modified, so a fix can be made quickly.


Registration form entries

Input fieldWhat to enterExample
IP addressBuilt-in Ethernet IP of the KV-7500/8000192.168.0.10
PortUpper Link port8501 (default)
Enter the port manually

The form's default port value is shared with other protocols and is not the KV default (8501). Be sure to enter 8501 (or the port configured on the equipment).

Advanced options

Option keyDefaultDescription
connect-timeout3000Connection timeout (ms)
read-timeout3000Response timeout (ms)
line-endingcrTerminator character. If the equipment is set to CRLF, use crlf

PLC address notation for tags

The format is <device><number>[.<suffix>].

NotationMeaning
DM100Data memory No. 100
DM100.URead as unsigned 16-bit
DM200.LRead as signed 32-bit
R500Bit (relay)
TC10Timer current value

Devices

CategoryDevice
WordDM EM FM ZF W TC (timer current value) TS (set value) CTH CTC C T
BitR MR LR CR B

Data format suffixes

SuffixMeaning
.UUnsigned 16-bit
.SSigned 16-bit
.DUnsigned 32-bit
.LSigned 32-bit
.H16-bit hexadecimal

If the suffix is omitted, the width of the data type specified on the tag is used.


Writing

  • Word: the value is written as-is.
  • Bit: a value of 1 / true / on turns the bit ON; anything else turns it OFF.
The PLC operating mode is never changed

If the PLC is in program mode or write-protected, writes are rejected (E4). The driver does not switch the operating mode automatically — a collector changing the PLC mode could stop the equipment. Leave the PLC in a write-enabled state on the PLC side.


Troubleshooting

SymptomPossible causeCheck
Cannot connectPort is not 8501Check the port field on the form
Connects but values are emptyAddress notation error (E0)Check the device name/number and look for read rejected messages in the log
Values look wrongSuffix does not match the tag data typeMatch .U/.S/.D/.L to the tag type
Cannot writePLC in program mode / write-protected (E4)Set the PLC to RUN + write-enabled
Collection drops intermittentlyDelayed responsesTry increasing read-timeout
The connection is re-established when communication is lost

This protocol has no checksum for error detection. Therefore, if a response is delayed and a timeout occurs, the connection is discarded and a new one is established — this prevents a late-arriving response from being misread as the value of the next tag. Reconnection is handled automatically by the gateway.