JustAnIntern
Member
Good day whoever is reading this.
I am fairly new to PLC's in general and, as an Intern my assignment is to figure out how the new HMI framework in JS/HTML from Beckhoff works.
This also includes their Event system from the PLC, which has a lot of functionality in the HMI with regards to filtering and Confirmation.
The problem I encountered is that when I create my own EventClass with Events in the PLC, and I translate these into my desired language, I am then unable to get their translated values to show. I will always get the original strings or an empty string.
I tried getting the desired language string by using their function 'F_GetEventText()' and several of their other functions that have the desired effect. However these all return empty strings or the original string. Never the translation.
Some of my code I tried:
Both of these do not work for me.
What am I doing wrong here? All help would be greatly appreciated.
Greetings from the Netherlands.
I am fairly new to PLC's in general and, as an Intern my assignment is to figure out how the new HMI framework in JS/HTML from Beckhoff works.
This also includes their Event system from the PLC, which has a lot of functionality in the HMI with regards to filtering and Confirmation.
The problem I encountered is that when I create my own EventClass with Events in the PLC, and I translate these into my desired language, I am then unable to get their translated values to show. I will always get the original strings or an empty string.
I tried getting the desired language string by using their function 'F_GetEventText()' and several of their other functions that have the desired effect. However these all return empty strings or the original string. Never the translation.
Some of my code I tried:
Code:
// option 1: returns an empty string
_BallufError.CreateEx(TC_Events.Kremer_Events.BallufError, TRUE, 0);
_BallufError.RequestEventText(19, _translatedString, SIZEOF(_translatedString));
// option 2: returns original text
F_GetEventText(19, _BallufError, _asyncResult);
IF NOT _asyncResult.bBusy AND NOT _asyncResult.bError THEN
_asyncResult.GetString(_eventSourceName, SIZEOF(_eventSourceName));
_BallufError.ipArguments.Clear().AddString(_eventSourceName);
END_IF
Both of these do not work for me.
What am I doing wrong here? All help would be greatly appreciated.
Greetings from the Netherlands.