08-02-2019 01:17 PM
Hello,
This is my first post at the forum and maybe someone can help me.
I am switching some output-pins on a cDAQ based system with USB connection to my PC
Just switching on 1 output take about 35 ms but compared to the speed of the USB-interface this seems to be very long. I am using a cDAQ system which has a USB 2.0 interface which has a transfer-rate of 480 Mbps.
Can somebody explain why this should take so long and if there are possibilities to improve this?
I have attached my test-program.
Best regards,
Wamor
08-02-2019 01:34 PM
Try adding a Start Task outside of your loop. Auto-starting the task is going to take a while. For what it's worth, this code gives me an "elapsed time" of between 0 and 1 running on simulated hardware.
08-02-2019 01:55 PM
Hello BertMcMahan,
Thank you for your quick response. I tried your suggestions but without luck.
Still I have a delay of about 30 ms. Running on simulated hardware also gives me an "elapsed time" of about 0 or 1.
Running the program on a Digital output-port on cDAQ hardware I got a delay of about 30 ms.
With regards to the USB 2.0 speed this is a lot of "overhead time".
Any idea how this can be improved?
Regards,
Wamor
08-02-2019 02:44 PM
Look in the Find Examples >>> Hardware IO >>> DAQmx >>> DO
For a "continuous" example.
Not all hardware can do that so it may be a limit of your hardware.
Ben
08-02-2019 02:45 PM
What device are you using? I just tried with a USB-6218 and got a delay of 1ms.
mcduff
08-02-2019 02:56 PM - edited 08-02-2019 02:59 PM
Hello mcduff,
Thank for replying.
I am using a cDAQ-9178 chassis with a NI-9375 I/O-card.
Regards,
Wamor
08-02-2019 02:58 PM
Hi Ben,
Thanks for replying.
I will have a look to the suggested examples.
Regards,
Wamor