Attribute VB_Name = "MdlIOC0640"
Option Explicit
''''''''''''''''''''''''''''''''''  Leadshine technology  ''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''                                 IOC0640 V1.0 函数列表                           ''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''                 初始化函数                      '''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''

Declare Function ioc_board_init Lib "IOC0640.dll" () As Long

Declare Sub ioc_board_close Lib "IOC0640.dll" ()


'通用输入/输出控制函数
Declare Function ioc_read_inbit Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer) As Long
Declare Function ioc_write_outbit Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer, ByVal ON_OFF As Integer) As Long
Declare Function ioc_read_outbit Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer) As Long
Declare Function ioc_reverse_outbit Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer, ByVal ms_time As double) As Long

Declare Function ioc_read_inport Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal m_PortNo As Integer) As Long
Declare Function ioc_read_outport Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal m_PortNo As Integer) As Long
Declare Function ioc_write_outport Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal m_PortNo As Integer, ByVal port_value As Long) As Long

'卡中断设置
Declare Function ioc_int_enable Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal funcIntHandler As Long, operate_data As Any) As Long
Declare Function ioc_int_disable Lib "IOC0640.dll" (ByVal cardno As Integer) As Long

'IO中断设置
Declare Function ioc_config_intbitmode Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer, ByVal enable As Integer, ByVal logic As Integer) As Long
Declare Function ioc_read_intbitmode Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer, enable As Integer, logic As Integer) As Long
Declare Function ioc_read_intbitstatus Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer) As Long

Declare Function ioc_config_intporten Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal m_PortNo As Integer, ByVal port_en As Long) As Long
Declare Function ioc_config_intportlogic Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal m_PortNo As Integer, ByVal port_logic As Long) As Long
Declare Function ioc_read_intportmode Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal bitno As Integer, enable As Long, logic As Long) As Long
Declare Function ioc_read_intportstatus Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal m_PortNo As Integer) As Long

'IO滤波设置
Declare Function ioc_set_filter Lib "IOC0640.dll" (ByVal cardno As Integer, ByVal filter As Double) As Long


''函数参数必须严格保持一致性
            
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''                                 IOC0640 V1.0 end of module                       '''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
