02-20-2020 08:01 AM
Hello, I have recently completed a program for a pendulum that is supposed to display on an XY graph, but nothing is shwoing. I was wondering if anyone could point out what I've done wrong?
Thanks 🙂
Solved! Go to Solution.
02-20-2020 08:08 AM - edited 02-20-2020 08:15 AM
Hi Isobel,
did you even try to debug your VI?
Which output do you get from your formula node? Use probes or create additional array indicators to check them…
Why do you even stick to this C code when you could do the same with pure LabVIEW functions?
02-20-2020 08:09 AM
Attach a VI, not a picture!
We can't run or inspect a picture to try to figure out what is going wrong.
02-20-2020 08:15 AM
Here it is
02-20-2020 08:37 AM
Put probes on your wires. It seems to be getting stuck in the script block. I don't know why. At first I thought it was because your control is zero, but giving it a value of 2 didn't help.
You'd be better off getting rid of that and using real LabVIEW functions.
02-20-2020 10:19 AM
Your syntax of the for loop is wrong, in the "test expression" you have "i, steps" and it should be "i == steps".
Not that this will solve all your problem, but at least the formula node doesn't gets stuck.
Saludos.
02-20-2020 10:52 AM - edited 02-20-2020 11:10 AM
Actually I think it should be "i <= steps", which tells it to repeat the loop as long as i is less than or equal to the number of steps.
Edit: I realize now it should be "i < steps", since steps = 10000 and that's also the sizes of the arrays, so we want i to stop at 9999.
02-20-2020 11:02 AM
Yes, you're right, that makes it work.
Saludos.
02-20-2020 11:25 AM
Thank you!!