Je ne sais pas quel ligne plante car c'est dès le démarrage du programme qu'il me met le message d'erreur mais je te met mon code. Si tu apperçois des anomali fais le moi savoir merci beaucoup de ton aide car j'en ai bien besoin.
Dim sampsPerChanWritten As Long
Dim test As Long
Dim taskhandle As Long
Dim delay As Double
Dim Status As Integer
Private Sub Configure_Port_Click()
Status = DAQmxCreateTask("", taskhandle)
Status = DAQmxCreateDOChan(taskhandle, "dev1/port0/line0:7", "", DAQmx_Val_ChanForAllLines)
Status = DAQmxStartTask(taskhandle)
End Sub
Private Sub Stop_Task_Click()
Status = DAQmxStopTask(taskhandle)
Status = DAQmxClearTask(taskhandle)
End Sub
Private Sub Write_Logic_0_Click()
' Write zeros or ones to the digital lines
Dim i As Integer
Dim writeArray(0 To 7) As Byte
For i = 0 To 7
' Reverse Logic
writeArray(i) = 1
Next
Status = DAQmxWriteDigitalLines(taskhandle, 1, True, 10#, DAQmx_Val_GroupByChannel, writeArray(0), sampsPerChanWritten, ByVal 0& )
End Sub
Private Sub Write_Logic_1_Click()
' Write zeros or ones to the digital lines
Dim i As Integer
Dim writeArray(0 To 7) As Byte
For i = 0 To 7
' Reverse Logic
writeArray(i) = 0
Next
Status = DAQmxWriteDigitalLines(taskhandle, 1, True, 10#, DAQmx_Val_GroupByChannel, writeArray(0), sampsPerChanWritten, ByVal 0& )
End Sub