04-04-2016 02:33 AM
Hi,
I am working with an instrument to read the internal resistance of motors. the problem is that I am reading strings and I have to convert them to real.
the Instrument is working that way:
if I have a resistance of 200kohm => 200E3
20 ohm =>20 E0
2mOhm=>2E-3
I used convert to string but its arrounding my numbers.. which is impossible to work with because I need the whole number.
I also used Fract/exp to string buit this is what I am getting
You will find attached my program, please I need your help
04-04-2016 03:32 AM
Please reduce your VI to a simple example that contains typical strings as a diagram constant. and just includes your conversion and the array indicator. Unless we know how the strings look like exactly, we cannot tell what's wrong. (for example is there really a space inside "20 E0")
04-04-2016 03:39 AM
Hi,
This is the exact type of string that I am reading from the instrument
I also tryed yith the function scan from string version with %f but I am having this result
BR
04-04-2016 03:57 AM
Hi karate,
Use the attached Vi snippet and the issue will be solved. you have to select Frac/Exp string conversion so that you get the exact resistance value.
The issue is solved
Kudos welcome 🙂
Regards
Santhosh Joel
04-04-2016 05:01 AM - edited 04-04-2016 05:02 AM
Make sure you have the Fract/Exp String To Number setup to NOT use the System Decimal Point. If appears your localization uses the comma as the decimal point while the instrument uses a period. Setting that boolean to FALSE will allow you to read the strings with the period decimal point.