-
Notifications
You must be signed in to change notification settings - Fork 4
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
Provide command to add information to log file. - Priority 3 #52
Comments
Just to clarify, the command would be 0x0A,0x47,CLASS,NANO_SINCE_EPOCH |
That sounds good. Inside the TDMS file, CLASS should be logged as a char (eg 0x00…0xFF or 0…255), NANO_SINCE_EPOCH as int64_t. |
Currently, both CLASS and NANO_SINCE_EPOCH get logged inside I see two solutions: either log the current format inside Secondly I noticed that the timing is unexpected: I try to log 4 consecutive numbers as quickly as possible, avoiding loops or anything else that might be slow. The next 4 consecutive numbers are from a new iteration of a loop. Pseudocode (in reality I used pre-computed random numbers...): for i = 1:20
panelsController.sendSyncLog(1, i);
panelsController.sendSyncLog(1, i+1);
panelsController.sendSyncLog(1, i+2);
panelsController.sendSyncLog(1, i+3);
end When doing that, I see delays between the individual How come this number fluctuates that much? We want to synchronize external data to frames, but at this point the sync command might up to 5 frames off. Can this be reduced? Would it ever be possible to get this command to have within-frame precision? |
I modified the querying of the FPGA variables to try to optimize the communication between the host and the FPGA, but this causes some delay on the timestamp updates. I can try doing the timestamp queries like I did previously to get a more accurate timestamp and then give you a new release. |
https://www.dropbox.com/s/o5um3q92rgor60c/G4%20Host%28Ver1-0-0-244%29.zip?dl=0 Build with update FPGA tick query and separation of Class and Data in its own columns. |
The separation into class and data does not work well, the second class should be For the timing, I think this has gotten better. Nevertheless I still see some jitter. The following data shows the timing of a few commands that I send via this code inside a loop, with testCase.panelsController.setPatternFunctionID(i);
testCase.panelsController.sendSyncLog(i, j);
testCase.panelsController.sendSyncLog(i, j+1);
testCase.panelsController.sendSyncLog(i, j+2);
testCase.panelsController.sendSyncLog(i, j+3); The TDMS time column is the time of the individual command with reference to the Set Control Mode command. A value of I also captured the network packets on the loopback device. The Network time column is the time after the set Control Mode packet was sent by MATLAB. A value of The Offset column is the difference between the TDMS time column and the Network time column. A value of Most of the sync log commands seem to be logged 1ms (between 900ns and 1300ns) after the network package was sent, while some of the other commands are faster. In this example the This seems to be a systematic difference between some of the commands -- this is unexpected to me. Can you explain where this difference comes from? What exactly is the time that is getting logged in the TDMS files? |
Release with the fix for class issue. So here is a simplified diagram of how the TCP loop works. |
It seems, v244 introduces a new issue: The @achiusciotex : Can you see this on your side or do you need an explicit test case? |
Will take a look at this issue next week. |
@floesche Was able to reproduce. Will provide new build either today or tomorrow. Did you install the LabVIEW 64-bit runtime already? |
Not on the computer the issue is most urgent to fix. |
@floesche |
Summary: Provide command to add information to log file.
Description: Provide an additional command that writes the provided information to the tdms log file. The information that needs logging has two parts and is 8bit + 64bit long. A suggested format for ‘log_data’ could be [0x09 0x47 CLASS NANO_SINCE_EPOCH]. CLASS would be a 1 byte, NANO_SINCE_EPOCH a int64_t data type.
The information can either be logged in the base TDMS file in a new group ‘timesync’ (in addition to ‘Treadmill’ and ‘Commands Received’) or in an additional file _SYNC.tdms. The information needs to be logged together with the usual ‘Time’ that is used in the other log structures.
The text was updated successfully, but these errors were encountered: