Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5361

Application runs very slow using localization

$
0
0

I use LabWindows/CVI 2013 SP2.

Attach to the post :
http://forums.ni.com/t5/LabWindows-CVI/Application-runs-very-slow-using-localization/m-p/1876041/highlight/false#M56513

I have already use the "LoadLocalizedPanel" function in the pass (since CVI 4.0.1),
without so much problems.

After a long time without need to use multilangage functions (LabVIEW developments),
I need to use it again.
So I take again the old process, and go one.

Since 2 years now, many problem appears.

After the problems with "User Interface Localizer" tool,
now, I have got the same problem as LucaTesi.

Especially, when I use NI PCI or PXI boards (with "EveryNCallback" mixed to a personnal productor / consumer process).
Not when I use FIFO with Ethernet Compact RIO (but only 2 applications).
Not when I use only RS communication (but only few applications).

My ".uir" are not big (< 300 ko), and they are few panels inside (< 5), and with few controls inside each.

My "main" panel use a tab with several options, and with one with 4 "tree" controls inside.
We also use some dynamic interfaces (NewPanel and NewControl functions).

My acquisition is at 1kHz (on 32 channels), and the recorevy data is at 4 Hz.
The outputs are just some manual ones (not periodic, not inside software loops...).

I observe the same problem, all seems to run perfectly (acquisition, displayings, orders, graphs, saving data, monitorings ...).

But not when I open, for example, a simple personalized "About" panel (logo, adress, tel, email, etc...).
N.B. :
The problem is also the same for all the superposed panel (ex: data order panel, data information panel, etc...).

If I use only "LoadPanel" (so french panel), all is OK.

When I use english translations (".lwl" < 10 ko and ".lwd" < 4 ko) with :
- LoadLocalizedPanel
- or LoadLocalizedPanelEx (..., __CVIUserHInst, ...)
- or LoadPanel + LocalizePanel
the same trouble, the recovery time grow up, all seems very very slow :
- for example : a simple "cancel" button (DiscardPanel), is play only 5 s later the keypress

In advance, thank a lot for your help.

==========================================

I give the solution I found to avoid (but not completly) my problem and keep my multilanguage software.

I keep the "*.lwl" files of "User Interface Localizer" tool.

And I open them with "INI" file function,
and treat them just before display them (like someone propose in another post ... Thank),
througt some "SetCtrlVal", "Set...Attribute" (Panel, Menu, Ctrl, Table...), "ReplaceListItem", etc....

I do only what I need and treat only the data that I understand (so too few things).

But if someone have a better idea, please inform to me by a reply of this post.

And more the source code of this function, why not ?

==========================================

Like I try to explain in my previously, I read the "*.lwl" like a "INI" file.

Check into all the panels, the menus, the controls elements (throught ATTR_..._CONSTANT).

For each of them, I check if a section exist on the "INI" file.

I try to detect some special keyword ("Title", "Label", "Default", etc...) in the item name,
and that in function of the value of the "Type" item.

If them are not exist (I keep the initial attribute).
Else, I apply the data item to the attribute of the element ("SetPanelAttribute", "SetCtrlVal", "SetCtrlAttribute", etc...).

N.B. :
====
I have not treat the 1srt section "[LWCVI Language Resource File ]".
And I have not understood the "Flags" item name (checksum ??? TBD).

Example :
=======
...

[P_Commande] : PanelName
Flags = "@f" : TBD ???
Title = "Instruction" : SetPanelAttribute (panel, ATTR_TITLE, data item)

[P_Commande_NomSection] : PanelName_ControlName
Type = 3 : generic string control style
Flags = "Efee" : TBD ???
Label = "Section name" : SetCtrlAttribute (panel, Panel_Control, ATTR_LABEL_TEXT, data item)

...

I hope that this will answer your request.

==========================================

Does the problem appears also in a smaller project ?
I do not kwow (it is not yet some huge : just a manual mode).

Now, it is very difficult to export, even, a few part of the code project (industrial application).
And wich one?
And any case, all the sofware parts are impacted (there is some translation everywhere).

For the size of the number of elements (analog, digital, .... data), it seems to have an impact.
Why ? Panels, menus, controls refreshing ? Software memories ?
But, where is the acceptable limits ?

Without this translation module (only LoadPanel),
I have several customers which use this application without troubles, but in French,
or throught my own module, all was allright, now we still have some trouble.

It seems that the final solution, would to have native french UIRs and english UIRs.
And forget to use UIRs translation module.


Viewing all articles
Browse latest Browse all 5361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>