02-03-2021 12:55 PM - edited 02-03-2021 12:57 PM
@AndyKron wrote:
I'm handling strings because I'm trying to get code as it was given to me working while trying to understand LabVIEW so everything is pretty chaotic.
And there is your problem. My first advice here is to make sure you know exactly what the requirements are (how the messages should be formatted, the checksums, etc.). Then throw this monstrosity away and start fresh. There is just WAY too much in this single VI that I can tell at a glance should just be thrown out. Make life easier on yourself and break it down into easy to figure out steps. Each of those steps should probably be a VI.
EDIT: I have nothing against using strings. But with what I have gleamed from this code is that you are mostly trying to deal with flattened strings. So have your inputs be a flattened string (ie strings in a "Hex" display, and make sure the display style is visible).
02-03-2021 01:28 PM
This is how I got the code which I'm ready to rip up now. BTW: what is feeding the chkEmptyString vi? I found it once, deleted and now I have to stop looking for it because the tiny icons have strained my eyes to the point of a headache.
02-03-2021 03:51 PM
@GerdW wrote:
Why are there SO MANY Rube-Goldberg constructs in your code???
That was the first question when I saw strings converted to numbers then converted back to strings in their first post...
02-04-2021 02:41 AM
@RTSLVU wrote:
@GerdW wrote:
Why are there SO MANY Rube-Goldberg constructs in your code???
That was the first question when I saw strings converted to numbers then converted back to strings in their first post...
That's not too bad, if you want to convert a string with hexadecimal text to a binary character with that number. For instance, convert "00" (0x30 0x30)to "\00" (0x00).
02-04-2021 07:11 AM
It seems to be working now. That number conversion between strings was messing up after the number got "too big". I deleted that first string concatenator and put everything in the second one. There was also a hi/lo split I did with the check sum and I "forced" that to work by first converting the number to int8 before the type cast. I just started swinging the hammer. As anything that has evolved the vi works but is inefficient, complete with vestigial organs.