Anchor(TOP)

TableOfContents(2)


Obtaining the sources


Constructing the model in Matlab


Updating/Creating the IPC file

IPC file

Updating IPC file


Building the realtime executable

1) Log in to a realtime linux, otherwise some of the following commands doesn't properly run.

2) Once the SYS.mdl file is finished, change your current directory to the advLigo directory

3) Run:

where SYS is the 3 letter name of the mdl file.

because "The RCG code does not work unless the name of the mdl file (simulink model) matches to the model name". This means that just copying the mdl file does not work for the new system.

using daqconfig. Note a fresh install of daqconfig may require editing to point at the correct location. Change line 346 in the daqconfig script in /opt/rtcds/caltech/c1/scripts from set dir "/opt/rtcds/${site_name}/chans/daq" to set dir "/opt/rtcds/${site_name}/c1/chans/daq"

previous C1SYS.ini file in /cvs/cds/caltech/chans/daq or /opt/rtcds/caltech/c1/chans/daq. If you modified the model significantly, you need to cleaning the previous C1SYS.ini, such that your testpoints are properly registered.


Running the realtime executable

1) start IOP process which controls the ADC inputs and the DAC outputs

  •     cd /opt/rtcds/caltech/c1/scripts
     startIOP

2) To start the realtime process, run

  •  cd /opt/rtcds/caltech/c1/scripts
     startSYS

3) Open medm screens to see if it's working. Particularly, the associated C1SYS_GDS_TP.adl screen is useful. The screens are usually in the /opt/rtcds/caltech/c1/medm/SYS directory.

  • medm -x /opt/rtcds/caltech/c1/medm/SYS/C1SYS_GDS_TP.adl &
  • /!\ If its not running, try setting "BURT Restore" to 1 (lower left of the

screen).

  • /!\ If you are using shared memory, you will have to modify the

/etc/rc.d/rc.local file and add the part to the line that looks like:

  • /usr/bin/setup_shmem.rtl SY1 SY2 SY3 &
    where SY1, SY2, etc are the 3 letter names of the system. This will take

care of things at boot time. However, to immediately get it working,:

  • Kill the current copy of setup_shmem (as root, type {{{ps -ef | grep
  • setup_shmem}}} and then kill the process).
  • Then as root run /usr/bin/setup_shmem.rtl SY1 SY2 SY3 etc, with the

  • appropriate module names.


Frame Builder issues

Status

  • 1. The frame builder is running on the fb machine, and is currently automatically started (and restarted if necessary) by the init process.
  • 2. To restart this process, after changes to framebuilder configuration files, such as the master file, simply use "telnet fb 8088" and then "shutdown".
  • 3. To check if the needed processes are still running, "ssh fb", then "ps -ef | grep daqd" and "ps -ef | grep nds"

Making Changes

  • 1. If you have added a new model then you need to modify the /opt/rtcds/caltech/c1/target/fb/master file

  • 2. open it in your editor of choice (on any machine)
  • 3. add a line like: /opt/rtcds/caltech/c1/chans/daq/C1SYS.ini, where SYS is the model name in caps.
  • 4. add a line like: /opt/rtcds/caltech/c1/target/gds/param/tpchn_c1sys.par, where sys is the model name in lower case.
  • 5. save
  • 6. If you have not already done so, go update the DAQ channel files for the new model in the /opt/rtcds/caltech/c1/chans/daq/ directory.
  • 6. Restart the framebuilder as indicated above.
  • 7. Confirm you see the channels in dataviewer.


Starting the testpoint manager

  • /!\ In /opt/rtcds/caltech/c1/target/gds/param/ there is a

testpoint.par file. Inside it has something like:

  • [C-node0] hostname=192.168.1.2 system=tst
  • The number after "C-node" must be 1 less than the gds_node_id number in the

model (tst.mdl in this case). This because the simulink code starts counting at 1, while the other codes start at 0.


Getting AWG working

  • /!\ In /opt/rtcds/caltech/c1/target/gds/param/ there is a awg.par

file. Inside it has something like:

  • [C1-awg0]
    hostname=192.168.1.2
    prognum=0x31001002
  • The number after "C1-awg" must be 1 less than the gds_node_id number in the

model (tst.mdl in this case). This because the simulink code starts counting at 1, while the other codes start at 0.

  • The prognum must be 1 more than the prognum for the associated C-node entry

in the testpoint.par file.


Useful directories

aaa is the system name (e.g. oms, tst, ...)

description

directory

notes

for model

/opt/rtcds/caltech/c1/core/advLigoRTS/src/epics/simLink

to build

/opt/rtcds/caltech/c1/core/advLigoRTS

startup script

/opt/rtcds/caltech/c1/scripts

medm screens

/opt/rtcds/caltech/c1/medm/aaa

realtime code log

/opt/rtcds/caltech/c1/target/aaa/logs

ioc log

/opt/rtcds/caltech/c1/target/c1x00/c1x00epics/iocC1.log

daqd / daqdrc / master

/opt/rtcds/caltech/c1/target/fb

filter coeffs

/opt/rtcds/caltech/c1/caltech/chans

daq settings

/opt/rtcds/caltech/c1/chans/daq

which are to be configured by daqconfig

autoburt snapshots

/tmp/

probably should be changed to a better place - currently set in the starttst script

start script directories as well as params for gds

/opt/rtcds/caltech/c1/target/gds

BR BR

  • [#TOP back to page top ]
  • [:Upgrade_09/CDS: new CDS for upgrade 2009-2010]
  • [:Computers_and_Scripts: Computers and SCripts]
  • [:Electronics/Existing_RCG_DCUID_and_gds_ids: RCG DCUID Table]

KAGRA/Subgroups/DGS/RTPC/Notes_on_getting_the_CDS_Realtime_Code_Generator_working (last edited 2012-06-06 17:55:44 by OsamuMiyakawa)