LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send DAC and collect analog input to wire to xy graph in realtime

Hi,

 

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.

 

Thanks,

 

Louise

0 Kudos
Message 1 of 4
(1,843 Views)

Hi,

 

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.

0 Kudos
Message 2 of 4
(1,832 Views)

Hi Louise,

 

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.

Kind Regards

Michael
NIUK Application Engineer
0 Kudos
Message 3 of 4
(1,773 Views)

Hi,

 

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.

 

Thanks,

 

Louise

0 Kudos
Message 4 of 4
(1,768 Views)