BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@Yamaeda wrote:

Nice tweak to mine, haven't thought about Logical shift being able to take arrays. 😄

/Y


 

 

Yeah, but won't both be folded to equal constants in real code?

0 Kudos
Message 1291 of 2,635
(11,157 Views)

@Yamaeda wrote:

Nice tweak to mine, haven't thought about Logical shift being able to take arrays. 😄

/Y



Well there is no real difference in diagram size, and the compiler might even generate the same code for both versions (not sure). 😄

 

A benchmark would be interesting... (Yes aboud folding by placing a control on N).

 

For truly gigantic arrays, the first version can be parallelized while the second version might be abe to take better advantage of SIMD instructions. (?)

 

 

0 Kudos
Message 1292 of 2,635
(11,146 Views)

@altenbach wrote:

@Yamaeda wrote:

Nice tweak to mine, haven't thought about Logical shift being able to take arrays. 😄

/Y



Well there is no real difference in diagram size, and the compiler might even generate the same code for both versions (not sure). 😄

 

A benchmark would be interesting... (Yes aboud folding by placing a control on N).

 

For truly gigantic arrays, the first version can be parallelized while the second version might be abe to take better advantage of SIMD instructions. (?)

 

 


Not that likely.  Aren't rotations prohibited in SSE?

 

(Over my head here- but, allways learning!)


"Should be" isn't "Is" -Jay
0 Kudos
Message 1293 of 2,635
(11,136 Views)

@JÞB wrote:

Not that likely.  Aren't rotations prohibited in SSE?


 I have no idea, that's why I said "might". (here's a list of instructions, so I guess you are right)... 😉

0 Kudos
Message 1294 of 2,635
(11,130 Views)

Hey guys.

As some people here know, I'm not that experienced in LabVIEW.
Some time ago I needed to do a function (subroutine) that had to split a string received from a serial buffer into several substrings. My token is a comma ( , ).

This is used to read sensors information from a certain firmware. As you can see below, I'd have to change the number of substrings (our firmware documentation provides that) in every single application (since this is a minor monitoring system, we use lots of them).

 

Before...

split_buffer_string_.png

 

... and after ...

 

split_buffer_string_simplified.png

 

The thing here is:

I feel really stupid.
There's somehow to improve this new function (and make me feel more stupid)?

 

By the way, really nice thread. I was browsing the answers in a spare time yesterday, and I could see very good tips and tricks.

 

Regards

 

 

Mondoni
0 Kudos
Message 1295 of 2,635
(11,074 Views)

Hi Joao,

 

what about using SpreadsheetStringToArray with a delimiter of ","?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 1296 of 2,635
(11,069 Views)

I don't see what you are pointing, exactly.

Can you please post a snippet? I'd be happy 😄

 

Regards

Mondoni
0 Kudos
Message 1297 of 2,635
(11,069 Views)

Like this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 1298 of 2,635
(11,061 Views)

Hi Joao,

 

the point is that something little like that will split your string into smaller pieces:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 1299 of 2,635
(11,059 Views)

Well, if you want to retain the same functionality (cluster output!) use what I do in the top part.

 

(your code is at the bottom unchanged. Both give the same result)

 

 

Download All
Message 1300 of 2,635
(11,055 Views)