CBP Developer Guide

The CBP software consists of a typical salobj CSC, a firmware written in DMC and a TCP/IP socket controller written in python.

The Galil DMC-4183 controller supplied with the CBP has a MAC address of 00-50-4C-38-28-74. The IP is hardcoded. Use the GalilTools (or newer version) via a USB connection to modify the address and subnet using the following commands:

  • DH 0 –> Sets the IP to be set manually and not use DHCP (which doesn’t appear to work well)

  • IA WWW,XXX,YYY,ZZZ –> sets the IP address. Note the use of the comma instead of a period

  • SM 255,255,255,0 –> Sets the subnet

  • TH –> Shows the connections and current IP setup.

  • BN –> Burns the information to the non-volitile memory

The device supports being pinged, which is a good way verify connectivity.

DMC

A language based on C for writing Galil motion control firmware logic.

Dependencies

CBP API

The content in this section is autogenerated from docstrings.

lsst.ts.cbp Package

Functions

execute_csc()

Classes

CBPCSC([simulation_mode, initial_state, ...])

This defines the CBP CSC using ts_salobj.

CBPComponent(csc[, log])

This class is for implementing the CBP component.

Encoders()

Mocks the CBP encoders.

MockServer([log])

Mocks the CBP server.

Build and Test

pip install -e .[dev]
# Make sure environment variable TS_CONFIG_MTCALSYS_DIR points to the ts_config_mtcalsys package
export TS_CONFIG_MTCALSYS_DIR=/home/saluser/repos/ts_config_mtcalsys
pytest --cov lsst.ts.cbp -ra

Usage

Starting the CSC.

run_cbp.py

Stopping the CSC.

await cbp.cmd_exitControl.set_start(timeout=10)

Simulator

The simulator is located in the mock_server module. The CSC will use it in simulation mode.

Updating Firmware of the CBP

Firmware repository is ts_cbp_firmware

  1. Download Galil Design Kit

  2. Edit dmc code

  3. Click Download program to hardware

Building the Documentation

pip install -e .[dev]
package-docs clean && package-docs build
# files located in doc/_build/html/ directory

Contributing

Code and documentation contributions utilize pull-requests on GitHub. Feature requests can be made by filing a Jira ticket with the ts_CBP label in the Data Management(DM) project. In all cases, reaching out to the contacts for this CSC is recommended.