Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultanious Data aquisition

Hello everyone, here I am once again with a problem that I can't seem to figure out. Before I start posting screen shots I will try and explain what I am trying to accomplish. In an earlier thread I was trying to figure out how to generate trigger pulses based on N number of pulses being read in from a stepper motor. N number of pulses is directly proportional to a x and y position of a gimble that is being controlled by a stepper motor. Given that I have to acquire a single sample from two analog inputs every time n number of pulses are generated I needed a function that would count the pulses and spit out a pulse on the respective counter output. I have since resolved that problem but now I am having a problem actually acquiring the pulses. I am trying to acquire the pulses simultaneously such that the daq card is armed to only acquire when it receives the trigger pulse and then spits out the data into an array. I have a function that takes the two respective data points and calculates a resultant and phase angle. This data is then passed off into a shift register such that the data is saved through the number of iterations that it takes to acquire 300 data points for one scan. Once the inner for loop is finished executing the data is passed on to a case structure that is controlled by logic that determines if the outer for loop is on an even or odd iteration. The reason for this is the Gimble that I am using is scanning in a manner where it goes from left to right and then right to left. The array needs to be reversed such that the respective data being displayed on the intensity chart will be in the right orientation. So the inner loop is to generate the array for the horizontal displacement and the outer array is to generate the step in the vertical direction for the image I am trying to produce.That is basically what I am trying to accomplish in a nutshell. I have had this program working rather well but since I have made some modifications to it nothing seems to be working right including the pulse tick counter trigger pulse generator deal. I am so fundamentally confused at this point I would appreciate any insight into what is wrong with my approach. I will post a link to my previous thread such that if anyone reading this would like some background information they will have a resource. I would appreciate any and all suggestions that may lead to a workable solution. Thank you all for your time.

 

here is the link to my other thread

http://forums.ni.com/ni/board/message?board.id=40&message.id=4717

 

Here is the front end of the program I am trying to put together

 

here is the block diagram

 

0 Kudos
Message 1 of 2
(2,939 Views)
I am working with fezline on resolving this issue through phone-based technical support at NI.  When we are done working on the application, we will post the code to the forum in case anyone is interested in the resolution.  In the meantime, if anyone would like to share any feedback on fezline's program, it would be appreciated!
 
Thanks,
Elizabeth L.
Applications Engineer
National Instruments
Message 2 of 2
(2,902 Views)