LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

the comma separator problem in LabView

Hi!

I have done a Simulink model with Matlab and connected it with my LabView application using the Simulation Interface Toolkit.  At first all seems to be fine, but when I start sending a value to the model, Matlab sends an error message that the value is not possible to evaluate. I think the problem is that my LabView application send the decimal numeral value in the comma-separated format (ex: 5,3 ), which is not acceptable for the Matlab/Simulink model. My question is, how it is possible to change comma-separated format to point-separated format in LabView application without changing the language settings of Windows (I am writing from the eastern part of Europe, where the decimal separator is comma).

Best regasrd,

Peeter
0 Kudos
Message 1 of 8
(3,950 Views)
It depends on the conversion function, some have a boolean input where, if it has a format string you should start the string with '%.;' (without the quotes)

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 8
(3,941 Views)
before you send the string to matlab, use the string search and replace function to replace a , with a .

Paul
0 Kudos
Message 3 of 8
(3,940 Views)
I am using SIT connection manager (under Tools menu) to connect the LabView8.2 application with Simulink, so after mapping it generates the block diagram. The problem is that I can only map directly a control (slider, guage etc.), but not after modifing its value. The strange thing is that the generated block diagram is not connected with control blocks at all (I think it must be like that, because values are reaching to Simulink model). The comma problem still exists.
0 Kudos
Message 4 of 8
(3,928 Views)
What code is generated?

Screenshot would be best.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 8
(3,918 Views)
Below is my application. On the front panel are 2 sliders and controls to activate the Simulink model. On the left bottom corner is the SIT connection Manager which generated the code into the block diagram view. Somehow program takes values from sliders and forwards them to the model. But these values are comma-separated and causes Simulink model to stop with error. How can I make these values as point-separated values?

Peeter

0 Kudos
Message 6 of 8
(3,910 Views)
Oh, maybe the code was better (sorry),

however their is a setting for LabVIEW to use not the local decimal sign:
Tools->Options->Front Panel-> Use localized decimal point
Maybe you can use this one (or force simulink to use the ','


Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 7 of 8
(3,902 Views)
Now it is working, so it is no problem to control the model from LabView. Smiley Very Happy
Quite a silly mistake, ah? Smiley Happy
Thank You!
0 Kudos
Message 8 of 8
(3,884 Views)