Mathias provide the following solution :
Code: Select all
sudo ln -s /var/www/pictory/projects/_config.rsc /etc/revpi/config.rsc
I recently did an RevPi update and the system is in a strange state.
From the terminal :
Code: Select all
./piTest -r pt1000,h
Could not read variable pt1000. Internal Error
With the following python snippets:
Code: Select all
f = open("/dev/piControl0", "wb+", 0)
print("Getting Offsets...", f)
# We are searching the offset and the byte of "RevPiStatus" and other process variables of the process image using KB_FIND_VARIABLE
# the IOCTL-parameter is calculated using the ASCIIC 'K' which is shifted by 8 bits plus the ID of the desired function (=17)
prm = (b'K'[0] << 8) + 17
# The argument for the function 17 is a packed byte array with contains 37 bytes. The first 32 bytes consist of the symbolic name
name = struct.pack('37s', b"RevPiStatus")
# The result values are written into a byte-array
# in which the first 32 byte are the symbolic name then 2 bytes for the offset and then 1 byte for the bitposition and then 2 byte for the length.
ret = fcntl.ioctl(f, prm, name)
#Line 151 on top of this one
Code: Select all
Getting Offsets... <_io.FileIO name='/dev/piControl0' mode='rb+'>
Traceback (most recent call last):
File "ProcessImageInterface.py", line 151, in <module>
ret = fcntl.ioctl(f, prm, name)
FileNotFoundError: [Errno 2] No such file or directory
Thank you
Export of my current configuration from Pictory
Code: Select all
RevPiStatus 0 //BYTE
RevPiIOCycle 1 //BYTE
RS485ErrorCnt 2 //WORD
Core_Temperatur 4 //BYTE
Core_Frequency 5 //BYTE
RevPiLED 6 //BYTE
RS485ErrorLimit1 7 //WORD
RS485ErrorLimit2 9 //WORD
sw_1 11.0 //BOOL
sw_2 11.1 //BOOL
sw_3 11.2 //BOOL
sw_4 11.3 //BOOL
sw_5 11.4 //BOOL
sw_6 11.5 //BOOL
sw_7 11.6 //BOOL
sw_8 11.7 //BOOL
I_9 11.8 //BOOL
I_10 11.9 //BOOL
I_11 11.10 //BOOL
I_12 11.11 //BOOL
I_13 11.12 //BOOL
I_14 11.13 //BOOL
I_15 11.14 //BOOL
I_16 11.15 //BOOL
Output_Status 13 //WORD
Status 15 //WORD
e 81.0 //BOOL
d 81.1 //BOOL
c 81.2 //BOOL
dp 81.3 //BOOL
g 81.4 //BOOL
f 81.5 //BOOL
a 81.6 //BOOL
b 81.7 //BOOL
gnd 81.8 //BOOL
24v 81.9 //BOOL
O_11 81.10 //BOOL
O_12 81.11 //BOOL
O_13 81.12 //BOOL
O_14 81.13 //BOOL
O_15 81.14 //BOOL
O_16 81.15 //BOOL
InputMode_1 99 // ##ATTR_COMMENT##
InputMode_2 100 // ##ATTR_COMMENT##
InputMode_3 101 // ##ATTR_COMMENT##
InputMode_4 102 // ##ATTR_COMMENT##
InputMode_5 103 // ##ATTR_COMMENT##
InputMode_6 104 // ##ATTR_COMMENT##
InputMode_7 105 // ##ATTR_COMMENT##
InputMode_8 106 // ##ATTR_COMMENT##
InputMode_9 107 // ##ATTR_COMMENT##
InputMode_10 108 // ##ATTR_COMMENT##
InputMode_11 109 // ##ATTR_COMMENT##
InputMode_12 110 // ##ATTR_COMMENT##
InputMode_13 111 // ##ATTR_COMMENT##
InputMode_14 112 // ##ATTR_COMMENT##
InputMode_15 113 // ##ATTR_COMMENT##
InputMode_16 114 // ##ATTR_COMMENT##
InputDebounce 115 // ##ATTR_COMMENT##
OutputPushPull 117 // ##ATTR_COMMENT##
OutputOpenLoadDetect 119 // ##ATTR_COMMENT##
OutputPWMActive 121 // ##ATTR_COMMENT##
OutputPWMFrequency 123 // ##ATTR_COMMENT##
pot 124 //INT
humidity 126 //INT in %
fromOut2 128 //INT
fromOut1 130 //INT
InputStatus_1 132 //BYTE
InputStatus_2 133 //BYTE
InputStatus_3 134 //BYTE
InputStatus_4 135 //BYTE
pt1000 136 //INT
RTDStatus_1 140 //BYTE
OutputStatus_1 142 //BYTE
OutputStatus_2 143 //BYTE
ao1 144 //INT
ao2 146 //INT
Input1Range 148 //You must use wire bridges for current measurement! ##ATTR_COMMENT##
Input1Multiplier 149 // ##ATTR_COMMENT##
Input1Divisor 151 // ##ATTR_COMMENT##
Input1Offset 153 // ##ATTR_COMMENT##
Input2Range 155 //You must use wire bridges for current measurement! ##ATTR_COMMENT##
Input2Multiplier 156 // ##ATTR_COMMENT##
Input2Divisor 158 // ##ATTR_COMMENT##
Input2Offset 160 // ##ATTR_COMMENT##
Input3Range 162 //You must use wire bridges for current measurement! ##ATTR_COMMENT##
Input3Multiplier 163 // ##ATTR_COMMENT##
Input3Divisor 165 // ##ATTR_COMMENT##
Input3Offset 167 // ##ATTR_COMMENT##
Input4Multiplier 170 // ##ATTR_COMMENT##
Input4Divisor 172 // ##ATTR_COMMENT##
Input4Offset 174 // ##ATTR_COMMENT##
ADC_DataRate 176 //Use lowest value for highest precision and a maximum 50 Hz suppression ##ATTR_COMMENT##
RTD1Type 177 // ##ATTR_COMMENT##
RTD1Wiring 178 //You must use wire bridges for 2-wire sensors! ##ATTR_COMMENT##
RTD1Multiplier 179 // ##ATTR_COMMENT##
RTD1Divisor 181 // ##ATTR_COMMENT##
RTD1Offset 183 // ##ATTR_COMMENT##
Output1Range 193 // ##ATTR_COMMENT##
Output1EnableSlew 194 //Enable slew rate deceleration ##ATTR_COMMENT##
Output1SlewStepSize 195 //Slew rate step size ##ATTR_COMMENT##
Output1SlewClock 196 //lock rate of slew rate deceleration in kHz ##ATTR_COMMENT##
Output1Multiplier 197 // ##ATTR_COMMENT##
Output1Divisor 199 // ##ATTR_COMMENT##
Output1Offset 201 // ##ATTR_COMMENT##
Emergency_stop 213 //BYTE