LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to delete Trailing zeros in a string array

I am reading data from RS232 port and storing the values in an array of 16 nos. Then converting the array of numbers into string using 'number to fractional string" function with precession 2  and sending the data string to Table. I am printing this table further for report generation.
I am unable to remove the trailing zeros as i am defining precession 2 which is not needed for all the numbers in the table.
 
Please help me how to remove the trailing zeros after decimal point which is very much necessary for report generation.
 
regards
Prasanna Kumar N M
 
0 Kudos
Message 1 of 5
(11,037 Views)

Use format into string in a FOR loop with a format specified of %#f. See attached example (LabVIEW 7.0)

Message Edited by altenbach on 10-14-2006 05:40 AM

Download All
Message 2 of 5
(11,034 Views)

Dear sir

Thankyou very much for your reply.

Please go through teh vi attached.

Actualy the array input will be converted into 2D array and then converted into table string. I want to remove the zeros from the string which i am sending to table.

thanking you

prasanna Kumar N M

 

 

0 Kudos
Message 3 of 5
(10,995 Views)
prassana,

altenbach's suggestion is correct.  If you are using a 2-D array simply use two for loops. See attached VI.
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
Message 4 of 5
(10,982 Views)
Dear Doug M
 
Thankyou very much for your kind help. I got the things worked as per requirement.
 
Thanky you once again.
 
Wish you happy Deepavali (Festival of Light a big festival in India)
 
Prasanna Kumar N M
 
Message 5 of 5
(10,955 Views)