05-24-2018 06:48 AM
Hello all,
I was looking for some help on this .vi. The goal is to update the .vi due to the following comments. I spent some time but my solution was not working out. Could anyone provide a solution so I can see how it is done. I have attached the block of code that needs updated. Thank you in advance.
1. Unnecessary use of memory. For loop shift register should be replaced with the iteration terminal.
2. Replace string output with a cluster of numerics to not have to parse the string values.
Thanks,
Phil (Working towards CLAD)
05-24-2018 09:27 AM
A short description of what this vi does, some sample input data, and a better description of what your output needs to be would help a lot.
05-24-2018 10:42 AM
If I've decrypted your code correctly, that entire mess can be replaced by this:
05-24-2018 11:47 AM - edited 05-24-2018 11:48 AM
I would recommend against a cluster of numerics. Instead, use an array of numerics. This would be a lot more scalable.
But here is how I would do the task.
05-24-2018 12:22 PM
This will get you the same format as your original VI, inspired by @paul_cardinale. However, me thinks it's best to follow crossrulz's advice.
The logic below can be simplified if you always know you have an even or odd amount of bytes.
mcduff
PS: Note that the type cast ALWAYS makes a memory copy, if you have a big data stream, make not be so good.