% Installation package for E1100 Firmware % Release: 3.4 Build 20070119 % Date: 19.01.2007 % Copyright 1999-2007, NTI Ltd. [D /Main [B 'PackInst' import % Release Definitions /ReleaseVersion $3 def /ReleaseSubVersion $4 def /ReleaseBuildInfo 'Build 20070119' def %string! /OSSWVersion $3 def /OSSWSubVersion $4 def /OSSWBetaInfo 'b1' def /OSTreeVersion $3 def /OSTreeSubVersion $4 def /OSTreeBetaInfo 'b1' def /OSDir 'OS' def /OSLoaderFile 'OSLoader' def /OSLoadSW [B OSLoader:LoadSW ] def /MCSWVersion $3 def /MCSWSubVersion $4 def /MCSWBetaInfo 'b1' def /MCTreeVersion $3 def /MCTreeSubVersion $4 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 $4 /IntfSWBetaInfo 'b1' /IntfTreeVersion $3 /IntfTreeSubVersion $4 /IntfTreeBetaInfo 'b1' /IntfDir 'LinRS' /IntfLoaderFile 'LinRSLoader' /IntfLoadSW [B LinRSLoader:LoadSW ] ] def /DeviceNet [D /Name 'DeviceNet' /Caption 'DeviceNet' /Description 'DeviceNet' /IntfSWVersion $3 /IntfSWSubVersion $4 /IntfSWBetaInfo 'b1' /IntfTreeVersion $3 /IntfTreeSubVersion $4 /IntfTreeBetaInfo 'b1' /IntfDir 'DeviceNet' /IntfLoaderFile 'DNLoader' /IntfLoadSW [B DNLoader:LoadSW ] ] def /CanOpen [D /Name 'CanOpen' /Caption 'CanOpen' /Description 'CanOpen' /IntfSWVersion $3 /IntfSWSubVersion $4 /IntfSWBetaInfo 'b1' /IntfTreeVersion $3 /IntfTreeSubVersion $4 /IntfTreeBetaInfo 'b1' /IntfDir 'CanOpen' /IntfLoaderFile 'COLoader' /IntfLoadSW [B COLoader:LoadSW ] ] def /Profibus [D /Name 'Profibus' /Caption 'Profibus DP' /Description 'Profibus DP' /IntfSWVersion $3 /IntfSWSubVersion $4 /IntfSWBetaInfo 'b1' /IntfTreeVersion $3 /IntfTreeSubVersion $4 /IntfTreeBetaInfo 'b1' /IntfDir 'Profibus' /IntfLoaderFile 'DPLoader' /IntfLoadSW [B DPLoader: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 % $0101 $0102 $0103 $0104 ] /SupportedDSWVersions [A $1 $2 ] /Interfaces [A None LinRS CanOpen DeviceNet ] ] %E1100GPHC [D /Name 'E1100-GP-HC' /TypeID $461 /TypeSupported 1 /SupportedHWVersions [A $0102 $0103 $0104 ] /SupportedDSWVersions [A $1 $2 ] /Interfaces [A None LinRS CanOpen DeviceNet ] ] %E1100RS [D /Name 'E1100-RS' /TypeID $471 /TypeSupported 1 /SupportedHWVersions [A $0102 $0103 $0104 $0106 ] /SupportedDSWVersions [A $2 $4 ] /Interfaces [A LinRS None ] ] %E1100RSHC [D /Name 'E1100-RS-HC' /TypeID $481 /TypeSupported 1 /SupportedHWVersions [A $0102 $0103 $0104 $0105 $0106 ] /SupportedDSWVersions [A $2 $4 ] /Interfaces [A LinRS None ] ] %E1100DN [D /Name 'E1100-DN' /TypeID $491 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 ] /SupportedDSWVersions [A $4 ] /Interfaces [A DeviceNet None ] ] %E1100DNHC [D /Name 'E1100-DN-HC' /TypeID $4A1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0105 $0106 ] /SupportedDSWVersions [A $4 ] /Interfaces [A DeviceNet None ] ] %E1100CO [D /Name 'E1100-CO' /TypeID $4B1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 ] /SupportedDSWVersions [A $4 ] /Interfaces [A CanOpen None ] ] %E1100COHC [D /Name 'E1100-CO-HC' /TypeID $4C1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0105 $0106 ] /SupportedDSWVersions [A $4 ] /Interfaces [A CanOpen None ] ] %E1130DP [D /Name 'E1130-DP' /TypeID $4D1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0106 ] /SupportedDSWVersions [A $4 ] /Interfaces [A Profibus LinRS CanOpen DeviceNet None ] ] %E1130DPHC [D /Name 'E1130-DP-HC' /TypeID $4E1 /TypeSupported 1 /SupportedHWVersions [A $0104 $0105 $0106 ] /SupportedDSWVersions [A $4 ] /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 /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 downloading 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 OSDir '\' add OSLoaderFile add def FileName '.stx' add FileExist [B FileName Import #0 OSLoadSW not [B /Result #0 def /MissingFile exch def ] if ][B /Result #0 def /MissingFile FileName def ] ifelse ] if Result [B /FileName MCDir '\' add MCLoaderFile add def FileName '.stx' add FileExist [B FileName Import #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 IntfSel.IntfDir '\' add IntfSel.IntfLoaderFile add def FileName '.stx' add FileExist [B FileName Import #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 [B '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 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 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 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 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 ReadyForStopDlg [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 ] def /InitPackInst [B /DeviceName gknown [B /Device Create:Device def DeviceName Device.AssignDevice /PortName 'PortName' Device.GetDeviceVar def Device.DestroyDevice 'PortName' PortName 1 DeviceName 'LinMotOnline' Device.CreateDevice DeviceName /PackInst:OnMessageCallback PackInst:Init ] [B /PackInst:OnMessageCallback PackInst:InitNew /Device PIVar:Device def /PortName 'PortName' Device.GetDeviceVar def ] ifelse [B /TalkIntf PIVar:TalkIntf def /log [B 'LogTxt' exch PackInst:OnMessageCallback ] def #1 ] [B #0 ] ifelse ] def PackInst:Exit ] ]