I am new using DAQ max NI, I am trying to generate 1ms digital output pule but I am geting the 1.6ms.
if I want 10ms I am geting 16ms.
Could you help me to resolve this problem please?
If you want deterministic control of the DAQ device, do not use timed loop on Windows because the Windows OS is unreliable. Instead you should use hardware timed DIO. This way, the DIO on/off will be controled by the hardware clock within the DAQ device.
Open the Example Finder from Help > Search for examples and refer to Hardware Input and Output > DAQmx > DIO for example VIs.
Thank you for your response.
I want to take advantage of the While loop to generate DO or AO at timing a want to also including inputs to make decisions. the program gave me the signal a want but the timing are not correct. I joind my simplified program if you can help me to set the timing. If it can help, I am using DAQmax NI USB-6353.
I don't see what is relation of tour post to my NI problem, but somone can help there is an Labview image of my code because I am using labview 2018.
If you're going to try to run a deterministic control loop at 1 kHz on a Windows machine over a USB connection, you're going to have lots of problems. USB is a fairly bursty and non-deterministic bus. Even if you achieve the rate you want, your loop jitter will be bad. USB DAQ devices also don't support hardware-timed single point mode, which is really what you'd want to use for that fast a control loop. If you can reduce your loop rate to maybe 100 Hz, you may have a chance of maintaining the loop speed with an acceptable jitter. You'll have to characterize that on your setup with your hardware and can expect the numbers you get to change based on whatever other processes/applications are running simultaneously. Else, you're probably out of luck unless you're willing to transition to a real-time operating system and PCI(e)/PXI(e) hardware or the RIO platform.
If you do want to try running on Windows with your current hardware, the best (but still not great) performance you'll get will come if you: