07-30-2013 03:42 PM - edited 07-30-2013 03:42 PM
Here is a video of a project based on USB 6218 and an accelerometer mx2125. I use the accelerometer as a remote for positioning 2 servo motors( one for rotating, one for the claw) howevere as you can see from the video the servos response is very delayed.
https://www.dropbox.com/s/a4y74ogtzsi0dle/VID_20130720_184937.mp4
How can I fix this?
07-31-2013 05:50 PM
milupas,
If you are having execution speed issues you might rethink using Express VIs, especially since you are using four, just because the Express VIs are bulky and can take a while to run. Express VIs are really good when you want to construct a program really quickly but they themselves are their own huge VIs. These VIs give you a lot of options but can operate slower because they are massive.
If you go to Help>>Find Examples... This will bring up the NI Example Finder. On the Browse tab you will see bunch of folders and you will find example code to replace your DAQ Assistant Express VIs is in the following directory: Hardware Input and Output>>DAQmx.
Functions to simulate signals can be found in the Functions Palette here:
Signal Processing>>Signal Generation
Post again if you still get the delay after you replace the Express VIs.
07-31-2013 05:53 PM
Another suggestion in replacing the Express VIs is to make your own SubVIs that do what the Express VIs are doing and then place them in your current code in the place of the Express VIs. This will keep your code clean.