Advantech ICAM-500 Series Operating instructions

Programming Guide
ICAM-500 Series
Industrial AI Camera

ICAM-500 Programming Guide ii
Copyright
The documentation and the software included with this product are copyrighted 2022
by Advantech Co., Ltd. All rights are reserved. Advantech Co., Ltd. reserves the right
to make improvements in the products described in this manual at any time without
notice. No part of this manual may be reproduced, copied, translated or transmitted
in any form or by any means without the prior written permission of Advantech Co.,
Ltd. Information provided in this manual is intended to be accurate and reliable. How-
ever, Advantech Co., Ltd. assumes no responsibility for its use, nor for any infringe-
ments of the rights of third parties, which may result from its use.
Acknowledgments
Intel and Pentium are trademarks of Intel Corporation.
Microsoft Windows and MS-DOS are registered trademarks of Microsoft Corp.
All other product names or trademarks are properties of their respective owners.
Product Warranty (2 years)
Advantech warrants to you, the original purchaser, that each of its products will be
free from defects in materials and workmanship for two years from the date of pur-
chase.
This warranty does not apply to any products which have been repaired or altered by
persons other than repair personnel authorized by Advantech, or which have been
subject to misuse, abuse, accident or improper installation. Advantech assumes no
liability under the terms of this warranty as a consequence of such events.
Because of Advantech’s high quality-control standards and rigorous testing, most of
our customers never need to use our repair service. If an Advantech product is defec-
tive, it will be repaired or replaced at no charge during the warranty period. For out-
of-warranty repairs, you will be billed according to the cost of replacement materials,
service time and freight. Please consult your dealer for more details.
If you think you have a defective product, follow these steps:
1. Collect all the information about the problem encountered. (For example, CPU
speed, Advantech products used, other hardware and software used, etc.) Note
anything abnormal and list any onscreen messages you get when the problem
occurs.
2. Call your dealer and describe the problem. Please have your manual, product,
and any helpful information readily available.
3. If your product is diagnosed as defective, obtain an RMA (return merchandize
authorization) number from your dealer. This allows us to process your return
more quickly.
4. Carefully pack the defective product, a fully-completed Repair and Replacement
Order Card and a photocopy proof of purchase date (such as your sales receipt)
in a shippable container. A product returned without proof of the purchase date
is not eligible for warranty service.
5. Write the RMA number visibly on the outside of the package and ship it prepaid
to your dealer.
Part No. Edition 1
Printed in Taiwan September 2022

iii ICAM-500 Programming Guide
Declaration of Conformity
CE
This product has passed the CE test for environmental specifications when shielded
cables are used for external wiring. We recommend the use of shielded cables. This
kind of cable is available from Advantech. Please contact your local supplier for
ordering information.
Test conditions for passing also include the equipment being operated within an
industrial enclosure. In order to protect the product from damage caused by electro-
static discharge (ESD) and EMI leakage, we strongly recommend the use of CE-
compliant industrial enclosure products.
FCC Class A
This equipment has been tested and found to comply with the limits for a Class A dig-
ital device, pursuant to part 15 of the FCC Rules. These limits are designed to pro-
vide reasonable protection against harmful interference when the equipment is
operated in a commercial environment. This equipment generates, uses, and can
radiate radio frequency energy and, if not installed and used in accordance with the
instruction manual, may cause harmful interference to radio communications. Opera-
tion of this equipment in a residential area is likely to cause harmful interference. In
this event, users are required to correct the interference at their own expense.
Technical Support and Assistance
1. Visit the Advantech website at www.advantech.com/support to obtain the latest
product information.
2. Contact your distributor, sales representative, or Advantech's customer service
center for technical support if you need additional assistance. Please have the
following information ready before you call:
–Product name and serial number
–Description of your peripheral attachments
–Description of your software (operating system, version, application software,
etc.)
–A complete description of the problem
–The exact wording of any error messages
Safety Precaution - Static Electricity
Follow these simple precautions to protect yourself from harm and the products from
damage.
To avoid electrical shock, always disconnect the power from your PC chassis
before you work on it. Don't touch any components on the CPU card or other
cards while the PC is on.
Disconnect power before making any configuration changes. The sudden rush
of power as you connect a jumper or install a card may damage sensitive elec-
tronic components.

