Appendix
- A. dtb Firmware Update
- B. How to Assign Motors to the Buttons of the Local Motor Control
A. dtb Firmware Upgrade
This chapter describes the procedure for upgrading the application software and operating system RTOS within the dtb controller.
A.1 Firmware Distribution
The firmware distribution contains two components: the application software (APPL) and the operating system (RTOS). The operating system RTOS is likely to be a stable distribution and in the an update of the RTOS is going to happen with low frequency. The application software is the part of the controller firmware that handles the details and is likely to undergo more frequent updates.
A.1.1 Apllication Software (APPL)
The following files form part of the application software. For firmware version ≥ 4.0:
- DTB4xx
For firmware versions ≤ 3.5:
- APPLLOAD
- APPLLOAD.LOC
- APPLLOAD.NET
- CANBIO.SR
- DTBH.SR
- IO.SR
- LOAD.BAT
- MAIN.SR
- MESSAGE.CSV
- SERVER.SR
- STEP.SR
A.1.2 Operating System (RTOS)
The following files form part of the operating system RTOS:
- sys36v#.fld
A.2 Application Software Update
In the following section, red text denotes user commands. Text printed in green is the expected output on the terminal screen. Please do the following and note that strings are case sensitive:
- Telnet into dtb.
In a terminal window, type:
telnet 192.0.2.3 Username: esd
There will be no prompt for a password but an immediate login. The output on the screen at login will look like this:
WD=/R1/HOME XD=/ /R1/HOME/PROFILE--: wrong command
- Add directory /R4 to the binary path.
Type:CXD /R4
The output on the screen will look like this:WD=/R1/HOME XD=/R4/-
A.2.1 Update Procedure for Firmware Version ≥ 4.0
- Reboot dtb without loading application.
In the telnet session, type:REBOOT NOAPPL
Wait about 15 seconds for the dtb controller to reboot, then telnet again into the dtb as described above (sections 1 and 2) using username "esd" with no password. In the telnet session, on the command prompt, type command:
CXD /R4 memadd
- FTP the dtb firmware from subdirectory APPL of the distribution into directory /ED in the dtb.
Do the following on your host computer:cd APPL (i.e. go to subdir. APPL of this distribution) ftp 192.0.2.3 Username: esd_ftp Password: <RETURN> (i.e. no password) passive (SuSE only) (i.e. toggle use of passive transfer mode) epsv4 (SuSE only) (i.e. toggle use of EPSV/EPRT commands) cd /ED (i.e. go to directory /RF/BIN) binary (i.e. use binary transfer mode) prompt (i.e. turn off prompting) put DTB4xx (i.e. copy file DTB4xx from directory APPL into /ED) ('xx' denotes the version number)
- Burn application software into flash.
Telnet into the dtb as described above (sections 1 and 2) using username "esd" with no password. In the telnet session, on the command prompt, type command:CXD /R4 APPUPD /ED/DTB4xx
BEWARE:
xx in DTB4xx gives the version number, e.g. DTB425. This procedure takes approx. 1 minute to complete. Do NOT switch off the dtb while APPUPD has not completed. If you do so, restart the entire procedure with the first step. - Reboot dtb.
You may either power cycle the instrument or type the following command in the telnet session:REBOOT FULL
A.2.2 Update Procedure for Firmware Version ≤ 3.5
- Get disk /R2 from the flash memory and put it into RTOS memory as directory /RF.
Type:editappl
The output on the screen will look like this:EDITAPPL: start >> #SRAM : NO_BAD BLOCK(S) >> DISCMOVE/0084: (terminate) EDITAPPL: done.
Keep this session open. - FTP the dtb firmware from subdirectory APPL of the distribution into directory /RF/BIN in the dtb.
Do the following on your host computer:cd APPL (i.e. go to subdir. APPL of this distribution) ftp 192.0.2.3 Username: esd_ftp Password: <RETURN> (i.e. no password) passive (Linux only) (i.e. toggle use of passive transfer mode) epsv4 (Linux only) (i.e. toggle use of EPSV/EPRT commands) cd /RF/BIN (i.e. go to directory /RF/BIN) binary (i.e. use binary transfer mode) prompt (i.e. turn off prompting) mput * (i.e. copy all files from directory APPL into /RF/BIN)
BEWARE:
Make sure that all files are transferred in uppercase! If you are getting errors while transferring files into the controller the most likely reason is that the storage area inside the controller is full due to multiple versions of the desired files. By giving the "DIR" command in the FTP session you may want to check that there is only one version of file APPLLOAD (and not another one named "applload" ). In that case, the safest thing to do is to power cycle the controller and start all over again! - Burn application software into flash.
In the telnet session, on the /RF/-> prompt, type command:saveappl
BEWARE:
This procedure takes approx. 1 minute to complete. Do NOT switch off the dtb while saveappl has not completed. If you do so, restart the entire procedure with the first step.The output on the screen will look like this:
SAVEAPPL: Please wait until "all done" appears. SAVEAPPL: Clearing Bank 1...9 and saving /R2... SAVEAPPL: Clearing Bank 1...9 >> CLEARFLASH/0086: (terminate) SAVEAPPL: Clearing Bank 1...9 done. SAVEAPPL: SAVING /R2 ... >> MOVETOFLASH/0087: (terminate) SAVEAPPL: SAVING /R2 ...done SAVEAPPL: all done.
- Reboot dtb.
You may either power cycle the instrument or type the following command in the telnet session:system_reset
- Restore variables and reboot.
After reboot, telnet into the dtb and type command:PARA_DEFAULT 0
There will be no feedback for this command. Afterwards, reboot again.
A.3 Operating System Update
In the following section, red text denotes user commands. Text printed in green is the expected output on the terminal screen. Please do the following and note that strings are case sensitive:
- Transfer operating system into dtb via FTP.
FTP the RTOS operating system from subdirectory RTOS of this distribution into directory /ED in the dtb. Do the following on your host computer:cd RTOS (i.e. go to subdir. RTOS of this distribution) ftp 192.0.2.3 Username: esd_ftp Password: <RETURN> (i.e. no password) passive (Linux only) (i.e. toggle use of passive transfer mode) epsv4 (Linux only) (i.e. toggle use of EPSV/EPRT commands) cd /ED (i.e. go to directory /ED) binary (i.e. use binary transfer mode) prompt (i.e. turn off prompting) mput * (i.e. copy all files from directory RTOS into /ED)
In your terminal window, you should see something similar to:binary 200 TYPE Command ok, Type set to IMAGE. dtb:/R3> dtb:/R3> dtb:/R3> cd /ED 250 Requested fileaction okay, completed. dtb:/ED> mput * local: sys36v10.fld remote: sys36v10.fld 200 PORT Command ok. 150 Opening data connection for sys36v10.fld (192.0.2.2,30682). 100% |*************************************| 497 KB .49 KB/s 00:00 ETA 226 Closing data connection. Successful. 509870 bytes sent in 00:04 (107.40 KB/s)
After file transfer, check contents of directory /ED by typing "DIR" in the FTP session. You should see something similar to:dtb:/ED> dir
200 PORT Command ok. 150 File status ok; about to open data connection (192.0.2.2,30681). -rwxrwxrwx 1 esd rtos 1 -- 00:09 tmp03 -rwxrwxrwx 1 esd rtos 509870 -- 00:09 sys36v10.fld lrwxrwxrwx 1 esd rtos 0 : LIB 226 Closing data connection. Successful.
- Telnet into dtb.
In a terminal window, type:telnet 192.0.2.3 Username: esd
There will be no prompt for a password but an immediate login. The output on the screen at login will look like this:WD=/R1/HOME XD=/ /R1/HOME/PROFILE--: wrong command
- Add directory /R4 to the binary path.
In the telnet session, type:CXD /R4
The output on the screen will look like this:WD=/R1/HOME XD=/R4/-
- Burn new RTOS into flash.
Type:sysupd /ED/sys36v10.fld USER-RTOS
BEWARE:
This procedure takes approx. 2 minutes to complete. Do NOT switch off the dtb while sysupd has not completed. If you do so, restart the entire procedure with first step.The output on the screen will look like this:
/ED/->sysupd /ED/sys36v10.fld USER-RTOS USER-RTOS booted. SYSUPD: USER-RTOS booted. SYSUPD: Flash USER-RTOS. >> LOAD/0025: (terminate) SYSUPD: FLLOAD loaded. SYSUPD: Please wait until "all done" appears. SYSUPD: REWIND /ED/sys36v10.fld OK. SYSUPD: Clearing Bank 101 ... and flashing rtos-image... SYSUPD: Clearing Bank 101 ... >> CLEARFLASH/0026: (terminate) SYSUPD: Clearing Bank 101 ... done. SYSUPD: Flashing rtos-image (bank 101 ...) /ED/sys36v10.fld (wait 2 min) FLLOAD: File loaded: /ED/sys36v10.fld Addr 00000000 > 00042840 SYSUPD: Flashing image done. Ok. SYSUPD: all done.
- Reboot dtb.
After an RTOS update you MUST power cycle the dtb. It is NOT sufficient to do a soft reset only!
A.4 List Firmware Versions
In a terminal window, type:telnet 192.0.2.3 Username: esdThere will be no prompt for a password but an immediate login. On the command prompt (/R1/HOME>) type:
versionIn the command ouput, the entry "SOFTWARE VERSION" (see below) corresponds to the current version of the application software (here 3.3) The line "RTOS-IMAGE-NO." gives the current version of the operating system (here 10). A typical output looks like this:
/R1/HOME>version
SOFTWARE-VERSION : 3.30 DTB-NO. : 0 CONTROLLER-NO. : 16 RTOS-IMAGE-NO. : 10 RTOS-IMAGE-NAME:P:\rtos\cmdfiles\base360\sys36v10.cmd created at:Mon Nov 12 18:21:53 2001 /R1/HOME>
A.5 Update of Disks R2, R3 and R5
In certain situations it might become necessary or useful, to update user data on one of the internal disks of the controller. The following table summarizes the available partitions, their contents and the name of the command procedure to use for updating the information.
Partition | Name | Contents | Update Commands |
---|---|---|---|
/R2 | TEST | Batch files, etc. | edittest/savetest |
/R3 | CONF | Configuration files, etc. | editconf/saveconf |
/R5 | TOOL | Some system tools | edittool/savetool |
The most likely thing to do is an update of partition /R3 that contains instrument specific configuration data for certain motors or hardware components like the barcode reader. In the following example we will assume that we want to update disk /R3. For updating disks /R2 or /R5, the commands editconf/saveconf must be replaced by edittest/savetest or edittool/savetool, respectively.
In the following section, red text denotes user commands. Text printed in green is the expected output on the terminal screen. Please do the following and note that strings are case sensitive:
- Telnet into dtb
In a terminal window, type:
telnet 192.0.2.3 Username: esd
There will be no prompt for a password but an immediate login. The output on the screen at login will look like this:
WD=/R1/HOME XD=/ /R1/HOME/PROFILE--: wrong command
- Add directory /R4 to the binary path.
Type:CXD /R4
The output on the screen will look like this:WD=/R1/HOME XD=/R4/-
- Copy disk /R3 into temporary RAM
Type:editconf
The output on the screen will look like this:/R1/HOME>editconf EDITCONF: start >> #SRAM : NO_BAD BLOCK(S) >> DISCMOVE/007F: (terminate) EDITCONF: done.
: (terminate) - FTP the desired file from the computer into the dtb.
Let us assume that you want to place a file called STATP.033 into directory /R3 of the dtb. After the previous step using command "editconf", the entire disk /R3 has been copied to disk /RF including the entire directory tree. Do the following on your host computer:ftp 192.0.2.3 Username: esd_ftp Password: <RETURN> (i.e. no password) passive (SuSE only) (i.e. toggle use of passive transfer mode) epsv4 (SuSE only) (i.e. toggle use of EPSV/EPRT commands) cd /RF (i.e. go to directory /RF/BIN) binary (i.e. use binary transfer mode) put STATP.033 (i.e. copy file STATP.033 from current dir. into /RF) quit
- Burn /RF into flash.
In the still open telnet session, type command:saveconf
The output on the screen will look like this:/RF/->saveconf RTOS-DIRECTORY DEVICE /RF/ **FREE** BC_CONF.TLP 2 BC_CONF.033 2 CONF/ 1 IO_CONF 1 PARA/ 1 RC/ 1 STATP.TLP 3 STATP.033 2 Temp. RAM-Disk /RF found. Continue! SAVECONF: Please wait until "all done" appears. SAVECONF: Clearing Bank 6...9 and saving /R3... SAVECONF: Clearing Bank 6...9 >> CLEARFLASH/0083: (terminate) SAVECONF: Clearing Bank 6...9 done. SAVECONF: SAVING /R3 ... >> MOVETOFLASH/0084: (terminate) SAVECONF: SAVING /R3 ...done SAVECONF: UNMOUNT temp. RAM-Disk /RF SAVECONF: all done.
BEWARE:
Regardless if you are using commands edittest, editconf or edittool, there will always be a temporary copy of disks /R2, /R3 or /R5 in directory /RF. You should always take good care not to use the "wrong" save command which may copy /RF back into the wrong place. I.e. a combination of commands edittest/saveconf or similar MUST BE AVOIDED!
B. How to Assign Motors to the Buttons of the Local Motor Control
The Local Motor Control features 5 buttons with multiple functionality. There are 4 motor buttons ("CRYO, THETA, DISTANCE, CHI") and the "ADC ZERO"-button. As by 2002 the CRYO button is not being used and may be used to drive either the BEAMSTOP or the PHI-motor. It can be handy to drive the beamstop out of the way when mounting the crystal. The beamstop may be moved manually but if this has been done the motor needs to reinitialized afterwards. Alternatively, it can be useful to drive PHI to 0.0 with the Local Motor Control before mounting a new crystal.In any case, the dtb-controller needs to know which motor to talk to before the buttons can be used. By default, no motor is assigned to the CRYO button. To use the CRYO button to drive either BEAMSTOP or PHI, add a corresponding line to the configuration file (see chapter "Keywords for dtb" in section "Input" . Before starting program mar345dtb, you must set a couple of parameters with the help of program dtbcmd that allows to send single hardware commands to the dtb-controller.
In order to use motor BEAMSTOP, please do the following:
Command Description dtbcmd 103,1,41,5 Assign BEAMSTOP motor to CRYO button dtbcmd 103,1,40,100 Set speed for BEAMSTOP motor to 100 steps/sec. dtbcmd 103,1,39,500 Set acceleration for BEAMSTOP motor to 500 steps/sec*sec. dtbcmd 103,1,38,-300 Set position 2 for BEAMSTOP motor to 45 mm dtbcmd 103,1,37,-120 Set position 1 for BEAMSTOP motor to 18 mm In order to use motor PHI, please do the following:
Command Description dtbcmd 103,1,41,6 Assign PHI motor to CRYO button dtbcmd 103,1,40,10000 Set speed for PHI motor to 10000 steps/sec. dtbcmd 103,1,39,20000 Set acceleration for PHI motor to 20000 steps/sec*sec. dtbcmd 103,1,38,-144000 Set position 2 for PHI motor to 180.00 deg. dtbcmd 103,1,37,0 Set position 1 for PHI motor to 0.0 deg. If you don't have a CHI axis you may also reassign the CHI button to either BEAMSTOP or PHI. To do so, use the same sequence of commands as described above. The only difference will be the third argument (41 to 37) which will have to be replaced by the given value -5, i.e. 36 to 32.