Compare commits
	
		
			2 commits
		
	
	
		
			b38e75e02b
			...
			c7f94c7141
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c7f94c7141 | |||
| 
							 | 
						26d297dcd3 | 
					 4 changed files with 37 additions and 27 deletions
				
			
		| 
						 | 
				
			
			@ -13,3 +13,24 @@ succbone is our "automation" system for the vacuum system of the SEM.
 | 
			
		|||
  - Signal two different vacuum levels to the original evacuation controller
 | 
			
		||||
    * Rough vacuum reached
 | 
			
		||||
    * High vacuum reached
 | 
			
		||||
- Diffusion pump temperature monitoring via three PT100 sensors
 | 
			
		||||
- Environmental temperature & humidity monitoring (external sensor)
 | 
			
		||||
 | 
			
		||||
### Device Overview
 | 
			
		||||
These are the main devices powering the succbone control system.  For details,
 | 
			
		||||
please check the wiring diagrams in [`panel.pdf`](./panel.pdf).
 | 
			
		||||
 | 
			
		||||
- `-KEB1`: BeagleBone as main control system with addonboard for PSU & analog 0-10V readout
 | 
			
		||||
- `-KED1`: MikroTik RB450G router as gateway to the outside and network switch
 | 
			
		||||
- `-KED2`: MODBUS-TCP to MODBUS-RTU bridge
 | 
			
		||||
- `-KEC1`: MODBUS-RTU 8x relay output and 8x digital input board
 | 
			
		||||
- `-KEC2`: MODBUS-RTU 8x PT100 500°C transmitter
 | 
			
		||||
- `-BTA1`: MODBUS-RTU environmental temperature & humidity sensor
 | 
			
		||||
- `-QAA1`: Contactor for the roughing pump interlock
 | 
			
		||||
- `-QAA2`: Contactor for the diffusion pump interlock
 | 
			
		||||
 | 
			
		||||
### 3D-Printed Components
 | 
			
		||||
- [DIN-rail mount for the BeagleBone](https://www.printables.com/model/1058768-beaglebone-din-mount)
 | 
			
		||||
- [DIN-rail mount for the MikroTik RB450G]
 | 
			
		||||
- (legacy: [DIN-rail mount for relay board](https://www.printables.com/model/1019947-relay-board-din-rail-mount))
 | 
			
		||||
- [Cable Strain Relief Plates](https://www.printables.com/model/932070-parametric-cable-strain-relief-plate)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										
											BIN
										
									
								
								succbone/succbone-control-panel.jpg
									 (Stored with Git LFS)
										
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								succbone/succbone-control-panel.jpg
									 (Stored with Git LFS)
										
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -6,7 +6,9 @@ import (
 | 
			
		|||
	"net/http"
 | 
			
		||||
	"os"
 | 
			
		||||
	"os/signal"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/simonvetter/modbus"
 | 
			
		||||
	"k8s.io/klog"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -55,9 +57,19 @@ func main() {
 | 
			
		|||
		}
 | 
			
		||||
		d.adcPirani = adc
 | 
			
		||||
 | 
			
		||||
		err = d.modbusConnect()
 | 
			
		||||
		// Setup modbus client
 | 
			
		||||
		d.modbusClient, err = modbus.NewClient(&modbus.ClientConfiguration{
 | 
			
		||||
			URL:     "tcp://10.250.241.20:8887",
 | 
			
		||||
			Timeout: 1 * time.Second,
 | 
			
		||||
		})
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			klog.Exitf("Failed to connect to modbus %v", err)
 | 
			
		||||
			klog.Exitf("Failed to setup modbus client %v", err)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Connect to modbus client
 | 
			
		||||
		err = d.modbusClient.Open()
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			klog.Warningf("Failed to connect to modbus TCP %v", err)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,29 +12,6 @@ func modbusValuesToFloat(v uint16) float32 {
 | 
			
		|||
	return float32(v) / 10.0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (d *daemon) modbusConnect() error {
 | 
			
		||||
	var err error
 | 
			
		||||
 | 
			
		||||
	d.mu.Lock()
 | 
			
		||||
	defer d.mu.Unlock()
 | 
			
		||||
 | 
			
		||||
	// Setup modbus client
 | 
			
		||||
	d.modbusClient, err = modbus.NewClient(&modbus.ClientConfiguration{
 | 
			
		||||
		URL:     "tcp://10.250.241.20:8887",
 | 
			
		||||
		Timeout: 1 * time.Second,
 | 
			
		||||
	})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	// Connect to modbus client
 | 
			
		||||
	err = d.modbusClient.Open()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (d *daemon) modbusRestart() error {
 | 
			
		||||
	d.modbusClient.Close()
 | 
			
		||||
	return d.modbusClient.Open()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue