01-28-2023 07:53 PM
I am writing a program that will test a manufactured unit. I figure the easiest way to run through really long automated test procedures is to compare bit patterns of entire frames. I have been trying to accomplish turning a read frame into a 64-bit integer for the last few hours and I just can't seem to get it to work. Does anyone have any ideas?
thanks,
Solved! Go to Solution.
01-28-2023 09:10 PM
Well, I came up with something that works but I feel like an easier way exists that I don't know about. I basically converted the 8 bytes into 64-bit integers, shifted them, and then added them together.
01-28-2023 09:56 PM
Type cast?
01-29-2023 02:28 AM
Yes, this was one of the first things that I tried. The problem is that it outputs a string. You can choose it to display as HEX, but when you try to compare a static value and the output it doesn't recognize that they are the same because of the different data types.
01-29-2023 03:13 AM
OK, I'm a little slow. I apparently didn't know how to manipulate the Type Cast correctly.
Thank you for your solution.
01-30-2023 08:04 AM - edited 01-30-2023 08:05 AM
The Type Cast is the correct way to do this. However I've seen performance is slightly better with joining of values. I didn't test the performance with shifting. When I do conversions like this I call an inlined subVI.
This is what is used in my Frame Signal conversion library.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord