Well, this just gets stranger. The error message displayed in your screenshot does not appear anywhere in the A20 file. We definitely need to see what line, inside A20, that the program stops on. We may need to add some debugging logic.
Wrong i/o definition of program number settings!!!!
-
cosmingabriel94 -
July 19, 2017 at 10:26 AM -
Thread is marked as Resolved.
-
-
SkyeFire
i found that the message in the screenshot seems Err_MSG(16).
if you look in the file that keeps the translations for every language, you find that the string " $MSG_T.KEY[]="WrongFirstPrgNrDefinition" " refers to that message.the program halt possably caused by:
a message set throught Err_MSG() and it is a "stop" message the A20 routine stops in the end of "Err_MSG() " (if type <> #notify) on a halt.I think this is what triggers the message but i have no idea how to fix the cause
kind regards,
NoMad -
The problem is, that's NOT the right error message. If you look at the photograph that was posted previously, the message text displayed is quite different from the $MSG_T.KEY value set in for Error 16 in the A20 program.
-
[size=1em]KEY and actual message text are not necessarily the same strings,[/size][size=small] but they do both belong to same message.[/size]
[size=1em]in this case message is displayed by KEY rather than hard-coding exact message text into message...![/size]
[size=1em]this is an example of modular programming, it decouples source code of one program from complexity of generating messages in many languages (no need to place different cases right in this program module).[/size]
[size=1em]"key" is just a "unique ID" used to find correct message (note, this is STRING type) and usually it lacks any formatting of human language (such as spaces) to avoid confusion with spoken language.[/size]
[size=1em]when message is triggered, KSS searched for that string key in the "Items" table of KUKA_TAB.MDB and exchanges this string ID for numeric one. [/size]
[size=1em]Finally using numeric ID, it looks in "Messages" table. There are several hits (one for each language: German, English, Chinese...). Then[/size][size=1em] message is displayed using actual text that corresponds to KEY but matches presently selected GUI language.[/size]
-
[size=2]this message is generated when ERR_MSG(16) is called...[/size]
[size=2]this seem to be used in function DIG_OUT() which does not know what to do with PRG_NO.FIRST_BIT being zero. [/size]
[size=2]in KRL arrays start with 1 so A20 does not know what to do with $OUT[0].[/size] -
Well, I'll be -- never played with the database-based messages.
-
looks like no commissioning is carried out, PRG_NO is declared in DAT file and first bit is initialized with zero value:
DECL DIG_OUT_TYPE PRG_NO={FIRST_BIT [size=1.45em]0[/size],LENGTH 4,PARITY 0,CODING 1} -
ok guys, so we modified in A20.dat the value of the first bit from 0 to 1 and it works. Thank you so much for your help. I would like to know how you figured it out or where did you search for this error because i think it would help me in the future. Thanks a lot again
-
not sure what you mean - everything was explained in the thread
-