ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
03-04-2020 07:12 AM
I have inserted my equation in my formula node, which should be right, i stil cant, start my program, the rest of the program should be working, set into the right shift register and se on.
03-04-2020 07:19 AM
Why can't you start your program?
Is there an error message?
Is the start button is broken?
Your mouse can't move over the button so you can press start?
Instead of showing us a picture of a piece of code that we can't run or debug, why don't you attach the actual VI so we can see for ourselves what is going on?
03-04-2020 07:41 AM
The error is not what is says, its none of you requested errors
03-04-2020 07:59 AM - edited 03-04-2020 08:04 AM
I'm not sure why you marked my message as the solution.
This message should probably be the solution because I can now tell you what's wrong and how to fix it now that I see actual code and can play with it.
"The error is not what is says, its none of you requested errors". That sentence doesn't make any sense
When I click on the broken run arrow, it tells me Formula Node: undefined variable. When I click on that error, I can go to which formula node has the problem.
The problem is that your one formula nodes uses variable F_d, F_g, F_b, and F but you don't define their types in the node or at the output tunnel.
Add the word float in front of those four variables. They will be declared and the broken run arrow will be fixed once you click out of it.
float F_d = -cd*A*(p_ude*V**2)/2*(V/abs(V));
float F_g = -mb*g;
float F_b = (p_ude-pb)*Vb*g;
float F = F_g+F_d+F_b;
a = F/mb;
03-04-2020 09:37 AM
Thanks it worked, but some still doesnt work, when i run it, is doesnt show the density, acceleration etc.
03-04-2020 09:51 AM
Well many of your indicators are outside the while loop which means they won't show anything until the while loop stops.
That is one of the key principles of data flow.
So if you want to show some parameter while the code is running, then place the indicator for that inside the while loop.
03-04-2020 11:26 AM
They still show NaN, i think there is another issue aswell
03-04-2020 12:25 PM
Post your latest VI.
Is it possible some of your control values are set at zero and throwing off calculations?
Make sure any values that need to be in controls are set at meaningful values and saved as default before saving your VI and attaching.
03-04-2020 01:23 PM
Hi MC,
@MC_forrest wrote:
They still show NaN, i think there is another issue aswell
NaN is a valid value for floating point datatypes and is shown for reasons. Did you check those reasons?