Quick Start

On this page

What the module does

This chapter covers what the module does: it connects to a Cognex In-Sight camera over Native Mode, reads result values into tags (by polling, or from the camera’s DataChannel stream), fetches the camera’s image, keeps the last images on the gateway, optionally saves failed images to disk and serves the images over a gateway route, and, behind per-camera switches, triggers an inspection, sets the camera Online or Offline and sets job values in the camera (cells and symbolic tags you mark writable). For Perspective it adds the component Innorobix Vision Image (section 4). No tag or script starts a job change (section 5).

Ignition 8.3 only. Installation: Installation chapter. Problems: Troubleshooting chapter.

1. Switch Native Mode (Telnet) on in the camera

Native Mode runs over Telnet on TCP port 23. Newer In-Sight sensors (for example the 2800 and 3800 series) have Telnet switched off by default. In the camera’s Industrial Ethernet utility, switch on “Telnet Server Enabled” and check the port. If it is off, the module reports The camera at <host>:<port> refused the connection ... Telnet Server Enabled in _Status/LastError.

Create a camera user for the module and do not use the factory user admin. A Protected user is enough to read results. Reading the image (RB) and the commands need Full Access: with a Protected user the results work and _Status/Notice says that images need Full Access. Names and passwords are at most 15 characters on the camera, and the settings page accepts no more. The login crosses the network in clear text, so anyone on the network path can read it.

2. Add the camera

Gateway web page, Connections, Cognex Vision, Cameras. Press Add device +, fill in the fields and save. The camera starts at once; no restart is needed.

Setting Meaning
Name, Enabled Camera name (also its tag folder under Vision); off keeps the camera configured without a connection
Host, Native Mode port Address of the camera and its Telnet port (default 23)
User, Password The camera user. The password is stored encrypted by the gateway and is never shown again
Request terminator crlf (default) or nul; newer sensors accept both
Poll interval (ms), Timeout (ms) How often the mapped values are read; how long to wait for the camera
Result map Which camera values become tags (below)
Use DataChannel, DataChannel port Optional XML result stream (default port 50000), read in addition to Native Mode with the same user and password. See section 3a. The In-Sight 2000 series has no GV over Ethernet, so its results can only come from the DataChannel
Image refresh, Image interval (ms) result: fetch an image after each new result (and one at start). interval: every image interval. manual: the module fetches no image by itself. At most one image every 0.5 s. A camera that gives no results (In-Sight 2000 series without DataChannel) is fetched on the interval in the result mode too
Image format, Images kept, Image memory (MB) The gateway converts the camera’s BMP to jpeg (default, small) or png (lossless) and keeps the last 20 images (1 to 200), but never more than the image memory of that camera (default 32 MB, 1 to 512): the oldest go first. Memory is held per camera, so size it for your number of cameras
Failed-image archive folder, Archive retention (days), Archive size limit (MB) Empty folder: no archive. A full path on the gateway computer (the gateway’s service account needs write access) saves the image of each failed inspection as <camera>_<yyyyMMddTHHmmssSSSZ>_fail.jpg, time in UTC. Files older than the retention (default 30 days) are deleted, then the oldest until this camera’s files fit the size limit (default 1000 MB). Only this camera’s own files are ever deleted. A camera name with spaces or special characters gets a short code after its cleaned name (Line_1_Cam-1a2b3c4d_...), so two cameras never share files. Which image is archived: the one read right after the result with Pass 0. If InspectionCount is in the result map, the module reads it again after the image and keeps the image without a pass flag (no archive) when a newer inspection began meanwhile; without InspectionCount on a line faster than the poll, the image can belong to a later part
Allow writes, Allow online control, Allow job load, Job allow-list See section 5. All three switches are on by default for a new camera; the Job allow-list is empty, so no job file is loaded until you list one

After a few seconds the camera shows its state in the list.

3. Map results to tags

The result map is one line of name=source:TYPE entries separated by semicolons:

Pass=Job.Pass:BOOL;InspectionCount=A001:INT;Line1/Score=B010:FLOAT;Part=Job.PartId:STRING
  • The source is a spreadsheet cell (one letter and a three digit row, A000 to Z399) or a symbolic tag such as Job.Pass, without quotes. Both are read with GV.
  • The type is BOOL, INT, FLOAT or STRING. The camera sends numbers; BOOL accepts 0 and 1, INT needs a whole number.
  • The tag is [Vision]<Camera>/Result/<name>. Pass (BOOL) and InspectionCount (INT) are the tags of those names in the tag contract. LastResultTime is set when the inspection count changes (or, without a count mapping, when a mapped value changes).
  • A name cannot also be a folder: Tool1=A000:INT;Tool1/Score=A001:FLOAT is refused when you save, as is a folder named like a tag of the module (Pass/..., InspectionCount/..., LastResultTime/..., ImageUrl/...).
  • Add :W after the type to make an entry writable, for example Setpoint=Job.Setpoint:INT:W;Part=B010:STRING:W. Writing the tag then sets that value in the camera’s job (section 5). Pass and InspectionCount cannot be writable, text (STRING) can be written only to a spreadsheet cell, and one cell or tag can be writable through one entry only; the page refuses anything else when you save. A change of a writable value is not counted as a new result.
  • At most 100 entries; every entry is one request per poll. A cell or tag the camera does not know, or a value that does not fit its type, makes that one tag Bad and keeps its last value.

