ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Byte Array To String numbers

Solved!
Go to solution

interesting I wonder if it looks like a negative 48 to the string indicator.

0 Kudos
Message 11 of 21
(3,869 Views)

You can right-click the string indicator and uncheck 'Enable Wrapping' for one solution.

 

Another option I use when getting these 'null-terminated' strings is Search and Replace:

 

CleanNullTerminatedString.png

0 Kudos
Message 12 of 21
(3,869 Views)

 


@Delphin25 wrote:

Oh yeh that totally makes sense.

I bet if I get the resize done properly it will display on one line.

ie the pNmae size parameter comes back as 11 though I didnt save that with the default trick you showed my so you couldnt see that.

Must ba a way to link that retval back into the the array or the string.  I know Labview doent want you to resize arrays  but has a way to do it I'll read up on it now.  


Ahhhh pName Size

 

Just add this

trim string.png


"Should be" isn't "Is" -Jay
Message 13 of 21
(3,866 Views)

kool idea for trimming. thanks

I cant find any enable disable wrapping though? using version 7, may upgrade soon.

Trying to figure out how to add an array length input to the array before I display it?

This will be a sub VI for customer to use so trying to keep it simple and resonablly bulletproof.

The previous contractor made a freaking mess of it.

0 Kudos
Message 14 of 21
(3,862 Views)
Solution
Accepted by topic author Delphin25

 


@Delphin25 wrote:

kool idea for trimming. thanks

I cant find any enable disable wrapping though? using version 7, may upgrade soon.

Trying to figure out how to add an array length input to the array before I display it?

This will be a sub VI for customer to use so trying to keep it simple and resonablly bulletproof.

The previous contractor made a freaking mess of it.


Easy enough- Aren't contractors fun Smiley Very Happytrim string.png

 


"Should be" isn't "Is" -Jay
Message 15 of 21
(3,857 Views)

Jeff that looks nice but I cant figure out what that thing is you put in there. lloks like an array reshape or extract or something?

0 Kudos
Message 16 of 21
(3,855 Views)
Array subset> Hey--- Laura F what happened to the insert picture and the whole format bar?????

"Should be" isn't "Is" -Jay
Message 17 of 21
(3,849 Views)

Kool the array subset works nicely.

Still not sure what your first thing was looks like a string function of some kind maybe???

Thanks again this is looking like it will work.

0 Kudos
Message 18 of 21
(3,844 Views)

Oh I found that its a string subset like the array subset.. Either way I have my solution and I'm off to lunch.

Thanks a million for all the help guys you solved my problem and I learnd a great deal more about array and string manipulation in Labview!!!

0 Kudos
Message 19 of 21
(3,840 Views)

Your quite welcome.

 

It looks like your DLL function is passed a pointer to the array[256] you created and pre-filled with\00's. The function then replaced the values with data leaving the nul charaters at the end.  I bet you could have initialized the array with spaces, 0d32, and used "trim whitespace.vi" to remove the extra characers. Smiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 20 of 21
(3,828 Views)