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

Add missing UNB2TR points, NaN on startup

parent cc4d8c62
Branches
Tags
No related merge requests found
Pipeline #100333 failed
......@@ -389,6 +389,15 @@ variables:
dim: 2
monitor: true
- name: [UNB2_POL_QSFP_N01_IOUT,UNB2_POL_QSFP_N23_IOUT]
driver: switch_PS
devreg: [POL_QSFP0.IOUT,POL_QSFP1.IOUT]
width: 16
rw: ro
dtype: double
scale: smbus_2bytes_to_float
dim: 2
- name: UNB2_DC_DC_48V_12V_IOUT
driver: switch_PS
# devreg: [DC_DC.IOUT,0x2.0x8C,0x1.0x8C,0xF.0x8C,0xE.0x8C,0xD.0x8C]
......@@ -413,6 +422,15 @@ variables:
dim: 2
monitor: true
- name: [UNB2_POL_QSFP_N01_TEMP,UNB2_POL_QSFP_N23_TEMP]
driver: switch_PS
devreg: [POL_QSFP0.TEMP,POL_QSFP1.TEMP]
width: 16
rw: ro
dtype: double
scale: smbus_2bytes_to_float
dim: 2
- name: UNB2_DC_DC_48V_12V_TEMP
driver: switch_PS
# devreg: DC_DC.TEMP
......
......@@ -3,6 +3,7 @@ import struct
import time
from pypcc.yamlconfig import *
import logging
import numpy as np
from .smbus_float import *
from pypcc.opcuaserv import convert_unit
def bytes2int(bts):
......@@ -165,7 +166,7 @@ class yamlreader(yamlconfig):
#print(v.name,dim)
varvalue2=0
if datatype in ['uint8','uint16','uint32','uint64']: varvalue2=dim1*[0]
elif datatype=='double': varvalue2=dim1*[0.0]
elif datatype=='double': varvalue2=dim1*[np.nan]
elif datatype=='boolean': varvalue2=dim1*[False]
elif datatype=='string': varvalue2=dim1*[""]
if len(varvalue2)==1: varvalue2=varvalue2[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment