1:11 pm
August 5, 2015
I ran into an issue where I curve fit a thermistor to a 3rd order polynomial. I don't find a x^y function so I wrote a subvi that's essentially a for loop with a shift register to do that. It doesn't work, it just outputs zero. When I copy the code into the parent VI it works fine. I get the same result on a UNO and a MEGA. If I take out the serial writes it seems to work fine run on Windows.
I'm attaching the working and non-working code. I'm running LV2015 and 1.0.0.19 version of the toolkit.
Thanks,
Andrew
6:01 pm
March 12, 2015
Hi Threelock;
Thanks for bringing this to our attention. I still need to do some deeper debugging, but at a first glance, it seems the issue is related to the character "^" on the indicator "x^power" inside the power.vi subVI. Recently we have added protection against bad characters like that on control names, but we may have missed that for subVI declarations as that goes through a different code execution branch. I haven't tried it on the Arduino yet, but in looking at the intermediate generated code, it seems that if you change that variable name from x^power to x_power, for example, it will work. Can you give that a try? If that indeed fixes the problem, I will look into extending that protection against bad characters on control/indicators names for subVI declarations as well and rolling that fix into the next release.
Thanks again and sorry for the inconvenience.
Filipe
Cheers
Filipe
6:28 pm
August 5, 2015
Yes, that fixed it!
Also, glad I'm not crazy. I didn't mention it before, but I spent some time making multiple levels of subvi's in a dummy program to see if that was the problem somehow, but couldn't recreate my issue outside of that specific program. The indicator label didn't even occur to me.
Thanks!
45
1 Guest(s)