From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

If I recall the ARINC init code correctly that comes with the cards correctly, it creates a warning when run to say that it passed ok (error code = 1, boolean = F) but actually errors with a different value if the code failure. This seems to be fairly common practice for programmers in some industries and can be very annoying if you are merging errors because the first "warning" on the error cluster in a mergre may not be the reason for the VI not behaving as intended. I would guess that the code is definitely written to perform as you see on purpose!

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 1551 of 2,571
(10,475 Views)

Just found this golden nugget:

Rube.png

 

I'll just replace it with a simple Increment. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1552 of 2,571
(10,306 Views)

@Yamaeda wrote:

 

I'll just replace it with a simple Increment. 🙂


Which is exactly what the compiler would do.  Of course that does nothing for the readability.

Message 1553 of 2,571
(10,290 Views)

@Yamaeda wrote:

Just found this golden nugget:

 

 

I'll just replace it with a simple Increment. 🙂

 

/Y


nevermind


"Should be" isn't "Is" -Jay
0 Kudos
Message 1554 of 2,571
(10,275 Views)

Smiley Indifferent

 

RG invert.png

 

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 1555 of 2,571
(10,217 Views)

I just hope that wasn't me! that looks just like the sort of thing I would have written just to be sure!Smiley Frustrated

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 1556 of 2,571
(10,170 Views)

Granted, the problem description was a bit vague but here are two different solutions offered by the community.

 

One is arguably simpler that the other. 😄

 

Solution A:

19k of code, 60k of block diagram objects, four loops, three case structures, clusters, building arrays, bundling, unbundling, concatenating tunnels, a rainbow of datatypes (orange, green, blue, pink, ...). etc... 😮

 

 

Solution B:

5.7k of code, 16k of block diagram objects, two loops, one case structure, 100% I32. 😄

 

So... who can simplify it even more? 😉

 

Message 1557 of 2,571
(10,111 Views)

Comparing if two 2x2 2D arrays are equal. (seen here).

 

Message 1558 of 2,571
(10,001 Views)

@altenbach wrote:

Comparing if two 2x2 2D arrays are equal. (seen here).

 


Should this be set to "compare aggregates"? There should be an indicator on the equal prim if it is ... sounds like an idea for the exchange.

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 1559 of 2,571
(9,987 Views)

Compare elements would have a 2d wire coming out instead of a scalar.

Message 1560 of 2,571
(9,982 Views)