I wish to read float values from a file as I run the kernel code. The float conversion results in this error message:
repository/rtio.py:19:16-19:21: error: float cannot be invoked with the arguments (NoneType)
if float(val) >= 1.0:
^^^^^
repository/rtio.py:19:16-19:21: note
repository/rtio.py:19:16-19:21: error: float cannot be invoked with the arguments (NoneType)
if float(val) >= 1.0:
^^^^^
repository/rtio.py:19:16-19:21: note
0 ^^^^^
The ARTIQ code:
class RTIO(EnvExperiment):
def build(self):
self.setattr_device("core") #Essential stuff
self.ttl4 = self.get_device("ttl4") #finds TTL ch 4 on SINARA and naming it TTL4
@kernel
def run(self):
while True:
delay(100 * ms)
file.readline()
val = file.readline()
if float(val) >= 1.0:
self.ttl4.on()
else:
self.ttl4.off()
`