3a. DataChannel (lower latency)

With Use DataChannel on, the module opens a second connection to the camera’s DataChannel port, logs in and selects the data stream (DAT; images are never taken from it, they come from RB). Each inspection then arrives at once, without waiting for the next poll.

  • The camera sends only the cells in its own watch list (set in the job; the module sends no PUT). A result map entry that names a spreadsheet cell in the watch list is taken from the stream and not polled with GV. A symbolic tag, or a cell that is not in the watch list, is not in the stream: it is still read with GV (and _Status/Notice says DataChannel: no value for Result/<name> ...). On an In-Sight 2000 those entries stay Bad.
  • The DataChannel may not exist. It is missing from the port table of newer 2800/3800 firmware, so the module does not try it on those models (the notice says so). On any other camera, if the connection is refused, the login fails or the stream drops, the module falls back to polling with GV at once and says so in _Status/Notice (DataChannel is not connected (...): results are read by polling with GV.). It tries again after 1 s, then every 2, 4 … up to 30 s, and the notice clears when the stream is back. One WARN line is written for the first failure, then a summary every 5 minutes.
  • In-Sight 2000 series: there is no GV, so without a working DataChannel the result tags are Bad and the notice says the result tags stay Bad until it is.
  • While the stream delivers, the module reads the inspection count with GV every 30 polls and compares it with the stream. If the two differ at two checks in a row with no new document in between, the stream is treated as dead (a firewall or switch dropped it without closing it), a WARN is written, _Status/Notice says DataChannel was out of date, and the connection is opened again; polling with GV covers the gap. The connection also uses short TCP keep-alive probes (about 60 s) where the gateway’s operating system and Java runtime allow. Where they do not (for example a Windows gateway on a Java 17 runtime), a stream that has sent nothing for 5 minutes is checked by opening a second DataChannel connection: once it has logged in, it takes over and the first one is closed, so the module briefly uses one more of the camera’s six DataChannel connections. If the second connection fails, the DataChannel counts as not connected and polling with GV takes over. A camera that accepts the login and then closes at once is tried with the growing wait above and is not reported as connected until a document arrives or the stream stays open for 10 s; it writes no more than the one WARN and the 5-minute summaries.
  • The camera allows six DataChannel connections. A wrong password is reported as the camera rejected the user name or password on the DataChannel; the password is never logged.

4. Images

The image is read with the camera’s RB command (a read; it needs Full Access). The tag ImageUrl ([Vision]<Camera>/Result/ImageUrl) holds the path of the newest image, for example /data/vision/image/Cam1/latest?v=7; the number after v= grows with every new image, so a binding on the tag reloads exactly when there is a new image.

  • GET /data/vision/image/<camera>/latest is the newest image; GET /data/vision/image/<camera>/history/<n> is the one n places before it (history/0 is the newest, up to the number of images kept). Names are not case sensitive. An unknown camera, a camera that does not run (deleted, disabled, not licensed) and a position the gateway does not hold answer 404.
  • Who may load an image: a user signed in to the gateway web UI with read permission. A request without such a session is refused (401 or 403). Perspective sessions cannot be checked by a module route in Ignition, so a Perspective user who has no gateway web session cannot load these URLs; Perspective operators use the component below. Nothing is served to anonymous requests.
  • The answers are never cached by the browser or a proxy (Cache-Control: no-store): the images are production data. Images are held in gateway memory only, apart from the failed-image archive you switch on.
  • The image feature needs a user with Full Access. _Status/Notice names the problem when RB is refused or the image cannot be read, and the module asks again after 60 s. If the image transfer itself breaks (timeout or a reply that does not follow the protocol), the connection is reopened, results go on and images are tried again only after 60 s. The time allowed for one image grows with its announced size (it counts on at least 100 KB/s). A reply that does not follow the protocol closes the connection and the module reconnects (_Status/ReconnectCount, _Status/ProtocolErrors).
  • Large images take time to read as text over Native Mode (a 1 megapixel grey image is about 2 MB of hex text). Keep the poll interval above the time one image takes, or use the interval mode with a long interval, on slow networks.
  • A failed image is archived only when the result map has a Pass entry (BOOL) and it was 0 when the image was fetched. Without a Pass entry nothing is archived.

