From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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

@CA The reuse library gets divorced from source around these parts.  

 

Guess what I'm getting paid to do.

 

@W, benchmark it against anyone's code but Christian's 


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

@JÞB wrote:

 

 

@W, benchmark it against anyone's code but Christian's 


No need to benchmark Christian's solution, test the two solutions you've already provided and you'll see the non property node method is somewhere around 50 times faster than the enabled case using a property node.  There are of course improvements that can be made.

 

Oh and removing the write property helps but the non property method is still about 20 or 30 times faster than the single read.

Message 1892 of 2,571
(10,577 Views)

@Hooovahh wrote:

@JÞB wrote:

 

 

@W, benchmark it against anyone's code but Christian's 


 

 

Oh and removing the write property helps but the non property method is still about 20 or 30 times faster than the single read.


With or without the FP in memory?


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

Calling it as an inlined subVI, with the front panel closed, taking time stamp information after reading control values, and stopping the time stamp before writing back to the indicators.  Thread swapping is really what kills a property node speed.

0 Kudos
Message 1894 of 2,571
(10,539 Views)

@Hooovahh wrote:

Calling it as an inlined subVI, with the front panel closed, taking time stamp information after reading control values, and stopping the time stamp before writing back to the indicators.  Thread swapping is really what kills a property node speed.



 

That is not what I expected from a p-node property that does not load the FP into memory on an inlined chunk.

 

I (possibly incorrectly,) assumed that the conversion from 
"Bytes" to "String to send to the transfer buffer for display to the user"

would be rather finely optomized


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

Then of course I caught this gem

Capture.PNG

Spoiler
Capture.PNG

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

@JÞB wrote:

That is not what I expected from a p-node property that does not load the FP into memory on an inlined chunk.

 


On a side note, this would still be a useful idea. 😄

0 Kudos
Message 1897 of 2,571
(10,497 Views)

Capture.PNG

I think the size of the disable structure says enough


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

Seen here

 

So we have many cases of a state machine, and every single state is indicated by a particular pattern of three booleans.

 

Apparently, some think they need to place separate instances of local variables for all three indicators in every single case, and to keep things clean, the terminals should be outside, completely disconnected from the code.

 

(further comments are in my reply in the thread linked above)

 

localitis.png

0 Kudos
Message 1899 of 2,571
(10,376 Views)

@altenbach wrote:

Seen here

 

So we have many cases of a state machine, and every single state is indicated by a particular pattern of three booleans.

 

Apparently, some think they need to place separate instances of local variables for all three indicators in every single case, and to keep things clean, the terminals should be outside, completely disconnected from the code.

 

(further comments are in my reply in the thread linked above)

 

localitis.png


I can rationalize that (but not justify). When you modify the state machine and add another case (to the non-type-def'd enum) you can just right click and choose "duplicate case". If using locals the duplication creates more locals. If using the actual control, the controls will be duplicated.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 1900 of 2,571
(10,346 Views)