12-31-2019 03:49 AM
Hello,
I have a cDAQ-9174 device, controlled via USB. Is it possible to initiate a simple task on this device, such that I can then unplug the USB cable and have it run autonomously?
For example, I'm using this code to have a relay cycle on and off repeatedly:
string[] ch = DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.DOPort, PhysicalChannelAccess.External);
Task t = new Task("A");
t.DOChannels.CreateChannel(ch[0], "", ChannelLineGrouping.OneChannelForAllLines);
t.Timing.ConfigureSampleClock("", 0.5, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
DigitalSingleChannelWriter tdw = new DigitalSingleChannelWriter(t.Stream);
tdw.WriteMultiSamplePort(true, new byte[] { 0, 1 });
t.Start();
As soon as I unplug the USB cable (or the PC that initiated this task goes to sleep) though, the device goes into a not-ready state (Power, Active leds are lit; Ready led not lit) and stops cycling the relay. Is there any way to have it continue cycling the relay, as in the above code, without being controlled by a host PC?
12-31-2019 08:04 AM
You could get an embedded cDAQ controller and command it to do this. It would require writing an application to run on the cDAQ and the PC to talk with it. Personally, I would go with a cRIO, which would mostly be an equivalent to the embedded cDAQ except you have more control over the IO due to the FPGA backplane.
12-31-2019 04:49 PM
Thanks, I'll look into these options.
So, I understand there's no way to do this with just my existing cDAQ-9174 (it cannot do any autonomous output without having an active connection to a host PC), correct?
01-01-2020 01:54 PM
@cinf6464 wrote:So, I understand there's no way to do this with just my existing cDAQ-9174 (it cannot do any autonomous output without having an active connection to a host PC), correct?
That is correct.