brahma
2008-01-07 10:40:07 UTC
dear sir,
currently my requirement is to perform On/Off operations using digital output channels....
im using code like this
DAQmxCreateTask("",&g_DWriteTaskHandle); DAQmxCreateDOChan(g_DWriteTaskHandle,"Dev1/port1/line0","",DAQmx_Val_ChanPerLine); DAQmxStartTask(g_DWriteTaskHandle); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle, 1, 10.0, true, NULL); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle, 1, 10.0, false, NULL); DAQmxStopTask(g_DWriteTaskHandle); CleanupTask(g_DWriteTaskHandle);
DAQmxCreateTask("",&g_DWriteTaskHandle1); DAQmxCreateDOChan(g_DWriteTaskHandle1,"Dev1/port1/line1","",DAQmx_Val_ChanPerLine); DAQmxStartTask(g_DWriteTaskHandle1); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle1, 1, 10, true, NULL); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle1, 1, 10, false, NULL); DAQmxStopTask(g_DWriteTaskHandle1); CleanupTask(g_DWriteTaskHandle1);
but the problem is it is responding well for the first digital line "Dev1/port1/line0", but when it comes to second channel "Dev1/port1/line1" it is not responding well....
so please can you suggest me in the right direction
Thanks in Advance
currently my requirement is to perform On/Off operations using digital output channels....
im using code like this
DAQmxCreateTask("",&g_DWriteTaskHandle); DAQmxCreateDOChan(g_DWriteTaskHandle,"Dev1/port1/line0","",DAQmx_Val_ChanPerLine); DAQmxStartTask(g_DWriteTaskHandle); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle, 1, 10.0, true, NULL); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle, 1, 10.0, false, NULL); DAQmxStopTask(g_DWriteTaskHandle); CleanupTask(g_DWriteTaskHandle);
DAQmxCreateTask("",&g_DWriteTaskHandle1); DAQmxCreateDOChan(g_DWriteTaskHandle1,"Dev1/port1/line1","",DAQmx_Val_ChanPerLine); DAQmxStartTask(g_DWriteTaskHandle1); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle1, 1, 10, true, NULL); DAQmxWriteDigitalScalarU32(g_DWriteTaskHandle1, 1, 10, false, NULL); DAQmxStopTask(g_DWriteTaskHandle1); CleanupTask(g_DWriteTaskHandle1);
but the problem is it is responding well for the first digital line "Dev1/port1/line0", but when it comes to second channel "Dev1/port1/line1" it is not responding well....
so please can you suggest me in the right direction
Thanks in Advance