Attribute VB_Name = "Module1"
 
 
 Declare Function TCUSB18A_Open Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByRef Adresse As String) As Long
 Declare Function TCUSB18A_OpenN Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByRef Adresse As Long) As Long
 Declare Function TCUSB18A_Refresh Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB18A_Input Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByRef Data As Long) As Long
 Declare Function TCUSB18A_Output Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Data As Byte) As Long
 
 Declare Function TCUSB18A_BitInput Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Entree As Long, ByRef Data As Byte) As Long
 Declare Function TCUSB18A_Counter Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Entree As Long, ByRef Data As Byte) As Long
 Declare Function TCUSB18A_BitReadBack Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Sortie As Long, ByRef Data As Byte) As Long
 Declare Function TCUSB18A_BitOutput Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Data As Long, ByVal Etat As Long) As Long
 
 Declare Function TCUSB18A_Config Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Data As Byte) As Long
 Declare Function TCUSB18A_Pos Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByRef Data As Long) As Long
 Declare Function TCUSB18A_ResetPos Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 
 Declare Function TCUSB18A_WdgRun Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB18A_WdgStop Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB18A_WdgRearm Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 
 Declare Function TCUSB18A_ResetPort Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB18A_CyclePort Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB18A_Close Lib "TCUSB18A.DLL" (ByVal NModule As Long) As Long
 Declare Function TCUSB18A_Version Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByRef Data1 As Byte, ByRef Data2 As Byte) As Long
 
 Declare Function TCUSB18A_AnaIn Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Voie As Byte, ByRef Data As Integer) As Long
 Declare Function TCUSB18A_AnaInVolts Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Voie As Byte, ByRef Data As Double) As Long
 Declare Function TCUSB18A_AnaInmA Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Voie As Byte, ByRef Data As Double) As Long
 Declare Function TCUSB18A_AnaOut Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Voie As Byte, ByVal Data As Integer) As Long
 Declare Function TCUSB18A_AnaOutVolts Lib "TCUSB18A.DLL" (ByVal NModule As Long, ByVal Voie As Byte, ByVal Data As Double) As Long

 
 
 
 
'code d'erreur genérés par ces fontions
'0 :    OK
'1 :    Numero de serie incorrect
'2 :    N° de module incorrect
'3 :    Pas de module TCUSB18A détecté
'4 :    Module non initialisé
'5 :
'6 :
'7 :    erreur a la fermeture
'8 :    erreur sur consigne analogique

'V1.0: 16/04/09: 3CC-DB: Release
'V1.1: 28/06/12: 3CC-JT: Modif parametre TCUSB18A_AnaOut ByRef-->ByVal
