Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Creating file with custom name when I want


Otemohu Oct 24, 2017 01:13 PM

Hello,

I'm currently using a CR3000 with a RS232 connection to a spectrometer. I programmed the datalogger to retrieve the variables I need to record. The datalogger will be located in a car and I want to start acquisition from the car with a computer.

My idea is to have 2 variables: a string for the filename and another, boolean, that I control from Port/Flag panel. When I pass the boolean to "True", I want that the logging starts and data will recorded into a file on the CRD. When I pass the coolean to False", data logging is stopped and the file is closed. I will have to enter a new filename in which the new data will be stored whend the boolean will pass to "True" again.
I tried different ways but did not succed. I added for example a TableFile instruction to create a file into the CRD (CF 512Mo) but I dont know which type of boolean I can use to start or not the recording of values into the file (TableFile seems to be only based on time, time into interval insctruction...).

I don't know if it is possible. Another question, subsidiary, is to know if we can create a computer keyboard shortcut to do the job of clicking on the Booelan variable into the Port/Flag panel.

Daniel


JDavis Oct 26, 2017 04:49 PM

I believe to achieve what you want, you will need to use the file commands and make a custom file format. The instructions you would use are FileOpen, FileWrite, and FileClose. Be sure to close the file when you are done.

To do a keyboard shortcut, there is a method I can think of. Loggernet has a command line interface called Cora Script. You can create a script file that will set the variable to true. You could then map a keyboard shortcut in Windows to run the script.


Otemohu Oct 27, 2017 08:28 AM

Thank you for the quick reply. I will test.
I forgot to ask antoher question: the scanrate is set to 10 ms (100Hz). The CR3000 datalogger was unable to record data (only one string of 15 characters), without skipped scan. I increased the buffer of the scanrate to 1000 but sometimes I have some skipped scan. Maybe I need to increase the buffer again?

The question is relative to the timestamp of data passing through the buffer. Is the time stamped on data at the acquisition state or is this stage done when data is recorded on the memory so that there will have a lag between acquisition and timestamp of data? I'm not sure the question is clear, hope you will understand.

Best,


Otemohu Nov 9, 2017 01:00 PM

Up!

Log in or register to post/reply in the forum.