DUNE / 2x2_Slow_Controls

This repository contains the code used for setting up the slow controls monitoring system for 2x2.
3 stars 0 forks source link

Map VME crate classes using v1.0 code, start integration, modify JSON file, and do test notebook #6

Closed rvizarreta closed 4 months ago

rvizarreta commented 10 months ago

From local work: JSON file is not ready for this one. Also, remember from Louise: "in the final set up we will have 3 VME crates (one for ADCs, two for the VGAs) so we need a few more boxes for those." Manual: https://file.wiener-d.com/documentation/Crates_6000/WIENER_Series_6000_Manual_A7.pdf

rvizarreta commented 6 months ago

Notes:

rvizarreta commented 6 months ago

This is not a code issue, this is due to the limit in files.

rvizarreta commented 5 months ago

This is done, by solving this issue I essentially encapsulated all possible failures and, most important, I added this execute command function:

    def execute_command(self, command):
        try:
            output = check_output(command, shell=True, text=True)
            return output
        except subprocess.CalledProcessError as e:
            print(f"Error executing command: {e}")
            output = self.execute_command(command)
            return output

This way if we get an error on making the snmp request at least we will try again until connection is succesful. I also added time delays so request are done more carefully now. This doesn't entirely fix the issue and affects our sampling rate drastically, but it does the job and is good enough for low voltage monitoring.

Some learnings:

Ref: https://www.howtogeek.com/805629/too-many-open-files-linux/

rvizarreta commented 5 months ago

Remote controls still need testing.