Memory Stick Datalogger
Hey all,
I've recently purchased the USB Memory Stick Datalogger from parallax and was confused to a couple of aspects of the product. The first is what subroutines are required for it to begin logging(IE; check disk, clear datafile, recreate datafile, etc.). The second thing is how to get the USB Datalogger to publish the data I want to store into the thumb drive.
Information:
-Datasheet: http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/MemoryStickDataloggerV1.1.pdf
-Demo Test: http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/DataloggerDemoV1.0.zip
-Command Sheet: http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/VDAPFirmwareSpec.pdf
-I have setup and ran the demo test flawlessly and was able to record and extract the information
-My purpose for the thumb drive is to log data for windspeed(variable labeled KPH), and wind direction(hall effect sensors using pins 0-7). My original plan was to include the writing to the thumb drive in the main programing so it publishes the data taken during the main routine(KPH and Direction).
Any help or direction is appreciated [noparse]:)[/noparse]
Thanks
Chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Gregory
Electronic Engineering Technician
NSCC - Pictou Campus - 2009
Contact me @ w0178285@nscc.ca
I've recently purchased the USB Memory Stick Datalogger from parallax and was confused to a couple of aspects of the product. The first is what subroutines are required for it to begin logging(IE; check disk, clear datafile, recreate datafile, etc.). The second thing is how to get the USB Datalogger to publish the data I want to store into the thumb drive.
Information:
-Datasheet: http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/MemoryStickDataloggerV1.1.pdf
-Demo Test: http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/DataloggerDemoV1.0.zip
-Command Sheet: http://www.parallax.com/Portals/0/Downloads/docs/prod/comm/VDAPFirmwareSpec.pdf
-I have setup and ran the demo test flawlessly and was able to record and extract the information
-My purpose for the thumb drive is to log data for windspeed(variable labeled KPH), and wind direction(hall effect sensors using pins 0-7). My original plan was to include the writing to the thumb drive in the main programing so it publishes the data taken during the main routine(KPH and Direction).
Any help or direction is appreciated [noparse]:)[/noparse]
Thanks
Chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Gregory
Electronic Engineering Technician
NSCC - Pictou Campus - 2009
Contact me @ w0178285@nscc.ca
Comments
What don't you understand?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Powered by enthusiasm
Now that I have everything wirtten down to a text file I plan to get some sort of conversion in there to change the direction value i have now(a numeric value) to some sort of special character saved to the thumb drive
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Gregory
Electronic Engineering Technician
NSCC - Pictou Campus - 2009
Contact me @ w0178285@nscc.ca
Ive tried to use ascii conversions, and ive tried to use special character data strings and pull them when I write, but im having no luck. Does anyone have any guidance for me or can point me in the right direction?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Gregory
Electronic Engineering Technician
NSCC - Pictou Campus - 2009
Contact me @ w0178285@nscc.ca
· SEROUT TX\CTS, Baud, [noparse][[/noparse]$07, $20, "datafile.txt", CR]·· 'Datalogger command to delete file
· GOSUB Get_Data······································· 'Purge Receive Buffer
······················································· 'Then Create File
· SEROUT TX\CTS, Baud, [noparse][[/noparse]$09, $20, "datafile.txt", CR]·· 'Datalogger command to create file
· GOSUB Get_Data······································· 'Purge Receive Buffer
· DEBUG "Open!", CR, CR, "Writing Data...", CR········· 'Debug statement annoucning writing process
· counter = counter + 1································ 'Sample Value
··· DEBUG "Sample ", DEC3 counter, " of ", DEC5 NumSamples,
········· " --> ", DEC3 windspeed, ",", DEC3 direction, CR'Display Results
··· SEROUT TX\CTS, Baud, [noparse][[/noparse]$08, $20, $00, $00, $00, $0D, CR,
········· DEC3 counter, ",", DEC3 windspeed, ",", DEC3 direction, CR, LF, CR]
··· PAUSE 500·········································· 'Write Results/Delay
··· GOSUB Get_Data··
Right now I am using this to log our directional code, but I had to set the direction to a numeric value. This is good enough for us now in the testing phase but for the final logging procedure we would like it to record at least the letter values (N, NE, E, SE. etc) beside the logged sample and wind speed value
We have tried to use ASCII values (78 for N, etc) and I also experimented with special characters but the block values showed up in the text data file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Gregory
Electronic Engineering Technician
NSCC - Pictou Campus - 2009
Contact me @ w0178285@nscc.ca
This assumes that the variable "direction" contains a value from 1 to 8 for the 8 points of the compass. I gather that from what you said about the 7 Hall effect switches and from the "Get_direction subroutine in your program. The index then is used to look up two characters, and then the STR modifier sends those two characters to the screen (or similarly to the USB drive).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com