Author Topic: reading datafile from tlserver  (Read 12596 times)

kenobe

  • Jr. Member
  • Posts: 66
  • I'm a llama!
    • View Profile
reading datafile from tlserver
« 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 ::) ::) ::)

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:reading datafile from tlserver
« Reply #1 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.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

kenobe

  • Jr. Member
  • Posts: 66
  • I'm a llama!
    • View Profile
Re:reading datafile from tlserver
« Reply #2 on: May 02, 2011, 06:27:35 PM »
appreciate your help.
could you pls tell me where can i find some examples?
Thanks

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:reading datafile from tlserver
« Reply #3 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.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

kenobe

  • Jr. Member
  • Posts: 66
  • I'm a llama!
    • View Profile
Re:reading datafile from tlserver
« Reply #4 on: May 02, 2011, 09:49:55 PM »
Thank you very much