Quick Start
On this page
What the driver does and what it does not
Read the Installation, Compatibility and Troubleshooting chapters as well.
Licence: without a licence for this module the driver runs 2 devices while the gateway is in trial. Details in the Compatibility chapter, Licensing.
Writes are on by default for a new device. Allow writes is switched on when you add a device, so the driver may send WR, WRS, ST and RS as well as the reads ?K, ?M, RD and RDS. To make a device read-only, switch Allow writes off on its form and save; then it sends only the reads. With Allow timer/counter writes also on (off by default) it may send WS for timer and counter set values and WR for their current values. It never sends a program, mode (M0, M1), clock or network command; the list is closed and checked before every request leaves.
The driver reads Keyence KV PLCs (KV-8000, KV-7000, KV-5000/3000, KV-X, KV Nano) over Host Link on TCP port 8501, or over UDP (field Transport).
Add a device
Gateway web page, Connections, Keyence HostLink, Devices. Press Add device +, fill in the fields and save. The device starts at once; no restart is needed.
| Field | Meaning |
|---|---|
| Name | Device name and its tag folder under the HostLink provider |
| Enabled | On starts the device when you save; off keeps it configured without a connection |
| Allow writes | On by default for a new device. When on, the tags listed under “Writes” can be written from Ignition. Switch it off to make the device read-only |
| Host, Port | Address of the PLC or its Ethernet unit; port 8501 |
| Transport | tcp (default) or udp. Over UDP every request and every answer is one datagram and there is no connection: an unreachable or switched-off PLC shows as a timeout, a lost datagram is a timeout too, and the next scan tries again. Use it only when the PLC or its Ethernet unit is set to Host Link over UDP. |
| PLC family | Required: kv-nano, kv-5000 (KV-3000, 5000, 5500), kv-7000 (7300, 7500), kv-8000, kv-x500. Decides which devices and ranges are accepted. Choose it yourself; the module does not guess it from the model the PLC reports |
| XYM addressing | Off by default. When on, D, E, F may be written for DM, EM, FM. X, Y, M, L are not supported |
| Scan rate (ms) | Time from the end of one scan to the start of the next, at least 50. The real period is this plus the time a scan takes |
| Timeout (ms) | How long to wait for a connection or an answer before the connection is closed and opened again |
| Allow timer/counter writes | Off by default. Takes effect only with Allow writes also on, and only on kv-7000 and kv-8000 (the models that have the preset commands) |
| Tags | The tag list, see below |
After a few seconds the device shows its state in the list. A device that connects shows Connected.
Tag list
One text field. Entries [path=]address:TYPE, separated by semicolons:
DM100:U16;Line1/Temp=DM300:F32;Line1/Run=R100:BOOL;Line1/Part=EM0:STR[20]
- Without a path the address is the tag name. A path may have folders separated by
/; letters, digits,_and-. - Devices: relays
R,B,MR,LR,CR(type BOOL only); dataDM,EM,FM,ZF,W,TM,CM(types U16, S16, U32, S32, F32, F64, STR); 32-bit devicesTC,TS,CC,CS,Z,CTH,CTC(types U32, S32). Timer and counter contactsTandC, andVM,VB,AT, are not supported. - Relays are numbered channel then two-digit bit:
R1915is channel 19, bit 15, and the next bit isR2000.BandWnumbers are hexadecimal. - 32-bit and floating point values need no byte swapping: the low word is at the lower address, as the PLC stores it.
U32 S32 F32use two words,F64four. STR[n]isncharacters, two per word, the first character of a word in its high byte.STR[n,LOW]puts the first character in the low byte. The order of characters inside a word depends on the PLC: check one known text after setup.- Every address is checked against the PLC family. The page refuses an address that exists on no family. An address that is outside the family you chose is saved, and the device then shows “The saved settings cannot run” with the reason (for example
EM does not exist on kv-nano) until you correct it. - Limits: 60000 characters and 5000 tags.
- Every scattered tag is its own request: a gap between tags is never read, so 500 tags spread over 3000 words take several hundred requests per scan. Group tags that belong together at neighbouring addresses.
- F32 is shown as a double: a REAL of 0.1 shows as 0.10000000149011612. Round in the screen if needed.
- Tag types in Ignition: Boolean, Int4 (U16, S16, S32), Int8 (U32), Float8 (F32, F64), String.
Import a CSV
The Tags field also takes a CSV, in one of two layouts. The field is one line, so paste the CSV with every line break replaced by the two characters \n (find and replace in a text editor). A line break typed into the field is refused by the page.
- Generic:
name,address,type,description, with or without a header row. With a header the columns are found by name (name,address,type,description) in any order.nameis the tag path (empty: the address),typeis as in the tag list (U16,STR[20,LOW], …). The description is not kept. - KV STUDIO device comment export: the device in the first column and its comment in the second (
DM100,Line temperature). The export has no type, so the type follows the device: BOOL on relays, U16 on data devices, U32 on 32-bit devices. The tag name is the comment with every character other than letters, digits,_and-replaced by_; an empty comment or a name already used takes the address instead. Change the type afterwards in the Tags field where a device holds more than 16 bits. - Delimiter comma, semicolon or tab; values may be in double quotes.
- The import is all or nothing: the page names every line it cannot use (at most 10, for example
Line 7: DM70000 is outside DM00000 to DM65534 on kv-8000). A KV STUDIO export that lists devices the module does not read (X,Y,M,L,T,C,VM,VB,AT) is refused with the line numbers; delete those lines first.
Writes
On by default for a new device: the tags below are writable from the first connect. To stop writes, switch Allow writes off for the device and save. After switching it on, save; tags become writable at the next connect.
| Tag | Command | Notes |
|---|---|---|
BOOL on R, B, MR, LR |
ST / RS |
|
U16, S16, U32, S32, F32, F64, STR on DM, EM, FM, ZF, W |
WR (one word), WRS (several words, one request) |
32-bit and float values low word first, no byte swapping. A STR needs at most 64 words (128 characters), longer ones are not writable. Text takes printable ISO-8859-1 characters and at most the tag length |
TC, CC (current value) |
WR |
needs Allow timer/counter writes, kv-7000 or kv-8000 |
TS, CS (set value) |
WS on T/C |
the same |
Never written, whatever the settings: CR, CM, TM, Z, CTH, CTC, and a bit command on a timer or counter. A tag that cannot be written has no write route in Ignition.
Checks and results:
- The value must fit the type: integers whole and inside the range (3.0 is accepted, 3.5 is not; nothing is rounded or clipped), floats finite, BOOL true/false or 0/1. A value that does not fit is refused by Ignition before anything is sent.
- A Good result in Ignition means the write was accepted and queued, not that the PLC took it. The result shows in
LastWriteError(empty when the PLC answeredOK) andLastWriteTime. - A write that gets no clean answer (timeout, closed connection) may have reached the PLC. The driver closes the connection, reconnects and never sends that write again.
- Every write is logged (logger
innorobix.hostlink.write): at INFO just before it is sent with device, tag, address and value, and at INFO with the result and time when the PLC answeredOK; a refusal or failure at WARN. - The module does not log the user for any write. It logs every write with device, tag, address, value and result, whether the write comes from a screen, a script or anywhere else. Ignition gives the module no user for a gateway-script write. If you need a record of who wrote, keep it in your own application.
- Turning
Allow writesoff stops every write that has not been sent yet.
How the PLC is read
- Neighbouring words of one device are read together in
RDSrequests of at most 64 points, one request at a time on one connection. A gap between two tags is never read. Relay blocks stop at the end of a 16-bit channel. Modelis the PLC model from?K(Unknown (code)for a code that is not in our table);ModeisRUNorPROGRAMfrom?M, read at connect and every 10 s.LastReadErrornames the first block the last scan could not read and why (empty when all were read); the platformLastErrorstays for connection faults.RequestRateHzis the number of requests per second.ProtocolErrorscounts error answers (E0toE9) and answers the driver could not use.- An error answer such as
E0(address does not exist on this PLC) turns the tags of that block Bad with qualityBad_Failure; the connection stays open and the next scan tries again. One WARN line is written per device and error per 5 minutes, however many blocks fail, and one INFO line when all reads work again.
Status tags
The module creates the tag provider [HostLink] with one folder per device. The gateway lists the provider and its tag count under Services > Tags; the tag tree itself is in the Designer’s tag browser. Tags of your own tag list sit below the device folder under the path you gave.
Every device folder has a _Status folder, the same in every Innorobix module:
Tag below [HostLink]<Device>/_Status |
Meaning |
|---|---|
Connected |
True while the connection to the PLC is up and answering |
State |
Connection state, including Not licensed, Disabled and Standby (the gateway is the backup node of a redundant pair and does not connect) |
LicenseState |
The module licence as this device sees it |
LastUpdate |
Time of the last good answer |
ReconnectCount |
How often the connection was lost |
Generated from the module's documentation for version 8.9.0. Questions: contact us.