Ü4
unread,Jun 3, 2008, 8:40:13 AM6/3/08You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
NI6221????? ?VB??AO???? ??????
?AO???????? ??????????
???????????
??ao????????????????
Private Sub AO(double MV) Dim numSampsPerChannel As Integer numSampsPerChannel = samplesPerBufferTextBox.Text ReDim data(numSampsPerChannel)' Create the DAQmx task. DAQmxErrChk DAQmxCreateTask("", taskHandle)
' Add an analog output channel to the task and check to see whether there is only ONE task. DAQmxErrChk DAQmxCreateAOVoltageChan(taskHandle, "Dev1/ai0", "aoChannel", -10#, 10#, DAQmx_Val_VoltageUnits2_Volts, "")
' Write to the desired channel(s).
DAQmxErrChk DAQmxWriteAnalogF64(taskHandle, numSampsPerChannel, True, 10#, _ DAQmx_Val_GroupByScanNumber, MV1, sampsPerChanWritten, ByVal 0&)
MV=MV1 Exit Sub ErrorHandler: If taskIsRunning = True Then DAQmxStopTask taskHandle DAQmxClearTask taskHandle taskIsRunning = False End If
generatingLabel.Visible = False CmdStart.Enabled = True CmdEnd.Enabled = False MsgBox "Error: " & Err.Number & " " & Err.Description, , "Error"End Sub
?????????~