% Installation package for E1100 Firmware % Release: 3.6 Build 20071126 % Date: 26.11.2007 % Copyright 2005-2007, NTI AG. [D %/Main [B /Init [B /ProgFlag exch def ProgFlag [B /FilePath 'FirmwareFiles\FirmwareE1100\' def ] [B /FilePath '' def ] ifelse 'PackInst' nknown not [B 'PackInst' import ] if 'RelInfo3R6' nknown not [B 'RelInfo3R6' import ] if /ReleaseVersion RelInfo3R6:RelVer def /ReleaseSubVersion RelInfo3R6:RelSubVer def /ReleaseBuildInfo RelInfo3R6:RelInfoStr def /OSSWVersion $3 def /OSSWSubVersion $6 def /OSSWBetaInfo 'b3' def /OSTreeVersion $3 def /OSTreeSubVersion $6 def /OSTreeBetaInfo 'b1' def /OSDir 'OS' def /OSLoaderFile 'OSLoader' def /OSLoadSW [B OSLoader:LoadSW ] def /MCSWVersion $3 def /MCSWSubVersion $6 def /MCSWBetaInfo 'b5' def /MCTreeVersion $3 def /MCTreeSubVersion $6 def /MCTreeBetaInfo 'b1' def /MCDir 'MC_SW' def /MCLoaderFile 'MCLoader' def /MCLoadSW [B MCLoader:LoadSW ] def %Interfaces /LinRS [D /Name 'LinRS' /Caption 'LinRS' /Description 'Protocol for RS232/RS485 communication' /IntfSWVersion $3 /IntfSWSubVersion $6 /IntfSWBetaInfo 'b1' /IntfTreeVersion $3 /IntfTreeSubVersion $6 /IntfTreeBetaInfo 'b1' /IntfDir 'LinRS' /IntfLoaderFile 'LinRSLoader' /IntfLoadSW [B LinRSLoader:LoadSW ] ] def /DeviceNet [D /Name 'DeviceNet' /Caption 'DeviceNet' /Description 'DeviceNet' /IntfSWVersion $3 /IntfSWSubVersion $6 /IntfSWBetaInfo 'b1' /IntfTreeVersion $3 /IntfTreeSubVersion $6 /IntfTreeBetaInfo 'b1' /IntfDir 'DeviceNet' /IntfLoaderFile 'DNLoader' /IntfLoadSW [B DNLoader:LoadSW ] ] def /CanOpen [D /Name 'CanOpen' /Caption 'CanOpen' /Description 'CanOpen' /IntfSWVersion $3 /IntfSWSubVersion $6 /IntfSWBetaInfo 'b3' /IntfTreeVersion $3 /IntfTreeSubVersion $6 /IntfTreeBetaInfo 'b1' /IntfDir 'CanOpen' /IntfLoaderFile 'COLoader' /IntfLoadSW [B COLoader:LoadSW ] ] def /Profibus [D /Name 'Profibus' /Caption 'Profibus DP' /Description 'Profibus DP' /IntfSWVersion $3 /IntfSWSubVersion $6 /IntfSWBetaInfo 'b4' /IntfTreeVersion $3 /IntfTreeSubVersion $6 /IntfTreeBetaInfo 'b1' /IntfDir 'Profibus' /IntfLoaderFile 'DPLoader' /IntfLoadSW [B DPLoader:LoadSW ] ] def /CTIOIntf [D /Name 'CTIOIntf' /Caption 'CT IO Interface' /Description 'Command Table digital IO Interface' /IntfSWVersion $3 /IntfSWSubVersion $6 /IntfSWBetaInfo 'b1' /IntfTreeVersion $3 /IntfTreeSubVersion $6 /IntfTreeBetaInfo 'b1' /IntfDir 'CmdTabIO' /IntfLoaderFile 'CmdTabIOLoader' /IntfLoadSW [B CmdTabIOLoader:LoadSW ] ] def /None [D /Name 'None' /Caption 'None' ] def /Controllers [A %E1100MP [D /Name 'E1100-MP' /TypeID $411 /TypeSupported 0 ] %E1100MPHC [D /Name 'E1100-MP-HC' /TypeID $421 /TypeSupported 0 ] %E1100MT [D /Name 'E1100-MT' /TypeID $431 /TypeSupported 0 ] %E1100MTHC [D /Name 'E1100-MT-HC' /TypeID $441 /TypeSupported 0 ] %E1100GP [D /Name 'E1100-GP' /TypeID $451 /TypeSupported 1 /SupportedHWVersions [A $0102 $0103 $0104 ] /SupportedDSWVersions [A $1 $2 ] /PowerExtension 'LC' /Interfaces [A CTIOIntf LinRS CanOpen DeviceNet None ] ] %E1100GPHC [D /Name 'E1100-GP-HC' /TypeID $461 /TypeSupported 1 /SupportedHWVersions [A $0102 $0103 $0104 ] /SupportedDSWVersions [A $1 $2 ] /PowerExtension 'HC' /Interfaces [A CTIOIntf LinRS CanOpen DeviceNet None ] ] %E1100RS [D /Name 'E1100-RS' /TypeID $471 /TypeSupported 1 /SupportedHWVersions [A $0102 $0103 $0104 $0106 $0107 ] /SupportedDSWVersions [A $2 $4 ] /PowerExtension 'LC' /Interfaces [A LinRS None ] ] %E1100RSHC [D /Name 'E1100-RS-HC' /TypeID $481 /TypeSupported 1 /SupportedHWVersions [A $0102 $0103 $0104 $0105 $0106 $0107 ] /SupportedDSWVersions [A $2 $4 ] /PowerExtension 'HC' /Interfaces [A LinRS None ] ] %E1100RSXC [D /Name 'E1100-RS-XC' /TypeID $511 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'XC' /Interfaces [A LinRS None ] ] %E1100DN [D /Name 'E1100-DN' /TypeID $491 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'LC' /Interfaces [A DeviceNet None ] ] %E1100DNHC [D /Name 'E1100-DN-HC' /TypeID $4A1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0105 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'HC' /Interfaces [A DeviceNet None ] ] %E1100DNXC [D /Name 'E1100-DN-XC' /TypeID $521 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'XC' /Interfaces [A DeviceNet None ] ] %E1100CO [D /Name 'E1100-CO' /TypeID $4B1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'LC' /Interfaces [A CanOpen None ] ] %E1100COHC [D /Name 'E1100-CO-HC' /TypeID $4C1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0105 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'HC' /Interfaces [A CanOpen None ] ] %E1100COXC [D /Name 'E1100-CO-XC' /TypeID $4F1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'XC' /Interfaces [A CanOpen None ] ] %E1130DP [D /Name 'E1130-DP' /TypeID $4D1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'LC' /Interfaces [A Profibus LinRS CanOpen DeviceNet None ] ] %E1130DPHC [D /Name 'E1130-DP-HC' /TypeID $4E1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0105 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'HC' /Interfaces [A Profibus LinRS CanOpen DeviceNet None ] ] %E1130DPXC [D /Name 'E1130-DP-XC' /TypeID $531 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'XC' /Interfaces [A Profibus LinRS CanOpen DeviceNet None ] ] %E1130DPHV [D /Name 'E1130-DP-HV' /TypeID $501 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 $0107 ] /SupportedDSWVersions [A $4 ] /PowerExtension 'HCHV' /Interfaces [A Profibus LinRS CanOpen DeviceNet None ] ] ] def /WriteStringToElo [P %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This procedure writes an string value of the % % protected block to the ELO % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [A /Address /InString ] /StrLength InString length def 0 2 StrLength 2 sub [B /TmpIndex exch def /TmpAddr Address TmpIndex add def /TmpData InString TmpIndex 1 getsubstr ord def /TmpIndex TmpIndex 1 add def TmpIndex StrLength lt [B /TmpData TmpData InString TmpIndex 1 getsubstr ord 256 mul add def ] if TmpAddr TmpData WriteWordToElo ] for [A ] ] def /WriteWordToElo [B TalkIntf.WriteMemory ] def /ReadMemory [B TalkIntf.ReadMemory TalkIntf.GetResult 0 eq [B TalkIntf.GetData ] [B 'TalkError: ' TalkIntf.GetResult cvs add raisese ] ifelse ] def /StartProgram [B TalkIntf.StartProgram TalkIntf.GetResult 0 ne [B 'TalkError: ' TalkIntf.GetResult cvs add raisese ] if ] def /ResetDevice [B TalkIntf.ResetDevice TalkIntf.GetResult 0 ne [B 'TalkError: ' TalkIntf.GetResult cvs add raisese ] if ] def /GetEloType [B $200680 ReadMemory ] def /GetEloVersion [B $200682 ReadMemory ] def /GetEloSWVersion [B $20102A ReadMemory ] def /GetEloTypeStr [P [A ] /EloName '' def /StringEndFound #0 def $200690 2 $20069E [B /WordAddr exch def StringEndFound not [B /Value WordAddr ReadMemory def Value $FF and 0 ne [B /EloName EloName Value $FF and chr add def Value 8 shr 0 ne [B /EloName EloName Value 8 shr chr add def ] [B /StringEndFound #1 def ] ifelse ] [B /StringEndFound #1 def ] ifelse ]if ] for [A EloName] ] def /CheckEloIsKnown [P [A Type] /IsKnown False def Controllers [B /TempEloDict exch def TempEloDict.TypeID Type eq [B /IsKnown True def ] if ] forall [A IsKnown] ] def /CheckHWVersionCompatible [P [A HWVersion Controller] /Result #0 def Controller /SupportedHWVersions known [B Controller.SupportedHWVersions [B HWVersion eq [B /Result #1 def ] if ] forall ] if [A Result] ] def /CheckEloSWVersionCompatible [P [A EloSWVersion Controller] /Result #0 def Controller /SupportedDSWVersions known [B Controller.SupportedDSWVersions [B EloSWVersion eq [B /Result #1 def ] if ] forall ] if [A Result] ] def /GetEloDict [P [A Type] /EloDict Controllers 1 get def Controllers [B /TempEloDict exch def TempEloDict.TypeID Type eq [B /EloDict TempEloDict def ] if ] forall [A EloDict] ] def /SelectIntf [P [A /IntfArray] % init variables /Result #0 def /IntfSel IntfArray 0 get def % create choose interface dialog /IntfDlg 'Choose Interface' 218 140 Create:Form def % add ok/cancel buttons 75 25 IntfDlg.SetButtonSize 'Ok' '' 'Ok' 1 17 70 IntfDlg.AddButton 'Cancel' '' 'Cancel' 2 112 70 IntfDlg.AddButton %add Interface combo box % create label and combo box 'IntfLabel' '' 'Interface:' 17 19 IntfDlg.AddLabel 99 21 IntfDlg.SetComboSize 'IntfCombo' '' 88 16 IntfDlg.AddCombo % create one entry for each interface /First 1 def IntfArray [B /TmpIntf exch def 'IntfCombo' TmpIntf.Caption IntfDlg.AddString First 1 eq [B 'IntfCombo' TmpIntf.Caption IntfDlg.SetStrVal /First 0 def ] if ] forall /TmpIntf IntfArray 0 get def % execute dialog IntfDlg.Execute 1 eq [B /IntfCaption 'IntfCombo' IntfDlg.GetStrVal def IntfArray [B /TmpIntf exch def TmpIntf.Caption IntfCaption eq [B /IntfSel TmpIntf def ] if ] forall /Result #1 def ] if [A /IntfSel /Result] ] def /ReadyForStopDlg [P [A ] /Result #0 def /ReadyDlg 'Ready for Download' 400 150 Create:Form def 'Label1' '' 'The System is ready for download the firmware.' 17 19 ReadyDlg.AddLabel 'Label2' '' 'The download procedure will erase all former settings.' 17 32 ReadyDlg.AddLabel 'Label3' '' 'Do you want to continue?' 17 55 ReadyDlg.AddLabel % add ok/cancel buttons 75 25 ReadyDlg.SetButtonSize 'Ok' '' 'Ok' 1 108 80 ReadyDlg.AddButton 'Cancel' '' 'Cancel' 2 203 80 ReadyDlg.AddButton /Result ReadyDlg.Execute 1 eq def [A /Result] ] def /AbortDlg [P [A Msg] /AbortDlg 'Abort' 368 150 Create:Form def 'AbortLbl' '' 'Installation aborted!' 92 19 AbortDlg.AddLabel 'AbortMsg' '' Msg 92 49 AbortDlg.AddLabel % add ok button 75 25 AbortDlg.SetButtonSize 'Ok' '' 'Ok' 1 146 80 AbortDlg.AddButton AbortDlg.Execute [A ] ] def /SuccessDlg [P [A Msg] /SuccessDlg 'Success' 368 140 Create:Form def 'SuccessLbl' '' 'Installation successfully completed!' 92 19 SuccessDlg.AddLabel % add ok button 75 25 SuccessDlg.SetButtonSize 'Ok' '' 'Ok' 1 146 70 SuccessDlg.AddButton SuccessDlg.Execute [A ] ] def /FileCheck [P [A ] /Result #1 def /MissingFile '' def Result [B /FileName FilePath OSDir add '\' add OSLoaderFile add def FileName '.stx' add FileExist [B OSLoaderFile nknown not [B FileName import ] if #0 OSLoadSW not [B /Result #0 def /MissingFile exch def ] if ][B /Result #0 def /MissingFile FileName def ] ifelse ] if Result [B /FileName FilePath MCDir add '\' add MCLoaderFile add def FileName '.stx' add FileExist [B MCLoaderFile nknown not [B FileName import ] if #0 MCLoadSW not [B /Result #0 def /MissingFile exch def ] if ][B /Result #0 def /MissingFile FileName def ] ifelse ] if Result [B IntfSel.Name 'None' ne [B /FileName FilePath IntfSel.IntfDir add '\' add IntfSel.IntfLoaderFile add def FileName '.stx' add FileExist [B IntfSel.IntfLoaderFile nknown not [B FileName import ] if #0 IntfSel.IntfLoadSW not [B /Result #0 def /MissingFile exch def ] if ][B /Result #0 def /MissingFile FileName def ] ifelse ] if ] if [A /MissingFile /Result] ] def /ReleaseString ReleaseVersion cvs '.' add ReleaseSubVersion cvs add ' ' add ReleaseBuildInfo add def ] /InstallProc [P [A ] /Continue #1 def 'Installing Firmware Release ' ReleaseString add log '' log 'Checking Servo Controller...' log /EloType GetEloType def EloType CheckEloIsKnown [B /Controller EloType GetEloDict def %'Device Type: ' Controller.Name add log 'Device Text: ' GetEloTypeStr add log 'Device Type ID: 0' EloType 16 cvrs add 'h' add log Controller.TypeSupported 1 eq [B 'Device Type Supported: True' log /EloHWVersion GetEloVersion def 'Device HW Version: 0' EloHWVersion 16 cvrs add 'h' add log EloHWVersion Controller CheckHWVersionCompatible [B 'Device HW Version Supported: True' log /EloSWVersion GetEloSWVersion def 'Device SW Version: ' EloSWVersion cvs add log EloSWVersion Controller CheckEloSWVersionCompatible [B 'Device SW ID Supported: True' log '' log /PowerExtension Controller.PowerExtension def Controller.Interfaces Count 0 eq [B /NoIntf #1 def ][B /NoIntf #0 def ] ifelse 'Interfaces compatible with Controller: ' log Controller.Interfaces [B /IntfInfo exch def IntfInfo.Name 'None' ne [B '- ' IntfInfo.Caption add log ] if ] forall /Continue #1 def Controller.Interfaces count 1 gt [B ProgFlag not [B Controller.Interfaces SelectIntf [B /IntfSel exch def IntfSel.Caption ' selected.' add log ][B /IntfSel exch def 'Installation aborted! No Interface selected!' log /Continue #0 def ] ifelse ] [B Controller.Interfaces [B /IntfSel exch def ExitLoop ] forall ] ifelse ][B NoIntf not [B Controller.Interfaces [B /IntfSel exch def ] forall IntfSel.Caption ' Interface selected.' add log ] if ] ifelse Continue [B '' log 'Checking files...' log FileCheck [B '...all necessary files have been found.' log '' log ProgFlag not [B /Bool ReadyForStopDlg def ] [B /Bool #1 def ] ifelse Bool [B 'Starting download procedure...' log '' log Continue [B #1 OSLoadSW /Continue exch def /MissingFile exch def '' log ] if Continue [B #1 MCLoadSW /Continue exch def /MissingFile exch def '' log ] if Continue [B IntfSel.Name 'None' ne [B #1 IntfSel.IntfLoadSW /Continue exch def /MissingFile exch def '' log ] if ] if Continue [B /ReleaseInfoAddr $200748 def /ReleaseVersionAddr $2007A8 def /ReleaseSubVersionAddr $2007AA def 'Writing Release Info...' log ReleaseInfoAddr ReleaseString 32 ' ' padr WriteStringToElo ReleaseVersionAddr ReleaseVersion WriteWordToElo ReleaseSubVersionAddr ReleaseSubVersion WriteWordToElo '' log 'Reset Device. Please wait...' log ResetDevice 6000 wait ] if Continue not [B 'Installation aborted! ' log '' AbortDlg ][B 'Installation successfully completed!' log SuccessDlg ] ifelse ][B 'Installation aborted! ' log ] ifelse ][B /MissingFile exch def 'Installation aborted! ' log 'File not found: \' MissingFile add log 'File not found: \' MissingFile add AbortDlg ] ifelse ] if ][B 'Device SW ID Supported: False' log '' log 'Installation aborted! ' log 'Device SW ID not supported!' AbortDlg ] ifelse ][B 'Device HW Version Supported: False' log '' log 'Installation aborted! ' 'The Version ' EloHWVersion 16 cvrs add 'h' add ' of the Controller ' add Controller.Name add ' is not compatible with this firmware release!' add log 'HW Version not supported!' AbortDlg ] ifelse ][B 'Device Type Supported: False' log '' log 'Installation aborted! ' 'The Controller ' add Controller.Name add ' is not compatible with this firmware release!' add log 'Device Type not supported!' AbortDlg ] ifelse ][B 'Device Type: 0' EloType 16 cvrs add 'h' add log '' log 'Installation aborted! Unknown Device Type!' log 'Unknown Device Type!' AbortDlg ] ifelse [A /Continue ] ] /InitPackInst [B ProgFlag [B /DevName exch def /Device Create:Device def DevName Device.AssignDevice DevName /PackInst:OnMessageCallback PackInst:Init ] [B /PackInst:OnMessageCallback PackInst:InitNew /Device PIVar:Device def /PortName 'PortName' Device.GetDeviceVar def ] ifelse /InitResult exch def InitResult [B /TalkIntf PIVar:TalkIntf def /log [B 'LogTxt' exch PackInst:OnMessageCallback ] def #1 ] [B #0 ] ifelse ] /PackInstExit [B PackInst:Exit ] ]