-
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
Gaps in Log data accompanied by screen flash - Priority 2 #48
Comments
Maybe the delay is a short version of the issue #57, although there the "all on" command is delayed by seconds. |
Based on the suggestion received via email, the following code was used for testing: function gapsInLogXLSX(testCase)
testCase.panelsController.setRootDirectory("C:\matlabroot\G4");
testCase.panelsController.setControlMode(1);
rsps = [];
runTime = [];
seqTime = [];
for ii=1:400
testCase.panelsController.startLog()
testCase.panelsController.setPatternID(ii);
testCase.panelsController.setPatternFunctionID(ii);
testCase.panelsController.setPositionX(ii);
startTime = tic;
rsp = testCase.panelsController.startDisplay(23);
seqComplete = toc(startTime);
rsps = [rsps; rsp];
runTime = [runTime; 23];
seqTime = [seqTime; seqComplete];
testCase.panelsController.stopLog();
end
T = table(rsps, runTime, seqTime);
writetable(T, "gapsInLog.xlsx", "Sheet", "gaps")
end With G4 Host version 237 the following metrics were produced:
|
G4 Host version 239 was suggested as a solution to this issue. Similar metrics for this version looks like this:
After the first iteration of the test the above summary suggests that there are roughly the same amount of issues happening, so version v239 doesn't seem to fix the issue. |
Looking into the issue a bit more in depth: The I then looked into the TDMS-log files of that trial, specifically the In other cases of the same test I have seen gaps as big s 50000µs ...or 42000µs Since the total number of trials above the threshold hasn't changed between version 237 and 239, the assumption is that v239 doesn't fix the issue. |
For the tests before I had used a wrong combination of pattern and arena configuration (4x12 pattern, 3x12 arena). Configured correctly, the issue seems to become less frequent on my setup. I ran 3 full experiments with v239 and only in one of them I found the error using the same strategy (inside |
After updating the G4 Host to v240, I ran two tests, both produced the same type of errors. For For |
Response via email:
|
Via email:
|
response via email:
|
if this happens only 3 times during a 66 hour interval, then we can live with the problem. If it happens several times during a 20min experiment (as it does for the test scripts), then this would ruin a lot of valuable experiments. Blank frames (or even delayed frames) are not an option for our experiments, they ruin data as well. For an increasing number of our experiment we are using electrophysiology and rely on continuous delivery of stimuli -- any small deviation from the 2ms frame length might look like a false signal in our measurements. I just wanted to give you this as an explanation why we are so persistent on getting this issue fixed now -- or at least understand why we are seeing them on some of our setups so we can avoid the same problem on others. |
response via email:
|
Also that is not really an option: Closed loop experiments, where the behavior of the fly or even just the elecrophysiological reaction triggers a change of the stimulus, are an important part of our experiments. If anything, these type of latencies should become shorter if possible. |
Test build. Reworked FPGA polling and Frame data passing to see if it alleviates issue with gaps in the play out. |
To confirm that the error might get fixed with v243, I reran the test with v240 and I was still able to replicate the issue, for example in gapInLogs-v240-test11, After the upgrade to v243 (linked above) I still see a similar error (gapsInLog-v243-test03, even several times within 400 trials (gapsInLog-v243-test03, |
Can you go into the configuration file and change the GS16 Buffer Size (Stream) to 20000 and try it again? |
I ran it a few times with the increased GS16 Buffer size and did not see the same problem. That's great. For my understanding: What are the side effects of this change. What exactly are the expected changes in the timing? |
So this tells me that host software will occasionally have a blip where it prevents the next frames from being pushed into the buffer in time. This is probably due to windows being a non RT OS. Increasing the buffer size helps mitigate this moments because there are more frames in the buffer giving it enough time to recover. The issue with increasing the buffer size is higher latency for closed operations because the buffer needs to be emptied out before the new frames reach the arena. 20000 may be on the high end so you may be able to lower that. Each frame is around 2000 elements for GS=16. I may have to think of an alternative way to do this if the closed loop latency is too long. |
Response via email on 8/9/22:
function gapsInLogXLSX(testCase)
testCase.panelsController.setRootDirectory("C:\matlabroot\G4");
testCase.panelsController.setControlMode(1);
rsps = [];
runTime = [];
seqTime = [];
for ii=1:400
testCase.panelsController.startLog()
testCase.panelsController.setPatternID(ii);
testCase.panelsController.setPatternFunctionID(ii);
% testCase.panelsController.setPositionX(ii);
startTime = tic;
rsp = testCase.panelsController.startDisplay(23);
seqComplete = toc(startTime);
testCase.panelsController.stopLog();
rsps = [rsps; rsp];
runTime = [runTime; 23];
seqTime = [seqTime; seqComplete];
end
T = table(rsps, runTime, seqTime);
writetable(T, "gapsInLog.xlsx", "Sheet", "gaps")
end |
You reset the G4 Host from v244 back to version v243. Is that intentionally or can I update to v244? I ran exactly the same test (but with the I also pulled experimental data from an actual rig that we are using for experiments and I am seeing the error there as well. Just for a subset of experiments and reaching back to March, I see the problem happening consistently over time. In that case I was only looking for the longest delays in frames and the longest one was 2325043 (instead of 2000), with a mean maximum error (sorry, bit of a "wild" descriptive statistical concept) of around 9600. |
Tried to move frame data to the FPGA for more reliable frame outputs, but insufficient space on FPGA to store all the data. Will try running the software in 64-bit LabVIEW to see if any performance is more reliable. Do you know if C-state is enabled in your BIOS? When C-state is enabled, it can affect performance of PCIe slots. |
Has this been resolved with the latest releases? |
@floesche Has this issue been resolved? |
Summary: Identify and fix cause for spontaneous all-off.
Description: Occasionally there is a flash on the arena screen (flash meaning the LEDs turn off for about ~20 ms). The log of this data then shows an accompanying ~20 ms gap in all data, including timestamps. This happens in any context, whether a trial is being run in a particular mode or whether the screens are just running an all-on command. We have been unable to recreate any particular circumstance in which this happens. Running the same code on different days will result in different frequency, but it does inevitably happen on occasion.
The text was updated successfully, but these errors were encountered: