Internet PLC Forum

General => Technical support => Topic started by: kenobe on May 02, 2011, 01:13:22 AM

Title: reading datafile from tlserver
Post by: kenobe on May 02, 2011, 01:13:22 AM
HI
I am trying to read some datafile from the tlserver.
I am using t100md 888.
after issuing the command

PRINT #1 <READ datefile.txt> </>
where do i find the downloaded data? Can I specify the data locations in PLC  to store the downloaded data?
Thanks ::) ::) ::)
Title: Re:reading datafile from tlserver
Post by: support on May 02, 2011, 09:07:40 AM
The data will be sent as CR-terminated text string to the PLC's serial port. You will need to use INPUT$(1) to read the strings one at a time. So the maximum number of characters (including CR) a file is not more than 256 since that's the size of the serial buffer.  The string you read from INPUT$(1) can be stored in A$ to Z$ or converted to a number using VAL or HEXVAL if they are numeric or hex data.
Title: Re:reading datafile from tlserver
Post by: kenobe on May 02, 2011, 06:27:35 PM
appreciate your help.
could you pls tell me where can i find some examples?
Thanks
Title: Re:reading datafile from tlserver
Post by: support on May 02, 2011, 07:31:28 PM
You can look at the example of the <Read RTC[]> in the SynchronizeRTC.PC6 program (found in the samples\FileServer_Modem folder) which is similar except that instead of returning the data from a file it returns the real time clock as multiple strings.
Title: Re:reading datafile from tlserver
Post by: kenobe on May 02, 2011, 09:49:55 PM
Thank you very much