11-17-2015 03:27 PM - edited 11-17-2015 03:28 PM
Hi,
I am using DAQmx in C# without Measurement Studio, and I am trying to synchronize a two-axes stage with a camera. AO0 provides voltages to the X axis and AO1 provides voltages to the Y axis. The camera would take one frame after receiving a digital pulse.
The sudo code of take a video would be like this:
loop
{
// Supply AO0 with vx1
// Supply AO1 with vy1
// wait for xx us
// Supply AO0 with vx2
// Supply AO1 with vy2
// wait for xx us
// Trigger the camera
}
I am new to this and after looking at couple examples, I found the logics in most examples are quite different than what I am trying to do. It would be very helpful if somebody could answer my questions below:
1. How do I implement a "// wait for xx us" function based on a hardware timer (preferrably the internal 20MHz clock)?
2. Is there any way to control execution time of one loop iteration, cause that means I can control the frame rate of the video?
Thanks,
Joe
11-18-2015 06:06 PM
Hi joehsiao,
Thank you for posting in the discussion forums. As you know, you posted in the forum Measurement Studio for .NET Languages, so most of our expertise is in using Measurement Studio. However, I will do my best to try to help you. Which development environment are you using, and which hardware are you using?
11-19-2015 09:34 AM
Hi Tina,
Sorry about posting the questions in the wrong forum. Could you point me to a more appropriate one?
I am using a legacy PCI-6502E card on the developement machine. On the production machine I plan to put two PCIe-6323 on it, but I figured the same code sould run fine on both cards. The software enviroment is DAQmx 15.1 and Visual Studio C# 2015.
11-19-2015 02:32 PM
@joehsiao wrote:
Hi Tina,
Sorry about posting the questions in the wrong forum. Could you point me to a more appropriate one?
I am using a legacy PCI-6502E card on the developement machine. On the production machine I plan to put two PCIe-6323 on it, but I figured the same code sould run fine on both cards. The software enviroment is DAQmx 15.1 and Visual Studio C# 2015.
http://forums.ni.com/t5/Multifunction-DAQ/bd-p/250
You will probably find that the majority of people use LabVIEW.