LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino signal to labview (HELP!)

Hi lamela,

 

DecimalStringToFloat doesn't like strings starting with text (like "mV = "). Reading the LabVIEW help might be useful in your case 🙂

 

And I still don't see any LFs in your received string…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 26
(2,220 Views)

Replacing Serial.print() with Serial.println() in the Ardunio code will add a \n to the end of the transmitted string.

0 Kudos
Message 12 of 26
(2,199 Views)

Thanks for the replies!

Can you tell me these in step by step? Thank you!

0 Kudos
Message 13 of 26
(2,159 Views)
In the sketch, replace print with prinln. This does not take much skill. Did you write the sketch yourself or copy it from somewhere? Have you studied the arduino programming language at all?
0 Kudos
Message 14 of 26
(2,142 Views)

I've done that but the wavechart is still showing spikes?

The reading from the double precision float will also go back to 0 after displaying the correct reading?

0 Kudos
Message 15 of 26
(2,137 Views)
And did you get rid of the incorrect during to number conversion? You did not show your block diagram.
0 Kudos
Message 16 of 26
(2,145 Views)

Here is it! So I have to remove the decimal string to number conversion?

0 Kudos
Message 17 of 26
(2,121 Views)

Hi lamela,

 

So I have to remove the decimal string to number conversion?

No, we never told you so…

But we told you to read the help for that function and to "clean up" your string before trying to convert to number that way!

 

Here is it!

You still use BytesAtPort! Why don't you work with a TermChar as has been discussed in several posts by now?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 26
(2,042 Views)

Ok. I've added termchar but I'm still unsure of the function.. Is it something like this?

What should be corrected here?

Download All
0 Kudos
Message 19 of 26
(2,035 Views)

Hi lamela,

 

Ok.. I've added termchar

So why do you add that TermChar twice? (SerialPortInit and this property node?

Why do you set the TermChar to "0" at SerialPortInit?

Why do you set the TermChar to "termchar" in the loop? Why do you tolerate a coercion dot for this input?

Why do you set the termchar in each iteration of the loop?

Did you study the example VIs coming with LabVIEW at all?

 

I'm still unsure of the function

Which function do you talk about?

 

Is it something like this?

Well, you still don't parse your string correctly. How does the string look like before number conversion? What is the result of the conversion? Did you use probes to check all this?

 

The NumericConversion function expect a string, which ONLY consists of numbers. It does NOT handle anything else and will not handle any equal signs or unit strings!

 

To give you an idea of what might work:

check.png

(This snippet expects a LF as termchar!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 20 of 26
(2,029 Views)