OpenLog control characters

johndk

Senior Member
Hi All,

I've been working on a project that records data to openlog. Communication with OL work great, except for one thing... the control characters (ctrl Z) keep showing up when I go to command mode. I've tried all kinds of config.txt combinations for the OpenLog, but to no avail. Perhaps someone has solved this problem? Or perhaps I'm not implementing code correctly. At any rate, I'd appreciate some feedback.

In the attached code snippet you can see how I handle the command mode. And the attached a sample data file to show the results. Notice the three ctrl Z characters showing up as arrows.

Just to give you a quick overview, I maintain several different data files, each of which gets periodic additions as the program runs.

Any suggestions will be appreciated as the characters showing up are not a project killer, but mighty irritating.

John
 

Attachments

Jeremy Harris

Senior Member
I used the OpenLog in this project (which is still logging, after a couple of years or so): http://www.picaxeforum.co.uk/showthread.php?20551-Environmental-uSD-card-data-logger and there may be something in the code there that may help. It's a while ago, but I remember that there were a few quirks with the way the OpenLog responds when driven from Picaxe software serial ports. Hopefully I remembered to comment the code in that project well enough to make it readable.
 

johndk

Senior Member
Hi Jeremy,

I am familiar with your project and, in fact, used some of it's code as a model for my programming. So thank you for posting that back then. Unfortunately, it doesn't solve this particular problem. I've got a 28x2 running at 8MHz and using I2Cslow_8 in the HI2CSetup. Everything works great, except for those ctlr z characters showing up.
 

marks

Senior Member
Hi johndk,
I would try running t9600 at 16mhz and be using a 4.7k pullup on the serout pin @5v
 

Jeremy Harris

Senior Member
I think that what may be happening is that the OpenLog is echoing back characters. There is a set up option on the OpenLog (in the CONFIG.TXT file) to allow the serial port to echo characters or not. Perhaps turning echo off might fix the problem?

Here's the relevant snip from the OpenLog information on the CONFIG.TXT file settings:

Remember, on version 1.6 and above, system configuration can be done via the CONFIG.TXT file.

echo on/off: New in version 2.3. This command allows you to turn on or off echo. This command is stored in memory and can be controlled by editing the config file. By turning echo off, OpenLog will not echo typed text on the command prompt. This is helpful if OpenLog is embedded into a system where the system does not read back the echoed characters. If you are playing with OpenLog via a terminal, you probably want to leave echo on so that you can see the text you are sending to OpenLog. Note: During normal logging you will not see the characters sent to OpenLog. This is because it takes too much system resources to echo back the text that is being received.
It wasn't an issue for me as I was using a slow software serial port, which wouldn't look for received characters until the SERIN instruction was used, but a hardware serial port will see every character received in the background, so the buffer will catch the echoed CTRL-Z commands.
 

johndk

Senior Member
Thanks for the suggestions.

I did try turning 'echo' off. In fact, the posted files were generated with that option turned off. I haven't tried a higher serial rate simply because I can't imagine how that would make a difference. Nonetheless, I will give that a go just to see. As to the pullup; it seems to me if that were the cause of the error then I should have errors throughout the transmission. My problem occurs ONLY with the ctrlZ.

Just for shits and giggles I did change the control character to what I hoped would at least give me something "invisible". No such luck on that either. Same result.

John
 
Top