Moku model: Go M2, Firmware 634.0
Operating system: Windows 11
Software version: API: 4.1.1.1, CLI: 4.1.1.1, MokuOS 4.1.1
Bug or support request description:
I’m trying to start a streaming on one of my Moku:Gos, set up as a PID controller, which previously was working before updating to OS 4.1.1.
Currently I’m getting an Error code 6 when I try to start streaming for the first time. If I handle and try again, no error is raised, but then the stream status immediately goes into overflow, even for a very relaxed streaming duration of 5s with a 10Hz sample rate. I’d appreciate any insight into this error. See my simplified code example + output below.
from moku import instruments, exceptions
# Establish PID controller instrument
i = instruments.PIDController(ip='169.254.154.147', force_connect=True)
# Setup PID Controller Behavior:
i.enable_input(1, enable=True)
i.enable_input(2, enable=True)
i.set_by_frequency(channel=1)
i.set_by_frequency(
channel=1,
prop_gain=-30.0,
int_crossover=0.75,
diff_crossover=None,
)
i.enable_output(channel=1, signal=True, output=True)
i.enable_output(channel=2, signal=True, output=True)
i.set_monitor(1, "Output1")
i.set_monitor(2, "Input1")
# Try to start streaming
try:
i.start_streaming(duration=5, rate=10, mode="Precision") #Fails with error code 6
except exceptions.MokuException as e:
print(e)
print('Trying again')
# Try again:
i.stop_streaming()
i.start_streaming(duration=5, rate=10, mode="Precision")
print(i.get_stream_status()) # No error
print(i.get_stream_data()) # Returns {'':[]}
print(i.get_stream_status()) # Overflow error
Which outputs
['An error occurred while starting the logging session (error code 6)']
Trying again
{'available_memory': 40800256, 'cumulative_size': 0, 'error': '', 'no_of_chunks': 0, 'status': 'RUNNING', 'stream_id': 'logsink0'}
{'': []}
{'available_memory': 41029632, 'cumulative_size': 0, 'error': 'Overflow, out of memory', 'no_of_chunks': 0, 'status': 'ERROR', 'stream_id': 'logsink0'}
Process finished with exit code 0