jgarciallamas Posted December 18, 2006 Report Share Posted December 18, 2006 Hi, Hope you can help me to find what I'm doing wrong, please see the small attached vi. I'm just trying to convert spreadsheet string to an array of numbers with 1 digit precision but I don't know what I'm doing wrong, I think the format string input is o.k but I'm at this point I'm doubting of everything . Thanks for your support. cheers, Jose. Download File:post-662-1166458178.vi Quote Link to comment
crelf Posted December 18, 2006 Report Share Posted December 18, 2006 ...at this point I'm doubting of everything . Looks fine to me. You might want to change the representation of either the array constant or the array indicator to get rid of the implicit coersion, but other than that, it's fine. Quote Link to comment
thols Posted December 18, 2006 Report Share Posted December 18, 2006 The VI works fine. What doesn't work? Edit, dammit your fast Crelf! Quote Link to comment
Doon Posted December 18, 2006 Report Share Posted December 18, 2006 i think this is a simple indicator formatting issue, Quote Link to comment
crelf Posted December 18, 2006 Report Share Posted December 18, 2006 Edit, dammit your fast Crelf! That's the beauty of my RSS feed Remember, formatting only modifies the reperesentation of the data. In memory, numbers all look the same. Let's be very clear and careful about the terms we use here: formatting does not modify the representation of the data - the representation of the data is not the same for all numbers. Representation refers to whether a number is a DBL, SGL, U32, I64, etc, and that's very important. What formatting does do is modify the way the data is displayed, and not the actual number itself. Quote Link to comment
Mellroth Posted December 18, 2006 Report Share Posted December 18, 2006 Hope you can help me to find what I'm doing wrong, please see the small attached vi. I'm just trying to convert spreadsheet string to an array of numbers with 1 digit precision but I don't know what I'm doing wrong, I think the format string input is o.k but I'm at this point I'm doubting of everything . Hi, I think your problem is that you are using the wrong decimal point. Try the formatting string "%.;%f" instead. This willl force LabVIEW to use a period as decimal character. In my opinion it is good practice to always specify the decimal character explicitly, since different computers can have different settings. There is also no need to tell LabVIEW to only read 1 decimal, since it is only a matter of display. /J Quote Link to comment
jgarciallamas Posted December 18, 2006 Author Report Share Posted December 18, 2006 Hi, thanks for your fast answers. Yes, by changing the "format&precision" parameters to 1 digit precision the array values are shown the way I'd like but still there is a problem, in fact the function is rounding the decimal to 0, please see attached image file. thanks again, Jose. Quote Link to comment
crelf Posted December 18, 2006 Report Share Posted December 18, 2006 ...but still there is a problem... No offense Jose, but what exactly is it that you want to be displayed? Quote Link to comment
jgarciallamas Posted December 18, 2006 Author Report Share Posted December 18, 2006 Hi, don't worry crelf, the key is that if you see the spreadsheet string, for example first value is 7.0 and the first array value also is 7.0, no problem so far but the second value from the spreadsheet string is 7.3, and here are my doubts, the corresponding value of the array is 7.0 so they don Quote Link to comment
Mellroth Posted December 18, 2006 Report Share Posted December 18, 2006 for example first value is 7.0 and the first array value also is 7.0, no problem so far but the second value from the spreadsheet string is 7.3, and here are my doubts, the corresponding value of the array is 7.0 so they don Quote Link to comment
jgarciallamas Posted December 18, 2006 Author Report Share Posted December 18, 2006 Hi JFM, yes, you are right, the format string you mentioned works fine. Again thanks all for your understanding and patience :worship: Great group of people at LAVA forum. cheers, Jose. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.