Error codes in code builder

Discussion about Code Builder Builder and Winlog language support.
Post Reply
BGO
Posts: 15
Joined: Wed Feb 23, 2011 9:33 am

Error codes in code builder

Post by BGO »

Hi,
I am running both pro and lite versions of Winlog in the same computer.
I have a problem with the pro version, that is when an error is detected in the code by code builder, the pop up appears as follow :
Error (6) No message available [7:5]
When I use lite version, I have a message.
Tried to uninstall and reinstall the whole pro version do not solve the problem.
Do you have an idea ?
(Running Pro version 2.07.04 and Lite version 2:07:06)
Thanks in advance,
Bruno
User avatar
admin
Site Admin
Posts: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: Error codes in code builder

Post by admin »

Update the pro version to the latest release (see 2.07.06).
Download it from: www.sielcosistemi.com/download/Winlog_Setup_SF.exe
BGO
Posts: 15
Joined: Wed Feb 23, 2011 9:33 am

Re: Error codes in code builder

Post by BGO »

Hi,
Thanks for this quick reply.
Uninstalled Pro v2.07.04 and installed uploaded v2.07.06.
Still the same problem ...
User avatar
admin
Site Admin
Posts: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: Error codes in code builder

Post by admin »

Write the code that gives you problems so that I can try and find the error.

Thanks
BGO
Posts: 15
Joined: Wed Feb 23, 2011 9:33 am

Re: Error codes in code builder

Post by BGO »

Hi,
I did some testing this morning with an other PC, and results are as follow (with Lite version without key) :
-Winlog v2/07/05 already installed : Make any error in the code part of the example application give always the "no message available" message.
-Uninstall Winlog, remove the registry key Sielco, installed older version 2/06/? : make any error give undefined variable or syntax error.
-Uninstall Winlog, remove registry key, installed latest version 2/07/06 : same result as 2/07/05 (no message available).
-Uninstall Winlog, reinstall in Italian : same result.
So I think error messages seems to be missing in 2/07 version.
Do you want I ring you for follow up ?
User avatar
admin
Site Admin
Posts: 373
Joined: Tue Nov 17, 2009 1:18 pm

Re: Error codes in code builder

Post by admin »

Send me the code please.
BGO
Posts: 15
Joined: Wed Feb 23, 2011 9:33 am

Re: Error codes in code builder

Post by BGO »