ICAM-500 Programming Guide iv
Safety Instructions
1. Install the system only in area with restricted access.
2. Read these safety instructions carefully.
3. Retain this user manual for future reference.
4. Disconnect the equipment from all power outlets before cleaning. Use only a
damp cloth for cleaning. Do not use liquid or spray detergents.
5. For pluggable equipment, the power outlet socket must be located near the
equipment and easily accessible.
6. Protect the equipment from humidity.
7. Place the equipment on a reliable surface during installation. Dropping or letting
the equipment fall may cause damage.
8. The openings on the enclosure are for air convection. Protect the equipment
from overheating. Do not cover the openings.
9. Ensure that the voltage of the power source is correct before connecting the
equipment to a power outlet.
10. Position the power cord away from high-traffic areas. Do not place anything over
the power cord.
11. All cautions and warnings on the equipment should be noted.
12. If the equipment is not used for a long time, disconnect it from the power source
to avoid damage from transient overvoltage.
13. Never pour any liquid into an opening. This may cause fire or electrical shock.
14. Never open the equipment. For safety reasons, the equipment should be
opened only by qualified service personnel.
15. If any of the following occurs, have the equipment checked by service person-
nel:
–The power cord or plug is damaged.
–Liquid has penetrated the equipment.
–The equipment has been exposed to moisture.
–The equipment is malfunctioning, or does not operate according to the user
manual.
–The equipment has been dropped and damaged.
–The equipment shows obvious signs of breakage.
16. Do not leave the equipment in an environment with a storage temperature of
below -20 °C (-4 °F) or above 60 °C (140 °F) as this may damage the compo-
nents. The equipment should be kept in a controlled environment.
17. CAUTION: Batteries are at risk of exploding if incorrectly replaced. Replace only
with the same or equivalent type as recommended by the manufacturer. Discard
used batteries according to the manufacturer’s instructions.
18. In accordance with IEC 704-1:1982 specifications, the sound pressure level at
the operator's position does not exceed 70 dB (A).
DISCLAIMER: These instructions are provided according to IEC 704-1 standards.
Advantech disclaims all responsibility for the accuracy of any statements contained
herein.

v ICAM-500 Programming Guide
Contents
Chapter 1 Introduction..........................................1
1.1 Introduction ............................................................................................... 2
1.2 Development environment ........................................................................ 2
1.3 Limitations................................................................................................. 2
Chapter 2 ICAM-500 SDK Architecture ...............3
2.1 ICAM-500 Web Service............................................................................. 4
2.2 ICAM-500 Web Service and CamNavi2 SDK Operation........................... 5
Chapter 3 Operation Flow ....................................7
3.1 Open/Close Camera Flow......................................................................... 8
3.2 Image Acquisition...................................................................................... 9
3.3 Image Trigger Flow ................................................................................. 10
3.4 HW trigger Control flow ........................................................................... 11
3.4.1 Software trigger........................................................................... 12
3.5 Lens Focusing Control ............................................................................ 13
3.5.1 Digital Input flow.......................................................................... 14
Chapter 4 CamNavi2 SDK API Manual ..............15
4.1 Requirement............................................................................................ 17
4.1.1 Basic ........................................................................................... 17
4.1.2 Option ......................................................................................... 17
4.2 module CamNavi2................................................................................... 17
4.2.1 class CamNavi2.......................................................................... 17
4.3 module iCam500 ..................................................................................... 26
4.3.1 class iCam500 ............................................................................ 26
4.3.2 enum CameraMode .................................................................... 39
4.4 module image.......................................................................................... 40
4.4.1 class CImage .............................................................................. 40
4.5 module focus........................................................................................... 50
4.5.1 class Focus................................................................................. 50
4.6 module lighting ........................................................................................ 51
4.6.1 class Lighting .............................................................................. 51
4.7 module board .......................................................................................... 52
4.7.1 class Board ................................................................................. 52
4.8 module digitalio ....................................................................................... 52
4.8.1 digital I/O code slice.................................................................... 52
4.8.2 class DigitalIO............................................................................. 53
4.9 module device ......................................................................................... 56
4.9.1 class Network.............................................................................. 56
4.9.2 class Firmware............................................................................ 56
4.10 Exception ................................................................................................ 57

