LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with COMTRADE Data Conversion and Plotting in LabVIEW 2024 Q1 Executable

Solved!
Go to solution

In the development phase within LabVIEW 2024 Q1, I successfully handle data from the serial port by converting it to the COMTRADE format and plotting the graphs without any issues. However, when I compile the application into an executable, this functionality does not work as expected. What could be the cause of this problem? Are there specific settings or additional components I need to pay attention to?

0 Kudos
Message 1 of 9
(149 Views)

Hi Yusuf,

 


@yusuf.eker wrote:

In the development phase within LabVIEW 2024 Q1, I successfully handle data from the serial port by converting it to the COMTRADE format and plotting the graphs without any issues.


Are you talking about this one?

 


@yusuf.eker wrote:

However, when I compile the application into an executable, this functionality does not work as expected. What could be the cause of this problem?


What do you mean by "does not work as expected"?

Why is it a problem for you?

(In other words: what is the actual problem?)

Best regards,
GerdW


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

Yes, I use electrical power toolkit.

Labview.png

As shown in the image above, no graphics are generated in my executable application, and the data is missing in the .cfg file in Comtrade format. However, when running on the development platform, the data appears correctly on the graphical display, and the .cfg file contains the expected data.

0 Kudos
Message 3 of 9
(117 Views)

My guess is that something in the handling of the serial port or the data conversion is failing. What? Well without seeing the actual code in question, knowing if your executable is running on the same machine as your LabVIEW IDE or another one, and several more such things, my further guesses are as useful as anyone else's.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 9
(104 Views)

Hi Yusuf,

 


@yusuf.eker wrote:

As shown in the image above, no graphics are generated in my executable application, and the data is missing in the .cfg file in Comtrade format.


I guess you implemented some error handling in your code - did you?

 

Which errors do you get when running your executable?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(102 Views)

Hello,
Actually, I found the root of the problem. I disabled the "Use localized decimal point*" option in the settings. There is no issue in the compiler, but in the executable version, this setting is not applied, and values like 0.002 are treated as 0. My operating system uses "," as the decimal separator. Do you have any solution for this?

0 Kudos
Message 6 of 9
(47 Views)
Solution
Accepted by yusuf.eker

Hi Yusuf,

 


@yusuf.eker wrote:

Actually, I found the root of the problem. I disabled the "Use localized decimal point*" option in the settings. There is no issue in the compiler, but in the executable version, this setting is not applied, and values like 0.002 are treated as 0. My operating system uses "," as the decimal separator. Do you have any solution for this?


I see two options:

  1. Implement the data conversion (string to numeric and vice versa) in your code to not use the localized decimal point, but use explicitely defined format codes like "%.;%f"…
  2. You need to set an INI key in the INI file next to your executable. I suggest to define the "useLocaleDecimalPt" key as described here. You can include your own INI file in the BuildSpecs for your executable…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(37 Views)
Solution
Accepted by yusuf.eker
@yusuf.eker wrote:

Hello,
Actually, I found the root of the problem. I disabled the "Use localized decimal point*" option in the settings. There is no issue in the compiler, but in the executable version, this setting is not applied, and values like 0.002 are treated as 0. My operating system uses "," as the decimal separator. Do you have any solution for this?


There are many solutions to this and it depends how you did the parsing in your program.

 

- The old style nodes like Fract/Exp String to Number have a boolean input to tell them if they should honor the localized decimal character or always use a decimal point

 

- Scan from String can be instructed to use a specific decimal character by prepending %.; to the format string

 

- You can copy the useLocaleDecimalPt=False to the ini file for your built executable

 

This last option is just a quick band aid. It will make all string functions in LabVIEW assume that floating point numbers use a decimal point which could cause failures in other parts of your application. It also will make your frontpanel display all floating point number with a decimal point, something a user who has set his system to use decimal comma, or who doesn't know that anything else actually exists, could confuse.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 9
(35 Views)

Thanks guys both of you.
I used "%.;%f" as format codes and it fix my problem. Thanks for your all helps.

0 Kudos
Message 9 of 9
(29 Views)