Code Monkey home page Code Monkey logo

lcls-plc-kfe-motion's Introduction

lcls-plc-kfe-motion

This is the LCLS TwinCAT3 project lcls-plc-kfe-motion.

Documentation

Purpose

TODO

Usage

TODO

lcls-plc-kfe-motion's People

Contributors

ghalym avatar jyin999 avatar klauer avatar mbosum avatar mkestra avatar nrwslac avatar tangkong avatar tongju12 avatar zllentz avatar

Watchers

 avatar  avatar

lcls-plc-kfe-motion's Issues

Set up PMPS exactly like we did in LFE

Beamline setups to find stopper breaks

Main line: RTDSK0, IM1K0, SL1K0, PF1K0, SL2K0, IM2K0 --- Mirrors --- TMO things
TXI line: Mirrors --- IM1K3 --- ST1K3

2 outputs right now = 1 output for IM1K3 and 1 output for everything else. No stopper breaks to see here, just like LFE

Fix pre-commit stuff

We've had to do a fair few "emergency" PRs that have broken style/conventions
This is a reminder to go back and clean up after ourselves

Expand Scope to 2.2 FEE

The 2.2 PLC is missing. As a potentially temporary measure we'll be adding the 3 FEE 2.2 devices to this project:

  • EK1110 append to PLC rail for the extra port
  • Include code for IM1K1, IM2K1, and the zero order stopper
  • Include IO, NC for the above

ST1K4 PV Pragma Issues

Current Behavior

The PV pragmas for ST1K4 are inconsistent and have an error.

The official device name is "ST1K4:TEST"
The motor base PV is "ST1K4:TEST:MMS:01"

The states base PV is "ST1K4:MMS:STATE"

In addition, the states count in the pragma has specified:

arrStates.array: 1..3

Which implies that we want to make 3 states for an IN/OUT device, which is incorrect.

I missed both of these during review.

Expected Behavior

The states base PV should be "ST1K4:TEST:MMS:STATE" for full consistency.
The states pragma should be amended to

arrStates.array: 1..2

Context / environment

Wrong name creates confusion
Error in pragma creates extra unused PVs

Suggested Solution

Rename and fix typos

Fix IM1K0 Parameters

Copy the setup of IM1L0 exactly, except for the slight difference in LVDT calibration

IOC build fails using latest tools

Current Behavior

I think there's a misconfiguration in the library placeholders for lcls-twincat-general:

ERROR:pytmc.bin.db:Duplicate records encountered:
    $(PREFIX)LCLSGeneral:GlobalLogTrickleTrip_RBV (2)
    $(PREFIX)LCLSGeneral:LogHost (2)
    $(PREFIX)LCLSGeneral:LogHost_RBV (2)
    $(PREFIX)LCLSGeneral:LogMessageCount_RBV (2)
    $(PREFIX)LCLSGeneral:LogPort (2)
    $(PREFIX)LCLSGeneral:LogPort_RBV (2)
ERROR:pytmc.bin.template:Linter errors - failed to create database. To create the database ignoring these errors, set allow_errors=True

Context / environment

I've been using some of these repos to make sure my pytmc fixes don't break anything, but this repo was already broken

Steps to Reproduce (for bugs)

  1. set ads-ioc to latest
  2. make

Unify IO naming conventions

Use Maggie's convention, which was the best:
<device>-<terminal model>-<terminal number>
e.g.
IM1K0-EL7041-E1

AT1K4 axes are reversed 3 times, making MMS:01 downstream

  • The attenuator was installed in reverse (the SME later admitted this was a known possibility but did not mention it)
  • The axes were wired up in reverse (downstream/upstream were swapped)
  • The PLC project was configured to reverse the miswiring

The above 3 things together make it such that the fixed PLC/miswired box/flipped install is now inconsistent in what we expect the upstream-most axis to be.

Identify and set better default PLC state mover velocities

These are currently all at the default value of "1".
When autosave fails (equivalently, if the PLC restarts without the IOC restarting) these become 1.

It's possible to set these to specific values by specifying them alongside their positions in places like here:

For im1k3 the correct velocity is 15 mm/s.
I don't know the correct velocity for the other state movers here:

  • im1k0
  • im1k4
  • im2k0
  • pf1k0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.