04-01-2024 12:54 PM
hello everyone, i have a issue with labview, i am using a scan string to separate the input string about some result of one test
but i can't to separate the input string with the function scan from string
if someone can help with the code what i need to place on the function scan from string to separate each test result in separate strings
Thank you
04-01-2024 01:08 PM
I would recommend using Spreadsheet String to Array instead of Scan from String for this.
You will need to change the delimiter to a comma.
Also, is there a chance you're located in a place where the default decimal separator is a comma instead of a period? That can confuse both Scan from String and the spreadsheet string to array function unless you compensate for it.
Also, if you can post a full VI that we can run that shows the problem that's a lot better than posting a picture. Save it back to ~2018 version if you're on a more recent version since not everyone updates to the most recent one.
04-01-2024 01:11 PM
Try using %e instead of %f. This is to tell the Scan From String to use Scientific Notation instead of a simple Floating Point.
04-01-2024 01:30 PM
The other part of the Vi is only the run test of a equipment
i have changed the scan from string to spreadsheet to array and it works but i want the entire number with decimals, can help with the code what i need to place to get all the number?
thanks
04-01-2024 01:48 PM - edited 04-01-2024 01:50 PM
I finally got around to being able to test this inside of LabVIEW. Your code worked fine for me. My suspicion is that your system is configured to use a comma as the decimal place instead of a period. You need to add %.; to the beginning of your format string in order to tell the Scan From String to use the period as the decimal place. Your full format string should be "%.;%f,%f;%f;%f;%f;%f;%f". But as previously stated, you will be better off using Spreadsheet String To Array.
EDIT: I did test this with using "%,;" at the start of the format and got the same results of the OP. With that information, I cam 99% sure this is in fact the issue.
04-01-2024 02:10 PM
Thank you sir, i have made the change to spreadsheet array like your image and it works
the values are placed with comma but for me it's fine, i have the info from the test separated in array, now i can work with that information.
Thank you very much for your help