Forum Replies Created
-
AuthorPosts
-
aParticipant
I rewrote part of the Python code as follows and ran it and got the following error output. I am suspicious about the “device or resource busy” part, but has this ever happened before? Or is it still caused by a device failure?
#We now connect the multiplexer to the appropriate device to allow digital communications.
tries=0
while(tries!=-1):
try:
print(“Attempting Multiplexer communication…”)
sysItems[‘Multiplexer’][‘device’].write8(int(0x00),int(sysItems[‘Multiplexer’][M],2)) #We have established connection to correct device.
print(“Multiplexer communication successful.”)
check=(sysItems[‘Multiplexer’][‘device’].readRaw8()) #We check that the Multiplexer is indeed connected to the correct channel.if(check==int(sysItems[‘Multiplexer’][M],2)):
tries=-1
else:
tries=tries+1
time.sleep(0.02)
print(str(datetime.now()) + ‘ Multiplexer didnt switch ‘ + str(tries) + ” times on ” + str(M))except Exception as e:
# 例外が発生した場合のデバッグログ
print(f”Exception occurred: {e}”)
tries = tries + 1
time.sleep(0.02)
print(str(datetime.now()) + f’ Failed Multiplexer Comms {tries} times’)# except: #If there is an error in the above.
# tries=tries+1
# time.sleep(0.02)
# print(str(datetime.now()) + ‘ Failed Multiplexer Comms ‘ + str(tries) + ” times”)
if (tries>2):
try:
sysItems[‘Multiplexer’][‘device’].write8(int(0x00),int(0x00)) #Disconnect multiplexer.
print(str(datetime.now()) + ‘Disconnected multiplexer on ‘ + str(M) + ‘, trying to connect again.’)
except:
print(str(datetime.now()) + ‘Failed to recover multiplexer on device ‘ + str(M))
if (tries==5 or tries==10 or tries==15):
toggleWatchdog() #Flip the watchdog pin to ensure it is working.
GPIO.output(‘P8_15’, GPIO.LOW) #Flip the Multiplexer RESET pin. Note this reset function works on Control Board V1.2 and later.
time.sleep(0.1)
GPIO.output(‘P8_15’, GPIO.HIGH)
time.sleep(0.1)
print(str(datetime.now()) + ‘Did multiplexer hard-reset on ‘ + str(M))if tries>20: #If it has failed a number of times then likely something is seriously wrong, so we crash the software.
sysItems[‘Watchdog’][‘ON’]=0 #Basically this will crash all the electronics and the software.
out=0
print(str(datetime.now()) + ‘Failed to communicate to Multiplexer 20 times. Disabling hardware and software!’)
tries=-1
os._exit(4)root@beaglebone:~/chibio# bash cb.sh
[2021-04-05 23:28:34 +0000] [2540] [INFO] Starting gunicorn 20.1.0
[2021-04-05 23:28:34 +0000] [2540] [INFO] Listening at: http://192.168.7.2:5000 (2540)
[2021-04-05 23:28:34 +0000] [2540] [INFO] Using worker: sync
[2021-04-05 23:28:34 +0000] [2543] [INFO] Booting worker with pid: 2543
2021-04-05 23:28:41.544312 Starting watchdog
2021-04-05 23:28:44.028674 Initialising devices
Attempting Multiplexer communication…
Exception occurred: [Errno 110] Connection timed out
2021-04-05 23:28:44.133983 Failed Multiplexer Comms 1 times
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:44.194260 Failed Multiplexer Comms 2 times
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:44.253813 Failed Multiplexer Comms 3 times
2021-04-05 23:28:44.288253Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:44.345900 Failed Multiplexer Comms 4 times
2021-04-05 23:28:44.380247Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:44.437912 Failed Multiplexer Comms 5 times
2021-04-05 23:28:44.472268Failed to recover multiplexer on device M0
2021-04-05 23:28:44.725255Did multiplexer hard-reset on M0
Attempting Multiplexer communication…
Exception occurred: [Errno 110] Connection timed out
2021-04-05 23:28:44.826896 Failed Multiplexer Comms 6 times
2021-04-05 23:28:44.864357Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:44.921920 Failed Multiplexer Comms 7 times
2021-04-05 23:28:44.956249Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:45.013899 Failed Multiplexer Comms 8 times
2021-04-05 23:28:45.048260Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:45.105883 Failed Multiplexer Comms 9 times
2021-04-05 23:28:45.140260Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:45.197740 Failed Multiplexer Comms 10 times
2021-04-05 23:28:45.232284Failed to recover multiplexer on device M0
2021-04-05 23:28:45.485275Did multiplexer hard-reset on M0
Attempting Multiplexer communication…
Exception occurred: [Errno 110] Connection timed out
2021-04-05 23:28:45.585974 Failed Multiplexer Comms 11 times
2021-04-05 23:28:45.620403Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:45.677917 Failed Multiplexer Comms 12 times
2021-04-05 23:28:45.712259Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:45.769905 Failed Multiplexer Comms 13 times
2021-04-05 23:28:45.804273Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:45.861920 Failed Multiplexer Comms 14 times
2021-04-05 23:28:45.896267Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:45.953904 Failed Multiplexer Comms 15 times
2021-04-05 23:28:45.988262Failed to recover multiplexer on device M0
2021-04-05 23:28:46.241132Did multiplexer hard-reset on M0
Attempting Multiplexer communication…
Exception occurred: [Errno 110] Connection timed out
2021-04-05 23:28:46.337937 Failed Multiplexer Comms 16 times
2021-04-05 23:28:46.372237Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:46.430300 Failed Multiplexer Comms 17 times
2021-04-05 23:28:46.468259Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:46.525957 Failed Multiplexer Comms 18 times
2021-04-05 23:28:46.560253Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:46.617894 Failed Multiplexer Comms 19 times
2021-04-05 23:28:46.652281Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:46.709793 Failed Multiplexer Comms 20 times
2021-04-05 23:28:46.744330Failed to recover multiplexer on device M0
Attempting Multiplexer communication…
Exception occurred: [Errno 16] Device or resource busy
2021-04-05 23:28:46.801909 Failed Multiplexer Comms 21 times
2021-04-05 23:28:46.836761Failed to recover multiplexer on device M0
2021-04-05 23:28:46.838319Failed to communicate to Multiplexer 20 times. Disabling hardware and software!
[2021-04-05 23:28:46 +0000] [2540] [INFO] Shutting down: Master
[2021-04-05 23:28:46 +0000] [2540] [INFO] Reason: App failed to load.aParticipantThanks for the reply!
Is the moisture sensor track a device on the main reactor side?
I’m going back to the university tomorrow and will try to clean it up as advised.
I get a multiplexer error both when the Control Computer is connected to the main reactor with a cable and when it is not.
Is it possible that the moisture sensor track trip is also the cause of this error when the Control Computer and Main reactor are not connected by cable?
If there are other factors that could be causing this, please let me know.(This error occurred last Thursday while I was doing an experiment so I thought it could be caused by a trip.)
aParticipantI think I2C has something to do with it.
-
AuthorPosts