-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fast succession of 'all on' - 'all off' breaks system #57
Comments
There is no problem when just sending 100s of 'all on' or 100s of 'all off' commands in fast succession. |
Adding a delay between sending an 'all on' and an 'all off' command decreases the chance of creating this problem. For example, adding an additional pause of 1ms triggers the problem only after around 15..20 iterations, increasing the pause to 1.5ms means the problem only appears reliably after 25..30 iterations and so on. The more I increase the delay, the less likely the system breaks, but I have seen it break for 2ms delay after 2, 7, 85, or iterations, for a 3ms delay after 89, 447, 856, for 4ms delay after 3147 or 7831 iterations. The delays are introduced on the script side. According to the output of the Main Host, the actual commands are sent further apart. If the time log there is to be trusted, then most commands are received with more than 10ms delay, but whenever the script executes faster for whatever reason and the delay is less than 10ms, the Main Host goes into the unrecoverable state. Possibly this is related to #48 and maybe more detailed logging, as suggested in #53 can help identifying the issue. |
- add a test case for OnOff with delays for JaneliaSciComp#57 - add set active AI channels - add start log - add stop log
Changing the |
(response via email 2022-04-01T11:46):
|
Sending a blank frame for I thought the |
Sending the 'all on' (0x01 0xFF) and 'all off' (0x01 0x00) several times in fast succession leads the G4 system in an undefined state and slows down the execution of commands in the range of seconds (factor ~5000).
In a script I sent 15 times an 'all on' and then an 'all off' as fast as possible. The error happens each time I run the script, usually between the 4th and 10th iteration.
At some point (in the example below at the 8th "all off"), the response gets delayed significantly, in this example by around 15 seconds, typically between 6 and 18 seconds (median around 9.2s). Once this happened, all following 'all on' commands get delayed by an amount in the same range while 'all off' are executed immediately.
This is apparently an error on the Main Host side: If I send the commands without waiting for a response my script has long finished while the commands are still being executed (with the delay). This suggests, the commands are stuck somewhere on the Main Host input queue.
The output inside the main host window contains the following text:
The text was updated successfully, but these errors were encountered: