01-25-2018 10:32 AM
Hello,
Is there an example in C# avaible how to route a sample clock to a PFI terminal?
I use PCIe6353 card and i want several tasks running with the same internal clock and i want to use the same clock for an external device. In de user manual of the DAQ X series is spoken that routing sample clock to output terminal is possible but not how.
01-29-2018 04:25 AM
Hey Leonderthaler,
I wasn't able to find an example but the NI-IMAQmx C Reference guide contains some useful information.
I am no C expert but this may help you out: http://zone.ni.com/reference/en-XX/help/370471AJ-01/mxcprop/attr0584/
Best,
-Jelmer.
01-29-2018 12:40 PM
I think you want the ExportSignals class: http://zone.ni.com/reference/en-XX/help/370473J-01/ninetdaqmxfx40ref/html/allmembers_t_nationalinstr... . This class is accessible from an instance of the Task class (via the Task.ExportSignals property).
01-30-2018 10:20 AM
Hello Daniel,
How do i use the ExportSignals property?
This mine example code:
public class ClockTask
{
public ClockTask()
{
}
public void StartTask()
{
Task task = null;
try
{
task = new Task();
task.DIChannels.CreateChannel("/dev1/port0/line0", "", ChannelLineGrouping.OneChannelForEachLine);
task.Timing.ConfigureSampleClock(""
, 1000
, SampleClockActiveEdge.Rising
, SampleQuantityMode.FiniteSamples
, 1000
);
task.Control(TaskAction.Verify);
task.ExportSignals.SampleClockOutputTerminal = "/dev1/PFI4";
task.Start();
}
catch (DaqException daqException)
{
CloseTask(task);
}
}
}
privatevoid CloseTask(Task task)
{
if (task == null) { return; }
task.Dispose();
task = null;
}