From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Length Error! Help with Keyence Micrometer output

Solved!
Go to solution

That's unreadable. If you have the same problem, you should have been able to fix it with the information above. Please provide some details other than you don't know how to fix something.

0 Kudos
Message 11 of 16
(1,008 Views)

I use command : M0,0CR

but the responde is ER,M0,20

 

untitled.JPG

0 Kudos
Message 12 of 16
(1,004 Views)

The CR in your string is not a termination character. Delete it. The termination character is the one you see in the box labeled 'termination character'. A \r is a carriage return. a \n is a line feed.

0 Kudos
Message 13 of 16
(995 Views)

Thank you so much T__________T

0 Kudos
Message 14 of 16
(989 Views)

Hello. I am encountering the same problem as you were. May I know what termination character you finally used? Thanks!


@JMed wrote:

Turns out it was indeed an issue with the carrage return.  I appended my output string with a carrage return constant, and the output command was then processed correctly I received a string in return!

 

 

 

Now I have a new problem 😛   Forgive me for the newb question,  but I need to convert this string:

 

M1,+25.3561

 

 

into a decimal number.  I've already used "String Subset" and currently I have a string that looks like:

 

25.35621

 

But I now want to turn that into a floating point data.  I've tried using "Decimal String to Number" but that only gives me the integeer 25.

 

Is there any way to take a string such as "25.35621" and convert it into a floating point number?

 

 

 

All help is much appreciated!



 

0 Kudos
Message 15 of 16
(763 Views)
As has been been discussed numerous times, Decimal String to Number is just incorrect. Read the context help that you should always have open. Use the correct function or the scan from string without the unnecessary during subset.
0 Kudos
Message 16 of 16
(747 Views)