EasyManuals Logo

Advantech ICAM-520 Series Programming Guide

Advantech ICAM-520 Series
64 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #58 background imageLoading...
Page #58 background image
ICAM-500 Programming Guide 52
4.7 module board
4.7.1 class Board
4.8 module digitalio
4.8.1 digital I/O code slice
# Get camera instance.
camera = cn2.get_device_by_name('iCam500')
# Open camera device
cn2.advcam_open(camera)
# Setting do0 parameters
camera.dio.do0.op_mode = 0 # DO op mode: user output
camera.dio.do0.user_output = 0 # DO low, DI high
camera.dio.do0.reverse = 0
# Setting di0 parameters
camera.dio.di0.register_event(di_handler) # Register di0 signal handler
camera.dio.di0.mode = 1 # Enable DI mode
camera.dio.di0.source = 1 # DI in rising edge
camera.dio.di0.debounce_time = 100
camera.dio.do0.user_output = 1 # DO high, DI low
time.sleep(1)
camera.dio.do0.user_output = 0 # DO low, DI high
# Verify DI handler invoke times
assert Counter == 1
# Close camera
cn2.advcam_close(camera)
di event handler
# Digital input signal handler
def di_handler(*arg):
global Counter
Counter += 1
class board.Board(camera)
ICAM-500 board I/O control module
dio
Digital I/O control instance.
type: DigitalIO

Other manuals for Advantech ICAM-520 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Advantech ICAM-520 Series and is the answer not in the manual?

Advantech ICAM-520 Series Specifications

General IconGeneral
BrandAdvantech
ModelICAM-520 Series
CategoryDigital Camera
LanguageEnglish

Related product manuals