LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating lissajous profiles from oscilloscope channels

Hello labview forum members, I am working on part of a project currently that requires me to generate lissajous profiles for the purpose of laser alignment. I have it working, but I need to make some changes and don't know how. The first issue is that my plot is being generated much too slow to be useful. The second issue is I need two plots to be on one chart that is continuously updating for the purpose of aligning the laser head. Here is my current VI and a screenshot of it after running, as well as a screenshot of the original code I am remaking. The original code refreshes the entire circles every second, but it takes like 30 seconds for mine to even make a full circle. Any help is appreciated.

Download All
0 Kudos
Message 1 of 6
(933 Views)

Hi fizz,

 


@shockfizz wrote:

The original code refreshes the entire circles every second, but it takes like 30 seconds for mine to even make a full circle.

Any help is appreciated.


Start with cleaning up…

  • What's the point in calculating 4 times the same value of "x/180*pi" with an eval node - with an input of 180 all 4 times? The result will be PI - all 4 times! And there is a PI constant available…
  • Why do you need 6 ExpressVIs to create your two XYGraphs when all you need are two bundle functions??? (See the context help of XYGraphs.)
  • Why do you initialize the device in each iteration?
  • Why don't you use subVIs instead of duplicating code?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(895 Views)
  1. Open LabVIEW.  Click on "Help".  Click on "Find Examples". 
  2. Put "Lissajous" in the Search.  Open the Example.
  3. At this point, I recommend going to the File menu and choosing "Save As" and saving the (so far pristine) LabVIEW example as a VI (with another name) in your "LabVIEW Data" folder (so you don't accidentally mess up NI's example code.
  4. Close LabVIEW.  Restart it, and open your saved copy.  Run it, study it, understand how it works, and then develop code that "does what you want".

Bob Schor  

0 Kudos
Message 3 of 6
(838 Views)

Hi Gerd, the degree to radian conversion was previously needed when the phase was not constant and was output in degrees, this was left in oversight. I have made the other changes you mentioned in cleaning up my code, which I appreciate, but I think I just need to take a different approach as this did not get me much closer to my desired output.

 

Thanks

0 Kudos
Message 4 of 6
(803 Views)

Although this does not solve your problem, many oscilloscopes allow you to XY two channels, which would at least allow you to look at the patterns on the scope.

0 Kudos
Message 5 of 6
(783 Views)

Hi Bob, thanks for the tip but I have already seen the lissajous example and know how to use context help and find examples. The lissajous example is just 5 express vi's in a while loop, and I don't see how i could get much use from it.

0 Kudos
Message 6 of 6
(768 Views)