writing data to file
writing data to file
I am collecting a set of data using pulsein(). I am able to get the pulse width but would like to know if I can store it in a text file. I am using the zx-24a. Any help would be appreciated.
Re: writing data to file
There is no simple way to do so but it can be done indirectly. If you are outputting the collected data to Com1 and you are using the IDE, you can select the data that appears in the Debug window using the mouse and then copy it to the clipboard using ctrl-C. Subsequently, you can paste the clipboard data into any application that accepts text and save it. Note that the Debug window only keeps the last 100 lines by default. If you have more data than that you can increase the Debug Output Limit.abcuser wrote:I [...] would like to know if I can store [output data] in a text file.
The second alternative is to capture the output from Com1 using the ZLoad utility. The most straightforward way to to this is to redirect the output to a file:
Code: Select all
zload -m > data.txt
Code: Select all
zload -mdata.txt
A third alternative is to use one of the many terminal programs that supports data logging. I use TeraTerm but there are many of this type of "terminal emulator" program from which to choose.
- Don Kinzer
Re: writing data to file
" The second alternative is to capture the output from Com1 using the ZLoad utility. The most straightforward way to to this is to redirect the output to a file: "
where would I enter the code 'zload -m > data.txt'. I try to do it in the zload.exe using command prompt while Zbasic ide was open but it gave me the message 'Can't open COM1'.
Code: Select all
zload -m > data.txt
where would I enter the code 'zload -m > data.txt'. I try to do it in the zload.exe using command prompt while Zbasic ide was open but it gave me the message 'Can't open COM1'.
The application zload.exe is a command line utility; it must be invoked from the command line. If you don't have an icon for "Command Prompt" on your desktop, you should be able to find it on the "Accessories" sub-menu of the "Start->Programs" menu.
In order for this to work, you'll either need to exit the ZBasic IDE application or close the serial port manually. There is an entry on the Options menu for doing so.
In order for this to work, you'll either need to exit the ZBasic IDE application or close the serial port manually. There is an entry on the Options menu for doing so.
- Don Kinzer
-
- Posts: 163
- Joined: 24 March 2008, 23:33 PM
- Location: Southern California (Blue)
I'm not sure I understand the meaning of your question. All characters that are added to a queue that is associated with a serial channel as the output queue are transmitted in compliance with RS-232 framing and timing requirements. The signal levels are not RS-232 compliant unless you add the external level converter circuitry. The control flow signals (DTR, DSR, DCD, RTS, CTS) are not implemented nor is the XON-XOFF protocol.liam.zbasic wrote:Is there a RS232 compliant serial-out command?
What other aspects of the RS-232 standard are you concerned about?
Last edited by dkinzer on 02 April 2008, 19:55 PM, edited 1 time in total.
- Don Kinzer