The Perspective component

The Designer palette has the category Cognex Vision with the component Innorobix Vision Image. It shows the camera’s newest image with a border that is green when the inspection passed, red when it failed and grey when the pass flag is not known, and a timestamp over the image. Click the component to open a strip of the images the gateway holds, newest first, each with its own border colour and time; click an entry to show that image. The image travels over the Perspective connection; the component builds no URL, so no gateway web session is needed.

Property Meaning
camera The camera name, as on the Cameras page. The gateway reads it from the component’s properties, not from the browser’s request. A signed-in user who can change the property from the browser (Perspective allows it unless the property’s access is Protected) can point the component at any running camera: set the access of camera to Protected in the Designer where views must keep cameras apart
historyIndex 0 shows the newest image, 1 the one before it. The history strip sets it. It is a position in the gateway’s list of kept images, so the image at a position changes when a newer one arrives
passColor, failColor, unknownColor Border colours (#rrggbb, #rgb, #rrggbbaa or a plain colour name; anything else uses the default). Defaults green #2e7d32, red #c62828, grey #9e9e9e
borderWidth Border width in pixels (0 to 64, default 4)
showTimestamp, timestampPattern, timeZone Show the time the gateway received the image; a Java date and time pattern (default: the date as year-month-day, a space, then hour:minute:second) and a time zone such as Europe/Berlin (empty: the gateway’s zone). A pattern or zone that cannot be used falls back to the default
  • Who sees an image: only a Perspective session of a signed-in user. In a project that does not require sign-in, an anonymous session sees the text Authentication required. instead of an image, and the gateway logs a WARN. Which cameras a signed-in user may see is not restricted further: every user who may open the view sees the camera named in its property.
  • A camera that is not running (deleted, disabled, not licensed) shows Camera not found.; a camera with no image yet shows No image yet.. An image over 4 MiB is not sent and the component says so; the gateway logs one WARN. Use the JPEG format and a modest image size for cameras shown in Perspective.
  • The component asks the gateway for a new image every 2 seconds; the gateway answers a request for an image the browser already has without sending it again.
  • The component needs the Perspective module of Ignition to be installed and running. Without it the cameras, tags and image routes still work and the component is not available.

5. Command switches

Each switch is per camera. All three switches are on by default for a new camera, so Cmd/Trigger and Cmd/Online exist from the first connect; turn Allow writes off on the camera’s form to make the camera read-only (no command is then sent). Allow online control and Allow job load work only together with Allow writes. A camera that was saved before keeps the values it has; turn a switch off on a camera where Ignition must not use it. The Job allow-list of a new camera is empty, so Allow job load loads no file until you list one.

  • Allow writes: trigger. The tag Trigger ([Vision]<Camera>/Cmd/Trigger) exists only with this switch on; write true (or 1) to run one inspection (a write of false does nothing). The module sends SW8 (the camera answers after the inspection is done) and, only if the camera answers 0 (does not know it), SE8. The camera must be Online with its trigger set to External, Manual or Network, otherwise it answers -2.
  • Allow online control (with Allow writes): Online ([Vision]<Camera>/Cmd/Online) exists only with both on. Write true for Online (SO1) and false for Offline (SO0); the tag shows the camera’s state. Offline stops the inspection.
  • Allow writes: job values. A result map entry that ends in :W (section 3) gets a writable tag [Vision]<Camera>/Result/<name>; the tag is writable only with this switch on. A write sends one command to exactly that cell or symbolic tag and nothing else: SI for INT and for BOOL (written as 1 or 0), SF for FLOAT, SS for STRING (cells only). For example Setpoint=Job.Setpoint:INT:W and a write of 12 sends SIJob.Setpoint 12; Count=A010:INT:W and a write of 5 sends SIA0105. The value is checked before anything is sent: BOOL takes true, false, 1 or 0; INT a whole number within the 32-bit range; FLOAT a finite number (up to 1e12); STRING 1 to 64 printable ASCII characters. A value that does not fit is refused and nothing is sent. The camera answers 1 when it took the value; -1 means the cell or tag does not exist or the value is not valid for it, -2 that the cell has no edit control of that kind (an integer edit box for SI, a float edit box for SF, a string edit box for SS) or the value is out of its range, -6 that the camera user has no Full Access. A refused write shows in _Status/LastWriteError and the tag keeps its value. After a good write the tag shows the written value until the next reading replaces it. The command changes what the camera inspects with, so give the tag only to people and scripts that may do that.
  • Allow job load (with Allow writes and Allow online control): not started by any tag or script. The module has the job change inside (SO0, LF<file>, SO1 in that order, only for a file name on the Job allow-list, not case sensitive, .job optional, and only names of letters, digits, ., _, - and /, no spaces), but no tag, script function or page button starts it. Switching it on changes nothing visible. The job change works like this: all three steps are checked before the first is sent, so a file that is not allowed, or a switch that is off, sends nothing at all; a camera whose Online state cannot be read gets nothing; if the camera was Online it is put Online again after the load, also when the load failed (the old job is still loaded then); a camera that will not go Offline gets no LF. LF is given up to 2 minutes. If the camera does not answer LF or the connection is lost after SO0, the camera may be left Offline: the module does not send SO1 blind, writes a WARN, and the error says so. Set the camera Online yourself (Cmd/Online) after checking it.

The switches are read at every command: turning one off stops a command that is still queued. A write that the camera refuses (status -2, -5, -6) shows in _Status/LastWriteError; a Good result in Ignition only means the write was accepted and queued. Every trigger, online, job and set-value command sent is logged at INFO in innorobix.vision.write with the command (a set-value command includes the value) and the camera’s reply (the Ignition user is not available to the module and is not logged); a command the module’s own gate refuses is logged at WARN with the reason, and a status other than 1 is logged at WARN once, then as a summary every 5 minutes. A trigger or online command the camera does not answer within 15 s (or the camera timeout, if longer; 2 minutes for LF) is not sent again: the connection is reopened, because the camera may have done it.

The module never sends GJ, SJ, GET, MT, SR, a cell write to anything that is not a writable result map entry, or file and settings commands.

6. Status and tags

The module creates the tag provider [Vision] with one folder per camera. The gateway lists the provider and its tag count under Services > Tags; the tag tree itself is in the Designer’s tag browser.

Tag below [Vision]<Camera>/ Meaning
Connected, State Connection up or down, and the state in words (Not licensed, Disabled, Standby on the backup node of a redundant pair …)
LastError, LastUpdate The last error, and the time of the last good answer
ReconnectCount, LicenseState, ProtocolErrors Connection losses, the module licence as this camera sees it, replies the module could not use
LastWriteError, LastWriteTime Result and time of the last command; the camera’s refusals show here
Notice What is not available on this camera
Model, Firmware Read when the connection opens
Online, JobName The last Online state the camera reported (Boolean: true Online, false Offline; kept after a connection loss), and the active job

_Status/Notice is empty when everything the module needs is available. It says what is missing otherwise, for example Not supported: Camera model 2000-130 has no GV over Ethernet .... The result tags of such a camera stay Bad.

Message Where Cause
refused the connection … Telnet Server Enabled _Status/LastError Telnet is off in the camera, or the port is wrong
rejected the user name or password _Status/LastError Wrong login, or the camera user list does not allow it
sent no login prompt _Status/LastError The port is not the camera’s Native Mode port
status -1 gateway log (WARN), _Status/ProtocolErrors The cell or symbolic tag in the result map does not exist; that tag is Bad
status -6 gateway log (WARN), _Status/ProtocolErrors (also every 60 s while RB is answered with a status such as -6 or 0: that count is not a protocol fault) The camera user lacks the right the request needs
Images: the camera user has no Full Access _Status/Notice, gateway log (WARN) RB answered -6; give the camera user Full Access
Images: the camera’s image could not be used _Status/Notice, gateway log (WARN) The BMP could not be converted (broken file, more than 16 megapixels) or is larger than the image memory
DataChannel is not connected (…) _Status/Notice, gateway log (WARN) No DataChannel on the camera or the port is wrong, a wrong login, or the stream dropped; polling with GV takes over (section 3a)
status -2 / -5 / -6 on a command _Status/LastWriteError, innorobix.vision.write (WARN) The camera could not run it (Offline, wrong trigger mode, job missing), Online is held by the camera software or an input, or the user lacks Full Access
Archive: the failed image could not be saved _Status/Notice, gateway log (WARN) The archive folder cannot be written (permission, full disk); the image is still served from memory

_Info/Online is a Boolean tag that holds the last Online state the camera reported: true for Online, false for Offline. When the connection to the camera is lost, the tag keeps that last value and its Good quality, so on its own it does not show whether the camera can be reached. For an “inspecting” indicator, combine it with _Status/Connected, for example the expression {[Vision]Cam1/_Status/Connected} && {[Vision]Cam1/_Info/Online}.

Generated from the module's documentation. Questions: contact us.

Get a quoteFree trial