Skip to content
Snippets Groups Projects
Commit ca6023eb authored by Paulus Kruger's avatar Paulus Kruger
Browse files

config new RCUs updated

parent 85d9d4ff
Branches
Tags
No related merge requests found
Pipeline #48584 passed
......@@ -11,10 +11,6 @@ drivers:
type: i2c_array #An array of similar devices connected to an I2C switch
parent: I2C1
parameters: [20,22,0,2, 4,6,10,12, 14,16,18,24, 26,28,30,8, 7,5,3,1, 23,21,19,13, 11,9,15,17, 31,29,27,25] #RCU lookup table
# parameters: [32,32,32,32 ,32,32,10,12 ,14,16,18,24 ,26,28,30,8 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32] #RCU lookup table
# parameters: [20,22,0,2,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32] #RCU lookup table
# parameters: [22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0]#repeat 1..7 for RCUH BF test
# 12,14,16,18,24,26,28,30,8,7,5,3,1,23,21,19,13,11,9,15,17,31,29,27,25] #RCU lookup table
I2Ccut: 35 #error count to disable I2C (14 for LTS?)
status: RECVTR_I2C_error
- name: I2C_HBAT
......@@ -347,7 +343,7 @@ variables:
driver: I2C_RCU
devreg: AN.Temp
width: 23
scale: 4.210e-3 #Scaled 1.1 for 3.3V ref. 3.827e-3 for 3.0V #T=DATAOUT * Vref/12.25/32. Vref=1.5 V
scale: 3.827e-3 #3.0V ref #T=DATAOUT * Vref/12.25/32. Vref=1.5 V
convert_unit: Kelvin2Celsius
rw: ro
dtype: double
......@@ -361,7 +357,7 @@ variables:
driver: I2C_RCU
devreg: AN.V_3v3
width: 23
scale: 1.609e-6 #Scaled 1.1: 1.463e-6 #3.0V
scale: 1.463e-6 #3.0V ref, divider r=1/4, scale=Vref/2^23 / r
rw: ro
dtype: double
dim: 32
......@@ -374,7 +370,7 @@ variables:
driver: I2C_RCU
devreg: AN.V_1v8
width: 23
scale: 7.8679e-7 #Scaled 1.1: 7.1526e-7 #3.0V ref
scale: 7.1526e-7 #3.0V ref, divider r=1/2, scale=Vref/2^23 / r
rw: ro
dtype: double
dim: 32
......@@ -387,7 +383,7 @@ variables:
driver: I2C_RCU
devreg: AN.V_2v5
width: 23
scale: 7.8679e-7 #Scaled 1.1: 7.1526e-7 #3.0V ref
scale: 7.1526e-7 #3.0V ref, divider r=1/2
rw: ro
dtype: double
dim: 32
......@@ -400,7 +396,7 @@ variables:
driver: I2C_RCU
devreg: [AN.V_Ant_O0,AN.V_Ant_O1,AN.V_Ant_O2]
width: 23
scale: 1.57356e-5 #Scaled 1.1: 1.43051e-5 #3V ref
scale: 1.43051e-5 #3V ref, divider r=1/40
rw: ro
dtype: double
dim: 96
......@@ -414,7 +410,7 @@ variables:
driver: I2C_RCU
devreg: [AN.V_Ant_I0,AN.V_Ant_I1,AN.V_Ant_I2]
width: 23
scale: 1.57356e-5 #Scaled 1.1: 1.43051e-5 #3V ref
scale: 1.43051e-5 #3V ref, divider r=1/40
rw: ro
dtype: double
dim: 96
......@@ -428,7 +424,7 @@ variables:
driver: I2C_RCU
devreg: [AN.I_Ant0,AN.I_Ant1,AN.I_Ant2]
width: 23
scale: 2.62262e-7 #4.5K res
scale: 3.9736e-7 #3V ref, 2.7K res, =Vref/2^(23) * 3000/R
rw: ro
dtype: double
dim: 96
......@@ -472,7 +468,7 @@ variables:
mask: RCU_mask
- name: RCU_DTH_shutdown
description: False means dither source & ADC powered on.
description: False means dither source powered on.
driver: I2C_RCU
devreg: IO3.GPIO2
width: 1
......@@ -480,7 +476,6 @@ variables:
rw: ro
dtype: boolean
dim: 32
# dim2: [3,32]
mask: RCU_mask
debug: True
......@@ -509,7 +504,6 @@ variables:
dim2: [3,32]
mask: ANT_mask
- name: RCU_PCB_ID
description: Unique PCB ID
driver: I2C_RCU
......
......@@ -11,10 +11,6 @@ drivers:
type: i2c_array #An array of similar devices connected to an I2C switch
parent: I2C1
parameters: [20,22,0,2, 4,6,10,12, 14,16,18,24, 26,28,30,8, 7,5,3,1, 23,21,19,13, 11,9,15,17, 31,29,27,25] #RCU lookup table
# parameters: [20,22,0,2 ,4,6,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32 ,32,32,32,32] #RCU lookup table
# parameters: [20,22,0,2,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32] #RCU lookup table
# parameters: [22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0,2,4,6,10,22,0]#repeat 1..7 for RCUH BF test
# 12,14,16,18,24,26,28,30,8,7,5,3,1,23,21,19,13,11,9,15,17,31,29,27,25] #RCU lookup table
I2Ccut: 35 #error count to disable I2C (14 for LTS?)
status: RECVTR_I2C_error
- name: I2Cbb1
......@@ -45,12 +41,12 @@ drivers:
- name: SPIbb2
type: spibitbang1
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [3,2,2,1]
parameters: [1,2,2,1]
parent: I2C_RCU
- name: SPIbb3
type: spibitbang1
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.CONF1,IO3.GPIO2]
parameters: [5,4,4,2]
parameters: [1,4,4,2]
parent: I2C_RCU
......@@ -426,11 +422,23 @@ variables:
mask: RCU_mask
- name: RCU_DTH_shutdown
description: False means dither source & ADC powered on.
description: False means dither source powered on.
driver: I2C_RCU
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.GPIO2]
devreg: IO3.GPIO2
width: 1
bitoffset: [7,6,7]
bitoffset: 7
rw: rw
dtype: boolean
dim: 32
mask: RCU_mask
debug: True
- name: RCU_ADC_shutdown
description: False means ADC powered on.
driver: I2C_RCU
devreg: [IO3.GPIO1,IO3.GPIO1,IO3.GPIO1]
width: 1
bitoffset: [6,3,5]
rw: ro
dtype: boolean
dim: 96
......@@ -438,6 +446,7 @@ variables:
mask: ANT_mask
debug: True
- name: RCU_PWR_ANT_on
description: Antenna power output ON/OFF control. Monitored by Ant_VOUT.
driver: I2C_RCU
......@@ -464,7 +473,7 @@ variables:
description: RCU version number
driver: I2C_RCU
devreg: ROM.Version
width: 0x80 #16 characters
width: 0x100 #32 characters
rw: ro
dtype: string
dim: 32
......@@ -475,7 +484,7 @@ variables:
description: PCB number (astron.nl/webforms/IenS-Boarden/view.php?id=xxx)
driver: I2C_RCU
devreg: ROM.Serial
width: 0x80 #16 characters
width: 0x100 #32 characters
rw: ro
dtype: string
dim: 32
......@@ -659,12 +668,13 @@ methods:
- ADC3_on: 0
# - WAIT: 500 #ms to wait
#Toggle enable pin
- IO3.GPIO1: 0xD5 #ADC_SDIO=high, clk=low, DTH_EN=high
- IO3.GPIO2: 0xC7 #ADC SC=high, DTH_SDA=high, DTH_EN=high
- RCU_ADC_shutdown : [1,1,1]
# - IO3.GPIO1: 0xD5 #ADC_SDIO=high, clk=low, DTH_EN=high
# - IO3.GPIO2: 0xC7 #ADC SC=high, DTH_SDA=high, DTH_EN=high
- WAIT: 100 #ms to wait #todo: test if necessary
- IO3.GPIO1: 0x15 #enable ADC 0,1
- IO3.GPIO2: 0x47 #enable ADC 2
- RCU_ADC_shutdown : [0,0,0]
# - IO3.GPIO1: 0x15 #enable ADC 0,1
# - IO3.GPIO2: 0x47 #enable ADC 2
- RCU_DTH_on: Update #check dither while giving ADCs some time to lock
# - WAIT: 500 #ms to wait
- RCU_ADC_locked: Update #disabled for testing
......
This diff is collapsed.
##NB translator should be off or monitor should be 0
name='RECVTR_HB' #YAML config file with all register values etc
name='RECVTR_LB' #YAML config file with all register values etc
varID='RCU_PCB_ID'
#name='UNB2TR' #YAML config file with all register values etc
......@@ -11,17 +11,17 @@ logFile='SetVersion'
import logging
import argparse
from opcuaserv import opcuaserv
from opcuaserv import i2client
from opcuaserv import yamlreader
from pypcc.opcuaserv import opcuaserv
from pypcc.opcuaserv import i2client
from pypcc.opcuaserv import yamlreader
#from opcuaserv import pypcc2
from i2cserv import i2cthread
from pypcc.i2cserv import i2cthread
import threading
import time
import sys
import signal
from yamlconfig import Find;
import yamlconfig as yc
from pypcc.yamlconfig import Find;
import pypcc.yamlconfig as yc
from datetime import datetime
testtime=datetime.now().strftime("%y-%m-%d %H:%M")
......
from test_common import *
from time import sleep
connect("opc.tcp://localhost:4841/")
names=get_all_variables()
for name in names:
att=get_value(name)
print(name,'=',att)
disconnect();
......@@ -5,8 +5,10 @@ sys.path.insert(0, "..")
import logging
import time
from opcua import Client
from opcua import ua
from asyncua.sync import ua, Client
#from opcua import Client
#from opcua import ua
#import numpy as np
def connect(Address=Address):
......@@ -45,9 +47,10 @@ def get_all_variables():
vars0=[]
obj0=root.get_child(["0:Objects"])
for nodeid in obj0.get_children():
ch = client.get_node(nodeid)
name=ch.get_display_name().Text
if ch.get_node_class()==ua.NodeClass.Variable:
# print(nodeid)
ch = client.get_node(nodeid.nodeid)
name=ch.read_display_name().Text
if ch.read_node_class()==ua.NodeClass.Variable:
vars0.append(name)
return vars0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment