11-06-2008 12:37 PM
I'm trying make a simple task using the DAQmx board verion 6520. I want enable a relay and disable from the .net interface. using the code below I can activate a relay but I dont know how I can disable.
Any Ideias ?
digitalWriteTask = new Task();
sLine = string.Format("{0}/{1}/{2}", sNameDevice, "port1", "line1");
digitalWriteTask.DOChannels.CreateChannel( sLine, "TimeOutWhite", ChannelLineGrouping.OneChannelForEachLine );
writer = new DigitalSingleChannelWriter(digitalWriteTask.Stream);
writer.WriteSingleSampleSingleLine(true, true);
led1.Value = true;
Regards,
Alexandre A.
11-07-2008 09:13 AM
11-07-2008 09:51 AM
yes,
I made a code using a timer control to disable the relay with false without sucess.
digitalWriteTask = new Task();
digitalWriteTask.Control(TaskAction.Start);sLine =
string.Format("{0}/{1}/{2}", sNameDevice, "port1", "line2");digitalWriteTask.DOChannels.CreateChannel(
sLine,
"TimeOutWhite", ChannelLineGrouping.OneChannelForEachLine);
writer = new DigitalSingleChannelWriter(digitalWriteTask.Stream);writer.WriteSingleSampleSingleLine(
true, false);
11-07-2008 09:57 AM
11-10-2008 04:24 AM
The hardware works fine. I able to disable and enable relays using Measument & Automation Application without problem. My problem is try make this work using .net API. When I run my code to enable no problem but when I trying disable the relay the process run without errors but nothing happen in the board.