You could try this one. The error is the "//" before the first int declaration (vat).
If you do a "check" (analyse current code") as is, you will see what happen when using v2.06.x or V2.07.x.
I take this code out of the examples.


function void unload()
#startup

// int vat;
int processCodedVats;
int unloadCodedVats;
int unloadCodedVatsAH;
int unloadCodedVatsIR;

while (1)

processCodedVats = GetNumGateValue("Proc_vatsIR", 0) * 256 + GetNumGateValue("Proc_vatsAH", 0);
unloadCodedVats = GetNumGateValue("Unload_vatsIR", 0) * 256 + GetNumGateValue("Unload_vatsAH", 0);

// Imposta operatore
SetStrGateValue("Unload_operator", 0, GetUserName());

for vat = 0 to 15 do

// Controlla se è stata richiesta un'avvio di procedura di scarico
if ((GetDigGateValue(IntToStr(vat + 101) + "Unload", 0) != 0) && (GetBit(unloadCodedVats, vat) == 0)) then
if ((GetBit(processCodedVats, vat) != 0) && (GetBit(GetNumGateValue("Misc_status", 0), 1) != 0)) then
IconMessageBox("Impossibile avviare la procedura di scarico, tino in trattamento", "Attenzione!", 2, 1, 1);
SetDigGateValue(IntToStr(vat + 101) + "Unload", 0, 0);
else
if (IconMessageBox("Sei sicuro di voler avviare la procedura di scarico del tino " + GetStrGateValue(IntToStr(101 + vat) + "VatName", 0) + "?", "Avvio scarico", 5, 5, 2) == 7) then
// Avvio scarico
unloadCodedVats = SetBit(unloadCodedVats, vat);
// Genera evento di avvio
SetNumGateValue(IntToStr(vat + 101) + "UnloadEvents", 0, 0);
else
SetDigGateValue(IntToStr(vat + 101) + "Unload", 0, 0);
end
end
else
// Controlla se è stata richiesta un'arresto di procedura di scarico
if ((GetDigGateValue(IntToStr(vat + 101) + "Unload", 0) == 0) && (GetBit(unloadCodedVats, vat) == 1)) then
if (IconMessageBox("Sei sicuro di voler arrestare la procedura di scarico del tino " + GetStrGateValue(IntToStr(101 + vat) + "VatName", 0) + "?", "Avvio scarico", 5, 5, 2) == 7) then
// Arresta scarico
unloadCodedVats = ResetBit(unloadCodedVats, vat);
// Genera evento di fine
SetNumGateValue(IntToStr(vat + 101) + "UnloadEvents", 0, 1);
else
SetDigGateValue(IntToStr(vat + 101) + "Unload", 0, 1);
end
else
// Annulla porta evento
SetNumGateValue(IntToStr(vat + 101) + "UnloadEvents", 0, 99);
end
end
end

// Imposta comandi di scarico
unloadCodedVatsAH = BitMask(unloadCodedVats, 255);
SetNumGateValue("Unload_vatsAH", 0, unloadCodedVatsAH);
unloadCodedVatsIR = BitMask(unloadCodedVats / 256, 255);
SetNumGateValue("Unload_vatsIR", 0, unloadCodedVatsIR);

sleep(1000);
end
end
jeremy_AERGY
Posts: 3
Joined: Thu Sep 23, 2010 12:54 pm

Re: Error codes in code builder

Post by jeremy_AERGY »

Hi BGO,

You called me at the morning about this problem. I am working with the release 2.07.05 now. I've tried the source code you sent on this post and when there is an error in the source code I get :"undefined variable..." (this is normal) and when there is no error I get "no error" (this is normal too). So, with my configuration, your problem doesn't appear on my computer.

I've a question, do you think it is safe to install 2 versions of winlog (free and pro) on the same computer ?

Best regards,

Jérémy
BGO
Posts: 15
Joined: Wed Feb 23, 2011 9:33 am

Re: Error codes in code builder

Post by BGO »

Hi, everybody.
I installed latest version (2.07.06) in a fresh "out of the box" laptop vith seven.
Then I imported my project from the other computer (wher I have the "no message available"), and guess what ?
I make a voluntary fault within the code, cheked it and -> No message available ...

About Pro and Lite on same computer, check this :

viewtopic.php?f=7&t=147

Best regards, Bruno
jeremy_AERGY
Posts: 3
Joined: Thu Sep 23, 2010 12:54 pm

Re: Error codes in code builder

Post by jeremy_AERGY »

Hi,

I've just tested your program you sent me last week.

1) If there is no syntax's errors in the code I get this :
code_builder_no_error.jpg
code_builder_no_error.jpg (5.13 KiB) Viewed 23457 times
2) If there is a syntax's error I get :
code_builder_error.jpg
code_builder_error.jpg (6.83 KiB) Viewed 23457 times
Is it your problem ? If so, I think this means that Winlog is not able to tell you more information about the reason of the error and write "No message available" but tell you where there is the error.

We can ask the administrator, if it is a bug or it is normal ?

Best regards,

Jérémy
BGO
Posts: 15
Joined: Wed Feb 23, 2011 9:33 am

Re: Error codes in code builder

Post by BGO »

Hi Jeremy,
Yes it is my problem !
Whatever is the mistake, the message il allways the same.
By the way, you can note that the error number is right.
So yes, if our Guru admin can help !
Buona sera tutti,
Bruno
Edox
Posts: 4
Joined: Wed May 11, 2011 9:32 am

Re: Error codes in code builder

Post by Edox »

Please,
try to run Regedit and search:
HKEY_LOCAL_MACHINE\SOFTWARE\Sielco Sistemi\Winlog\2.07\Language.
Which is the value of this key in your computer?
Regards
BGO
Posts: 15
Joined: Wed Feb 23, 2011 9:33 am

Re: Error codes in code builder

Post by BGO »

Hi,
The language key value is "English".
Hope it will help,
Bruno
Post Reply