ICAM-500 Programming Guide vi

Chapter 1
1Introduction

ICAM-500 Programming Guide 2
1.1 Introduction
The Advantech CAMNavi SDK offers the tools which provide developer/ ISV to oper-
ating ICAM-500 series Industrial AI camera and deploy the vision AI APP. based on
NVIDIA Jetpack. The CAMNavi SDK uses Python language by default and is better
adapted to image acquisition and AI algorithm integration.
1.2 Development environment
The Advantech CAMNavi SDK and NVIDIA Jetpack goes with BSP of ICAM-
500, user has to run CAMNavi SDK on the ICAM-500.
Connect to HDMI display and USB 3 hub for keyboard mouse then ICAM-500 is
ready to development.
To use CAMNavi SDK support Python 3.6 version above, Jetpack (4.4 for mono
version, 4.5.1 for Color version) and Linux Ubuntu 18.04.
1.3 Limitations
The CAMNavi SDK only operates on ICAM-500.
To disable the web service before program ICAM-500 with CAMNavi SDK since
web service control video bus and I/O of ICAM-500 for web utility. Follow the
instruction of chapter 3 to disable the web service.
System requirement ICAM-500-10R/W, HDMI, USB3 hub
OS Linux Ubuntu 18.04
Language Python 3.6
Jetpack version 4.4.1(Mono camera) 4.5.1(Color camera).

Chapter 2
2ICAM-500 SDK
Architecture

ICAM-500 Programming Guide 4
2.1 ICAM-500 Web Service
ICAM-500 could use Web browser (Chrome) to operate from its web service. The
service use ICAM-500 restful API to control functions of ICAM-500 device.

5 ICAM-500 Programming Guide
Chapter 2 ICAM-500 SDK Architecture
2.2 ICAM-500 Web Service and CamNavi2 SDK
Operation
ICAM-500 web service uses CamNavi2 SDK to control ICAM-500 device. Only one
instance could control ICAM-500 functions. If developer use SDK to writing python appli-
cations, web service should turn off to release SDK control.
This flow chart shows start/stop web.service decision path.

ICAM-500 Programming Guide 6

Chapter 3
3Operation Flow

ICAM-500 Programming Guide 8
Use ICAM-500 python SDK should turn off web service.
1. Temporary stop web service.
$ sudo systemctl stop web.service
2. Stop iCAM-500 web service persistently.
$ sudo systemctl stop web.service
$ sudo systemctl disable web.service
$ sudo systemctl disable autoui.service
3.1 Open/Close Camera Flow

9 ICAM-500 Programming Guide
Chapter 3 Operation Flow
3.2 Image Acquisition

ICAM-500 Programming Guide 10
3.3 Image Trigger Flow

11 ICAM-500 Programming Guide
Chapter 3 Operation Flow
3.4 HW trigger Control flow

ICAM-500 Programming Guide 12
3.4.1 Software trigger

13 ICAM-500 Programming Guide
Chapter 3 Operation Flow
3.5 Lens Focusing Control

ICAM-500 Programming Guide 14
3.5.1 Digital Input flow
Other manuals for ICAM-500 Series
1
Table of contents
Other Advantech Digital Camera manuals