Porting to LogicLab
Porting procedure from LogicLab 4 to LogicLab 5.0.0.x :
WARNING: Those steps are strictly required because LogicLab5 has a different file and folder organization (the folder name inside the redist has changed from LogicLab4 to LogicLab5, and the executable name from LogicLab4.exe to LogicLab.exe)
ISS changes
- modify the application name (da LogicLab4 a LogicLab5) in ISS (#define NameApp)
- modify the folder name (from LogicLab4 to LogicLab5) in the ISS file (#define LLSrcDir)
- modify the executable file name (from LogicLab4.exe to LogicLab.exe) in the ISS file (#define LLNameExe)
- Remove the old version (LogicLab4) in the ISS file with InstallDelete, if desired
[InstallDelete] Name: {app}\LogicLab4; Type: filesandordirs
- Add in the ISS file the copy of the LogicLab\styles folder
Source: ..\{#LLSrcDir}\Styles\*.*; DestDir: {app}\{#LLDestDir}\Styles; Flags: ignoreversion
- Remove the AlUIExt.dll installation, not existing anymore
Source: ..\{#LLSrcDir}\AlUIExt.dll; DestDir: {app}\{#LLDestDir}; Flags: ignoreversion
LLMakeCustomVersion.bat changes
- modify the path (from LogicLab4 to LogicLab5) (set BUILDPATH)
- modify the executable file name (from LogicLab4.exe to LogicLab.exe) in the CustomVersions script (set SRC), in the :Init function
PCT catalog changes
- Modify the PCT file of every target of your catalog if they have any reference <loadExternalTemplate> that points to LogicLab4 in LogicLab5
- Modify the relative path of system libraries in the catalog, e.g. "<library>..\..\LogicLab5\Libraries\Standard.pll</library>"
- Modify the templates\LogicLab.pct file substituting <extension><dll> LogicLab4.exe in %APPEXENAME%
PageLab changes
- If you have Pagelab on your suite, modify the PLMakeCustomVersion.bat file and updating the NAMELLC and LOGICLAB_PATH variables
Porting procedure to LogicLab 5.6.0.x :
Script catalog changes
- If any target in your catalog has HTML pages that create or modify global PLC variables (like 'Parameters', 'Status variables', fieldbus configuration, etc...), you have to:
- Edit CheckGlobalVarsModified() function in LogicLab5\template\script.js, and make sure the actual code is
function CheckGlobalVarsModified(group) { // se variabili globali già modificate e non salvate non permette l'operazione if (app.CallFunction("extfunct.IsGlobalVarsModified", group)) { var msg; if(group) msg = app.Translate("Global variables group %1 is modified.\nPlease save before continuing.").replace("%1", group) else msg = app.Translate("Global variables have been is modified but not saved.\nPlease save before continuing.") app.MessageBox(msg, "", MSGBOX.MB_ICONEXCLAMATION) return false } // ulteriore controllo se la dichiarazione testuale IEC è valida else if (!app.CallFunction("extfunct.IsGlobalVarsIECDeclarationValid", group)) { var msg; if(group) msg = app.Translate("Global variables group %1 has an invalid IEC declaration.\nPlease fix it before continuing.").replace("%1", group) else msg = app.Translate("Global variables have an invalid IEC declaration.\nPlease fix it before continuing.") app.MessageBox(msg, "", MSGBOX.MB_ICONEXCLAMATION) return false } else return true }
- Get the latest version of the script in Common\Script\PLCVars.js from [here]
Porting procedure to LogicLab 5.8.0.x :
- LLMakeCustomVersion.BAT must be changed, because internal resource IDs have been revised. Change:
set IDS_AXEL_VERSION=10525 set IDS_CUSTOM_EXT=10529 set IDS_CUSTOM_COPYPASTE=10530 set IDS_CUSTOM_ID=10531
To:
set IDS_AXEL_VERSION=1890 set IDS_CUSTOM_EXT=1893 set IDS_CUSTOM_ID=1895
- ISS setup script MakeCustomLL.ISS must be changed, because now LogicLab uses a new shared DLL
Download it from [here] and put it in your Setup\Shared folder.
In the ISS script please add under [Files] section:
Source: Shared\ToolkitPro1801vc120U.dll; DestDir: {sys}; Flags: sharedfile
Porting procedure to LogicLab 5.10.0.x :
- ATCServer.exe is no longer present and not distributed in the LogicLab_xxx_Redist.zip.
Please remove any occurrence of "ATCServer" from the ISS script file.
Porting procedure to LogicLab 5.12.0.x :
- All files generated by the compilation are now saved inside a folder named "Build". All the targets that download the symbol table (tipically LLExec) will need some modifications to the scripts in the catalog
LLExec.js (or similar, maybe with a different name): add the functions
function GetBuildDir() { var prjDir = m_fso.GetParentFolderName(app.CallFunction("logiclab.get_ProjectPath")) + "\\"; if (m_fso.FolderExists(prjDir + "Build")) return prjDir + "Build\\"; // le nuove versioni di LogicLab hanno la sottocartella "build" con tutti gli output di compilazione else return prjDir; // vecchie versioni salvano tutto nella cartella di progetto } function GetSymbolTableFilename() { var prjpath = app.CallFunction("logiclab.get_ProjectPath"); var symtab = GetBuildDir() + "\\" + m_fso.GetBaseName(prjpath) + ".sym.xml"; return symtab; } function GetSymbolTableNameOnTarget() { return "PLC.sym.xml"; }
download_cfg.js (or similar): change the PreDownload() function, from
if (downloadSymTab) { // la symbol table ha il path completo del progetto con estensione .sym.xml var prjpath = app.CallFunction("logiclab.get_ProjectPath") var symtab = m_fso.GetParentFolderName(prjpath) + "\\" + m_fso.GetBaseName(prjpath) + ".sym.xml" var result = app.CallFunction("GDBFileTransfer.GDBCopyFileToDevice", devlink, symtab, "PLC.sym.xml") app.PrintMessage("Downloading Symbol table : " + (result ? "OK" : "FAILED")) }
to
if (downloadSymTab) { var symtab = GetSymbolTableFilename(); var result = app.CallFunction("GDBFileTransfer.GDBCopyFileToDevice", devlink, symtab, GetSymbolTableNameOnTarget()) app.PrintMessage("Downloading Symbol table : " + (result ? "OK" : "FAILED")) }
ISS changes
- Download this package [here] and extract it on your Setup\Shared folder.
- Add these lines in the ISS file at the very beginning of the [Files] section
Source: Shared\redist\VC++\vc_redist.x86.exe; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: RunSetup('Installing Visual C++ Redistributable...', '/install /quiet /norestart')
- Add these lines in the ISS file [Files] section
;-------------RESOURCE FILES FOR PROPERTIES VIEW----------------------------------------------------- Source: "..\{#LLSrcDir}\htmlObjInfo.js"; DestDir: "{app}\{#LLDestDir}"; Flags: ignoreversion;
;-------------SHARED COMPONENTS---------------------------------- Source: shared\AlCatalogManager5.dll; DestDir: {cf}\AlComponents; Flags: regserver sharedfile uninsnosharedfileprompt Source: Shared\ToolkitPro1850vc150U.dll; DestDir: {sys}; Flags: sharedfile
- Add this procedure on the [Code] section
procedure RunSetup(msg : String; params : String); var ResultCode: Integer; begin if (Exec(ExpandConstant(CurrentFileName), params, '', SW_SHOW, ewWaitUntilTerminated, ResultCode)) then begin // handle success if necessary; ResultCode contains the exit code end else begin MsgBox('Error '+ msg + '. Please retry or contact system administrator. '+ SysErrorMessage(ResultCode), mbError, MB_OK); WizardForm.Close; // handle failure if necessary; ResultCode contains the error code end; end;
Porting procedure to LogicLab 5.14.0.x :
- If you are using old TGT files (not XML format) and using task periods expressed in us, it is necessary to prefix the constant with LTIME specifier: e.g. lt#500us
Porting procedure to LogicLab 5.16.0.x :
- Nothing to be done from previous branch
Porting procedure to LogicLab 5.18.0.x :
- Nothing to be done from previous branch
Porting procedure to LogicLab 5.20.0.x :
- Nothing to be done from previous branch
Porting procedure to LogicLab 5.22.0.x :
- Nothing to be done from previous branch
Porting procedure to LogicLab 6.0.0.x :
IMPORTANT: Those steps are strictly required because LogicLab6 has a different file and folder organization (the folder name inside the redist has changed from LogicLab5 to LogicLab6)
ISS changes
- modify the application name (from LogicLab5 into LogicLab) in ISS (#define NameApp)
- modify the folder name (from LogicLab5 into LogicLab) in the ISS file (#define LLSrcDir)
- Remove the old version (LogicLab5) in the ISS file with InstallDelete, if desired
[InstallDelete] Name: {app}\LogicLab5; Type: filesandordirs
LLMakeCustomVersion.bat changes
- modify the path (from LogicLab5 into LogicLab) (set BUILDPATH)
PCT catalog changes
- Modify the PCT file of every target of your catalog if they have any reference, e.g. "<loadExternalTemplate>..\LogicLab5\templates\Catalog.pct</loadExternalTemplate>" into "<loadExternalTemplate>%APPPATH%\templates\Catalog.pct</loadExternalTemplate>"
- Modify the relative path of system libraries in the catalog, e.g. "<library>..\..\LogicLab5\Libraries\Standard.pll</library>" into "<library>%APPPATH%\Libraries\Standard.pll</library>"
LogicLab is now compiled using Visual Studio 2022.
- Download last Microsoft Visual C++ runtime redist from [here] and overwrite the one you have in the Setup\Shared\redist\VC++ folder of your setupkit.
- Download latest version of shared components from [here] and communication libraries from your customer page and update all binaries on your Setup\Shared folder.
- Download latest version of GDBFileTransfer.dll and LLScanClientLib.dll from [here] and overwrite the ones you have in the Templates folder of your setupkit.
- Add these lines in the ISS file [Files] section:
;-------------SHARED COMPONENTS---------------------------------- Source: shared\AlCatalogManager6.dll; DestDir: {cf}\AlComponents; Flags: regserver sharedfile uninsnosharedfileprompt Source: Shared\ToolkitPro2210vc170U.dll; DestDir: {sys}; Flags: sharedfile Source: Shared\AxEditGrid5.ocx; DestDir: {commoncf}\AlComponents; Flags: regserver sharedfile uninsneveruninstall
- Search in all your catalog html files the old GUID of AxEditGrid4.ocx component and replace it with the new one of AxEditGrid5.ocx
OLD GUID: D62247DB-3391-4236-936F-80EF7F4EA476 NEW GUID: 7E61CABD-EB07-425A-9315-B6B2D454BAC1
Porting procedure to LogicLab 6.2.0.x :
- Add these lines in the ISS file [Files] section:
Source: ..\{#LLSrcDir}\AlImportELF.dll; DestDir: {app}\{#LLDestDir}; Flags: ignoreversion
- Please make sure you are installing the latest VS C++ runtime redist (at least >= 14.40.x), get latest from [here] and overwrite the one you have in the Setup\Shared\redist\VC++ folder of your setupkit.
- LogicLab now use its .ini into 'Axel' folder of %APPDATA%. IF you don't have customized the ini folder name (see 'INIFOLDER' on LLMakeCustomVersions.bat file) and you want to preserve your old .ini setting during the installation you must move existing .ini folder into the new Axel folder by adding on your .iss file these lines (take them as example)
; see INI in LLMakeCustomVersions.bat #define LLNameIni "LogicLab.ini" ; !!!!!!!!!!!! NB: if you have defined a custom INIFOLDER in LLMakeCustomVersions.bat, comment the next line #define IniFolder "Axel"
procedure CurStepChanged(CurStep: TSetupStep); var ....... SourceINIFile: string; DestINIDir: string; begin ....... #ifdef IniFolder SourceINIFile := ExpandConstant('{userappdata}\{#LLNameIni}'); DestINIDir := ExpandConstant('{userappdata}\{#IniFolder}'); // creates folder if it doesn't exist, then moves the .ini file inside if not DirExists(DestINIDir) then if CreateDir(DestINIDir) then if FileExists(SourceINIFile) then RenameFile(SourceINIFile, DestINIDir + '\{#LLNameIni}'); #endif