I am using a DAC to send a voltage ramp to then collect the resulting voltage analog signal. I have created a loop which iterates every 100 ms. I then ideally want a 10 ms delay before coolecting the resulting analog signal. When running the vi the voltage ramp increases and the analog signal is collected by the program but the analog signal does not update at a constant rate. I am not sure why, or how I can set it up to take a reading at a given time. Also how to I get the voltage ramp to cycle and only stop when promted by a button?
I also then need to plot the DAC (x axis) and analog input signal (y axis) together in real time. I know that I need to use shift registers to keep an array for x and then another for y and with each loop append the new elements to the array, bundle array into cluster then wire to xy graph. I can't get the graph to work at all and I am not sure where I am going wrong.
I have attached the vi.
I have now managed to connect the xy graph out to update in realtime. Howver when I run the experiment I am not seing any data on the graph.
I am not sure if it is because I have not been able to sync the DAC and AIN data correctly.
Its good to hear you have solved some of the problem.
I have tried to run the code you attached but and having trouble doing so as I can't seem to find the labjackud.dll anywhere. Is this something you could possibly attach on a reply to this post? I can then see if the code is running correctly.
Just so I am clear, you are sending a signal to LabVIEW and then using code you have built withing LabVIEW to write the data to a graph at a given rate? How often did you want it to be updated? If this is not quite correct a more detailed explanation on what you are trying to do would be great.
After a week of playing around with the VI and trying different things, I have now managed to get the xy graph to display the data. I had the data wired up incorrectly to my DAC. I have attached the latest VI. It seems to be working properly now.