LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Code could not be generated correctly for this VI". What does it mean?

What do I have to do to fix this problem?
0 Kudos
Message 1 of 6
(3,528 Views)
In what context did this error message appear? What version of LabVIEW are you using? Attaching the VI that generates the error would also be a big help.
Message 2 of 6
(3,528 Views)
Gustavo,
Did you get my email response on Friday to your service request #9576-PXJ845?
I also sent you the re-saved ol.vi.

Zvezdana S.
National Instruments
0 Kudos
Message 3 of 6
(3,528 Views)
I am getting this same error which you have already helped somebody else with. Could you be kind enough to help me too. I am attaching my VI, it contains only a Mathscript node whose commands  work perfect when typed individually on the Mathscript window.

--
Regards,
Karan Batra
0 Kudos
Message 4 of 6
(3,244 Views)
You should probably start a new thread and reference this thread rather than post to a thread that's almost 5 years old. With respect to your issue, the problem line is " [mx(iter),nmax] = max(abs(x));". I don't really know what your code is doing, and that doesn't look like MathScript syntax. It's also unclear why you say that the commands work perfectly when typed individually into a MathScript window. Entering that line by itself into a MathScript window generates the same error. Are you confusing this with Matlab?
0 Kudos
Message 5 of 6
(3,220 Views)
That solved my problem. I just had to introduce another temporary variable. So looks like "max" can be used to get the index as well as the maximum number but not straight into an array position, a temporay variable is needed.

Anyways to be truthful, I didn't try all the statements in Mathscript window, but I tried several of them. It would be good if while we run a VI containing Mathscript node, to get a list of errors instead of the error "Code could not be..........". Thanks for your support and sorry for being "partially true".
0 Kudos
Message 6 of 6
(3,202 Views)