11-23-2015 03:53 AM
Solved! Go to Solution.
11-23-2015 04:15 AM - edited 11-23-2015 04:16 AM
Hi,
I thought it would be easier using a for loop in mathscript
Why do you need a Mathscript node to calculate a simple circle?
Why not use basic LabVIEW code? Why not employ polymorphism to get rid of loops as much as possible?
(Just following the formulas given in your PDF. Because of square and root functions it will only work for one quadrant.)
11-23-2015 05:44 AM
Hi GerdW,
Thank you very much for your suggestion, it makes things much easier.
I 've only got one problem to fix. Since I need to project the pattern on a seperated computer screen, I guess I have to use the IMAQ DRAW function to implement it. but the problem is the data type of these two terminals are different. The coordinate of IMAQ DRAW is 4 elements, and the outcome from the bundle cluster is 2 dimensions. Do you have any idea how to pass the data from the bundle to the IMAQ DRAW in 1-D array?
Many thanks!
Brian
11-23-2015 05:49 AM
Hi Raul,
the problem is the data type of these two terminals are different. The coordinate of IMAQ DRAW is 4 elements, and the outcome from the bundle cluster is 2 dimensions.
In my snippet I calculate the X and Y coordinates on the diameter of a circle. When you need more/other coordinates for IMAQ you need to calc them. Use my snippet as a starting point…
As I don't have IMAQ installed I cannot check what kind of data you need!
11-23-2015 10:54 AM
Thanks! the problem has been solved.
Cheers,