background image

Warranty 

All products manufactured by ICP DAS are under warranty regarding defective materials for a 

period of one year, beginning from the date of delivery to the original purchaser. 

 

 

Warning 

ICP DAS assumes no liability for any damage resulting from the use of this product. ICP DAS 

reserves the right to change this manual at any time without notice. The information furnished by 

ICP DAS is believed to be accurate and reliable. However, no responsibility is assumed by ICP DAS 

for its use, nor for any infringements of patents or other rights of third parties resulting from its 

use. 

 

 

Copyright 

Copyright ©  2020 by ICP DAS Co., Ltd. All rights are reserved. 

 

 

Trademarks 

Names are used for identification purposes only and may be registered trademarks of their 

respective companies. 

 

 

 

 

Contact Us 

If you have any problems, please feel free to contact us. 
You can count on us for a quick response. 
      Email: [email protected] 

 

 

Summary of Contents for I-8048W

Page 1: ...I 9048 I 8048W Module Linux API Reference For Linux platform V 1 0 2 April 2021 Written by Sean Hsu Edited by Cindy Huang...

Page 2: ...he information furnished by ICP DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use nor for any infringements of patents or other rights of third pa...

Page 3: ...s 20 2 1 6 Programmable Rising Falling interrupt 21 2 2 Software Introduction 23 2 2 1 Software flow chart 24 2 2 2 Recognize different interrupt service requests 26 3 API References 28 3 1 Function L...

Page 4: ...3 15 I8048W_InstallISR 43 3 16 I8048W_UnInstallISR 45 3 17 I8048W_UnFreezeINT 46 3 18 I8048W_GetLibVersion 47 Revision History 48...

Page 5: ...channel status together with 4 kV ESD protection and 1500 Vrms intra module isolation The information contained in this manual is divided into the following topics Chapter 1 Introduction This chapter...

Page 6: ..._I 97K__Series for more details regarding of I 9K series module specification jumper settings details and wiring information Refer to http www icpdas com en product guide Remote__I_O__Module__and__Uni...

Page 7: ...1 1 I O Module Dimensions All dimensions are in millimeters I 9K module with spring clamp terminal connector Left Side View Top View I 8K module with screw terminals connector...

Page 8: ...ection The metal part of the cord end terminal on the wire can be direct wired to the terminal Note The I 9048 module supports spring clamp terminal connector The spring clamp terminal connector for t...

Page 9: ...o remove the wiring from the connector 1 Use screwdriver to push the orange clip in 2 Insert the wiring into the terminal block 1 Keep on pushing Insert the wire 1 Use screwdriver to push the orange c...

Page 10: ...1 3 Wire Connections...

Page 11: ...controller and PC has been connected well and then check the I 8048W I 9048 has been plugged in the controller 3 Next check the communication between controller and PC is fine and download the demo pr...

Page 12: ...an be programmed as an interrupt input channel to invoke an interrupt on falling edges rising edges or both falling and rising edges Each channel can be eithers Isolated or Non isolated TTL Input sele...

Page 13: ...I Digital Input Channels 8 Type Dry Contact Wet Contact Sink Source NPN PNP Sink Source Wet Contact ON Voltage Level Isolated 4 30 VDC Non Isolated 0 0 8 VDC Wet Contact OFF Voltage Level Isolated 0 1...

Page 14: ...nt for the I 9048 The pin assignment for the I 9048 is shown as follows Pin 1 and 11 TTL GND ground for non isolated inputsignals Pins 2 9 12 19 8 channel digital input Pins 10 and 20 Isolated power s...

Page 15: ...ignment for the I 8048W The pin assignment for the I 8048W is shown as follows Pin 1 TTL GND ground for non isolated inputsignals Pins 3 18 8 channel digital input Pins 19 and 20 Isolated power supply...

Page 16: ...2 1 3 Block Diagram The signal flow block diagram for I 9048 is shown as follows...

Page 17: ...The signal flow block diagram for I 8048W is shown as follows...

Page 18: ...s Isolated input TTL input Isolated input default TTL input JP1 for ch0 JP2 for ch1 JP3 for ch2 JP4 for ch3 JP5 for ch4 JP6 for ch5 JP7 for ch6 JP8 for ch7 JP1 JP8 in the DOWN position will select the...

Page 19: ...l can be either isolated or TTL input for I 8048W as follows Isolated input TTL input Isolated input default TTL input JP1 for ch0 JP2 for ch1 JP3 for ch2 JP4 for ch3 JP5 for ch4 JP6 for ch5 JP7 for c...

Page 20: ...tion are listed as follows Isolated TTL Input status Digital Input Logic level Electric signal LED OPEN 1 Low OFF 0 0 8V 0 Low ON 2 5V 1 High OFF Input status Digital Input Logic level Electric signal...

Page 21: ...be programmed as one of the following types individually Rising edge interrupt input Falling edge interrupt input Rising edge and Falling edge interrupt input The Interrupt trigger types are as follo...

Page 22: ...at condition the interrupt service thread cannot identify which interrupt source is active So the interrupt signal must be hold long enough until the interrupt service thread is executed This holding...

Page 23: ...uction Users can follow the sections to understand the usage of I 9048 I 8048W Library software We offer multi functions in the I 9048 I 8048W library and users can use these functions to develop I 90...

