My application is an 8.5 digit multimeter that uses megunolink. I use the message logger to output to a log file. I need to get the data into another program for real-time processing. Further processing needs 1) to use 64-bit double precision and 2) information available from other DMMs that are on a GPIB bus. So the framework I have to do this requires fusing the information from the megunolink DMM with GPIB DMMs using log files.
Long story short this works best if the message logger actually writes to the log without delay. Is there any way to accomplish this?
Thanks,
Randall.
e.g some Data:
2020-06-23 17:30:36: 5776140: C= 9.99977888
2020-06-23 17:30:37: 5777047: T= 28.64
2020-06-23 17:30:39: 5779226: C= 9.99977854
MessageLogger--can it write each line immediately?!
Hi, this is a limitation with the operating system. It chooses the right time to write data to disk. You can use the commands to stop and start the log from the arduino which I think will trigger the OS to write to disk.
Let me know how it goes.
Cheers
Phil
Let me know how it goes.
Cheers
Phil
-
- Posts: 3
- Joined: Wed Jun 24, 2020 12:37 am
Sure, I can try that. It will be more expensive, certainly, than just calling
fflush
on the file. That is the correct way to do it--if you have a file handle.
https://www.techonthenet.com/c_language ... %20buffer.
My GPIB program (I don't have the source code) explicitly mentions this as the way to allow other programs monitoring the file to pick up the data in a timely manner. Also, you don't lose any data should the program writing the file crash.
Thanks,
Randall
fflush
on the file. That is the correct way to do it--if you have a file handle.
https://www.techonthenet.com/c_language ... %20buffer.
My GPIB program (I don't have the source code) explicitly mentions this as the way to allow other programs monitoring the file to pick up the data in a timely manner. Also, you don't lose any data should the program writing the file crash.
Thanks,
Randall
-
- Posts: 3
- Joined: Wed Jun 24, 2020 12:37 am
Yes, a periodic
message.StopLogging();
message.StartLogging();
does the trick.
message.StopLogging();
message.StartLogging();
does the trick.