10-27-2023 02:39 AM
As shown in the attached file, only the second line is calculated. Could you also teach me how to modify the vi program?
10-27-2023 02:46 AM
You don't need any Interation input on the loop if you use Autoindexing.
I have no idea what that to-from Dynamic data does, but you somehow convert a row (2 element array) into a scalar, so it is correct that you'll only get a 1D array out.
Activate the Highlight execution and Retain values lamps on the quickbar and you'll figure out what happens.
10-27-2023 03:03 AM - edited 10-27-2023 03:05 AM
Hi kozuka,
you really, REALLY (!); should forget about those FromDDT/ToDDT ExpressVIs completely!
And you should also try to replace those formula nodes with basic LabVIEW functions!
Then it becomes much easier to follow your code:
I already implements some simplifications, like replacing the lower loop by a simple IndexArray/BuildArray. (You might use ArraySubset to simplify even more!)
Your other formula nodes could be replaced by simple functions from comparison palette...
10-28-2023 04:01 PM
@kozuka32 wrote:
As shown in the attached file, only the second line is calculated. Could you also teach me how to modify the vi program?
Obviously, you seem to be coming from a text programming background and tend to gravitate to the old habits. You should never need a formula node, LabVIEW is perfectly able to do what you need graphically. Have you looked at the learning resources listed at the top of the forum? (and as has been mentioned, dynamic data and express VIs don't belong in simple array processing!)
Maye you should also explain in words what the processing is supposed to do.
It helps to fill all your controls with typical example data as default before attaching (do you know how to do that?), then explain the result you would expect from them. You did not even explain what "the second line" is. Are you talking about rows or columns?
10-29-2023 10:31 PM
Hi, Mr GerdW
Thank you for your always easy to understand explanations. I tried creating it using it as a reference, but an error occurs as shown. I thought I created it using the content you created, but what is the problem?
10-30-2023 12:01 AM
Make sure your indicators are 1D arrays, not 2D arrays.
10-30-2023 12:43 AM
Thank you for answering. My purpose is to display the results of the first line (black) and the second line (red). Currently, only the calculation results of the first line are displayed, but how can I display the calculation results of the first line on the second line as well?
10-30-2023 01:16 AM
Although it doesn't look good, you can draw the desired state if you do as shown in the attached image. Is there a better way to write it?
10-30-2023 02:00 AM
Hi kozuka,
@kozuka32 wrote:
if you do as shown in the attached image. Is there a better way to write it?
Surely there are better ways!
But now you only attached images: we cannot edit/run/debug them with LabVIEW!
Please attach your current VI so we can edit it…
Possible improvments:
10-30-2023 05:03 AM