Page 24: ...t Service Thread IST Enable falling edge or rising edge Initialize I 9048 ISR Event 2 2 1 Software flow chart Initialize I 9048 Gives all internal variables an initial value Any interrupt signal clear...

Page 25: ...e ISR and then the IST performs necessary operations collect the data and process them When the interrupt processing is completed the IST informs the kernel to re enable the hardware interrupt The fun...

Page 26: ...2 2 2 Recognize different interrupt service requests I 9048 I 8048W is an 8 channels rising falling edge programmable interrupt module It can plug into slot of the PAC controllers The section introduc...

Page 27: ...of the CPU shown in section 1 3 So their ISTs are different CPU executes different ISR when the request is from different slot Considering when the interrupts occur the situations can be divided to tw...

Page 28: ...i8048 h header file or the API functions described in the following sections for more detailed information The following is an overview of the functions provided in the LinPAC library libi8k a Detaile...

Page 29: ...interrupt status from the I 9048 modules I8048W_ Read_FallingEvent This function read falling interrupt status from the I 9048 modules I8048W_ Read_RisingEventCount This function read total count val...

Page 30: ...eters iSlot in Specifies the slot number 1 8 Return Value Return the full channel DI value Example C int byteData slotNumber 0 byteData I8048W_DI_ALL slotNumber Remarks Isolated TTL JPn selected isola...

Page 31: ...le channel DI status of the I 8048W I 9048 module Syntax C int I8048W_DI_Ch int slot int DI_Channel Parameters slot in Specifies the slot number 1 8 DI_Channel in The single channel of the I 9048 modu...

Page 32: ...is used to Enable Disable the Rising interrupt of an I 8048W I 9048 channel Syntax C void I8048W_Set_RisingReg int slot int channel int enable Parameters slot in Specifies the slot number 1 8 channel...

Page 33: ...is used to Enable Disable the Falling interrupt of an I 8048W I 9048 channel Syntax C void I8048W_Set_FallingReg int slot int channel int enable Parameters slot in Specifies the slot number 1 8 channe...

Page 34: ...singReg This function Read the rising interrupt setting status of an I 8048W I 9048 channel Syntax C int I8048W_Read_RisingReg int slot int channel Parameters slot in Specifies the slot number 1 8 cha...

Page 35: ...ead_FallingReg This function Read the falling interrupt setting status of an I 8048W I 9048 channel Syntax C int I8048W_Read_FallingReg int slot int channel Parameters slot in specifies the slot numbe...

Page 36: ...nt This function read rising interrupt status from the I 8048W I 9048 modules Syntax C int I8048W_Read_RisingEvent int slot int channel Parameters slot in specifies the slot number 1 8 channel in Spec...

Page 37: ...This function read falling interrupt status from the I 8048W I 9048 modules Syntax C int _I8048W_Read_FallingEvent int slot int channel Parameters slot in Specifies the slot number 1 8 channel in Spe...

Page 38: ...t This function read total count values of the rising interrupt occurred on an I 8048W I 9048 channel Syntax C DWORD I8048W_Read_RisingEventCount int slot int channel Parameters slot in Specifies the...

Page 39: ...This function read total count values of the rising interrupt occurred on an I 8048W I 9048 channel Syntax C DWORD I8048W_Read_FallingEventCount int slot int channel Parameters slot in Specifies the...

Page 40: ...unt This function clear total count values of the rising interrupt occurred on an I 8048W I 9048 channel Syntax C void I8048W_Clear_RisingEventCount int slot int channel Parameters slot in Specifies t...

Page 41: ...ngEventCount This function clear total count values of the falling interrupt occurred on an I 8048W I 9048 channel Syntax C void I8048W_Clear_FallingEventCount int slot int channel Parameters slot in...

Page 42: ...unction is used to initialize the driver and confirm the hardware ID of the I 8048W I 9048 module Syntax C int I8048W_Init int iSlot Parameters iSlot in Specifies the slot number 1 8 Return Value Retu...

Page 43: ...used to install a slot interrupt service thread for I 9048 Syntax C void I8048W_InstallISR int iSlot CALLBACK_FUNC IST_Function Parameters iSlot in Specifies the slot number 1 8 ISR_Function in After...

Page 44: ...slotNumber 1 int channelNumber 1 int ret 0 ret I8048W_Init slotNumber if ret I8048W_Set_RisingReg slotNumber channelNumber 1 I8048W_Set_FallingReg slotNumber channelNumber 0 I8048W_InstallISR slotNumb...

Page 45: ..._UnInstallISR This function is used to uninstall a slot interrupt service thread and disable a hardware interrupt Syntax C void I8048W_UnInstallISR int iSlot Parameters iSlot in Specifies the slot num...

Page 46: ...tion clear interrupt status of the I 8048W I 9048 channel Syntax C void I8048W_UnFreezeINT int slot int channel Parameters slot in Specifies the slot number 1 8 channel in Specifies the channel number...

Page 47: ...Reference v 1 0 2 E mail service icpdas com 47 3 18 I8048W_GetLibVersion This function to get the library version of I 8048W I 9048W Syntax C short I8048W_GetLibVersion Return Value Version number For...

Page 48: ...rence v 1 0 2 E mail service icpdas com 48 Revision History This chapter provides revision history information to this document The table below shows the revision history Revision Date Description 1 0...

Reviews: