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
C= 1
class
board.Board
(
camera
)
ICAM-500 board I/O control module
dio
Digital I/O control instance.
type: DigitalIO
Содержание ICAM-500 Series
Страница 1: ...Programming Guide ICAM 500 Series Industrial AI Camera ...
Страница 6: ...ICAM 500 Programming Guide vi ...
Страница 7: ...Chapter 1 1 Introduction ...
Страница 9: ...Chapter 2 2 ICAM 500 SDK Architecture ...
Страница 12: ...ICAM 500 Programming Guide 6 ...
Страница 13: ...Chapter 3 3 Operation Flow ...
Страница 15: ...9 ICAM 500 Programming Guide Chapter 3 Operation Flow 3 2 Image Acquisition ...
Страница 16: ...ICAM 500 Programming Guide 10 3 3 Image Trigger Flow ...
Страница 17: ...11 ICAM 500 Programming Guide Chapter 3 Operation Flow 3 4 HW trigger Control flow ...
Страница 18: ...ICAM 500 Programming Guide 12 3 4 1 Software trigger ...
Страница 19: ...13 ICAM 500 Programming Guide Chapter 3 Operation Flow 3 5 Lens Focusing Control ...
Страница 20: ...ICAM 500 Programming Guide 14 3 5 1 Digital Input flow ...
Страница 21: ...Chapter 4 4 CamNavi2 SDK API Manual ...