Shop OBEX P1 Docs P2 Docs Learn Events
RE ; Hanging when saves data continuously — Parallax Forums

RE ; Hanging when saves data continuously

MaheshMahesh Posts: 11
edited 2013-05-23 06:23 in BASIC Stamp
Dear sir/Madam,

I need to log the data continuously in pen drive using data logger.
but it is hanging when completion the data saving of 118 KB. when it it hanging it is not responding to any command.
please suggest me any delays is necessary i was tried too many different ways but i did not get any result.
kindly help me.

Thanks in advance.

Kindly Regards,
mahesh

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-22 05:53
    There is nothing magic about the datalogger and 118KB, so there are no suggestions I can make. It's impossible to predict how long it will take to write information to the pen drive because that depends on the internal buffer sizes in the datalogger and the internal buffer sizes in the pen drive itself. If there are existing files on the pen drive, that can affect the time it takes to find an available block on the pen drive to write a buffer. The datalogger shouldn't hang completely. Perhaps you're sending an invalid command to the datalogger and your microcontroller and the datalogger are getting out of sync. It's impossible to tell without more information and we really cannot help you debug your AVR program.

    If I were in your position, I would use a spare I/O pin on the AVR for a serial port to my PC for logging debug information and I would send information to the PC about the commands sent to the datalogger and log this information to a file on the PC. That would tell me exactly what was happening when the system got hung up. I would then focus on the section of code involved and make sure I had all the information on the last few commands sent to the datalogger. I think you'll find your error there. I doubt it's in the datalogger itself.

    If you can't find an error in your code, you'll have to contact Vinculum (FTDI). They have a support website. The datalogger is just a plug-in module for their Vinculum 1 chip. Parallax doesn't modify the data going back and forth to the chip. Make sure you have a recent version of the Vinculum 1 firmware. The Vinculum documentation describes how to update this with files from their website. The current version is 3.69.
  • MaheshMahesh Posts: 11
    edited 2013-05-22 22:28
    Dear Sir,

    I have one more doubt, you told me that " It's impossible to predict how long it will take to write information to the pen drive because that depends on the internal buffer sizes in the data logger and the internal buffer sizes in the pen drive itself."
    how to make reliable the saving of data with various pen drives ?

    Do we have any alternate option to overcome this problem?
    I mean soft reset.... like that
    Kindly suggest me...

    Thanks in advance...


    Best Regards,
    Mahesh
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-23 06:23
    Because the amount of time it takes for the datalogger to do its work is unpredictable, your program has to wait for the response from the datalogger. That response either indicates that the operation is successful or an error occurred. If the datalogger takes too long (times out), it could indicate a problem with the datalogger or a problem with your program. If your program can't communicate with the datalogger, you can't do a "soft reset" because the datalogger is not responding. You'd have to do a hard reset and that leaves the current file in an indeterminate state that may cause the most recent data to be unreadable and may cause problems later in attempting to write more information to the file (or to other files).

    You really need to find out why you're having problems. I suspect it's some kind of problem with your program, not the datalogger.
Sign In or Register to comment.