Author Topic: Write data to file  (Read 12695 times)

prosper

  • Newbie
  • Posts: 6
    • View Profile
Write data to file
« on: May 21, 2004, 10:34:58 AM »
I have tried the example to write data to file.
When I simulate the program it seems to works because their appeirs a pop up window with the data.
When I transfert the program to the plc and using the online monitoring to energize the custom function notting seems to happen.
On the harddisk there is no file to find with the name testWRITE txt.
Is there something I do wrong?

ps: the example to send Email works perfect



Thank's in advance.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Write data to file
« Reply #1 on: May 21, 2004, 03:30:22 PM »
Can you check for your files in this folder:

C:\TRiLOGI\TL5\FileService


(assuming you installed in the default folder "TRiLOGI" in C drive).

All files created by the TLServer based on command from the PLC are stored in the above folder only. This protects the other folder so that other files will not be affected by a request from the PLC.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

prosper

  • Newbie
  • Posts: 6
    • View Profile
Re:Write data to file
« Reply #2 on: May 22, 2004, 06:49:01 AM »
I have check the folder C:\TRiLOGI\TL5\FileService and see that FileService is empty so i think there is no writing to the harddisk.

What could I do wrong!


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Write data to file
« Reply #3 on: May 24, 2004, 03:27:14 PM »
If the email works, then there should at least be one file "Email.txt" in that folder which contains the content of email you just sent. If this file is not there then it is very strange!

Try to do a search on your harddisk for the "Email.txt" file to see if it is stored in another directory (??). Also check to see if the folder is inadvertently made to be "Read Only" which means files cannot be writtent to the folder. If you find the "Email.txt" folder then the other files must have been saved to the same folder. It could be because of the default folder provided by the short cut points to a different location? So far we haven't got similar report but will like to know if the files have indeed been saved to another folder.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

prosper

  • Newbie
  • Posts: 6
    • View Profile
Re:Write data to file
« Reply #4 on: May 25, 2004, 02:21:14 PM »
I have search true the entire harddisk but I could't find a file "Email.txt "or "TestWrite.txt"


I also check the folder FileService and it isn't mark as read only

When I look "online" to JAVA I can see when I make connection with the plc  and here I can also see when the plc sent a Email.
When I request the plc to write data to file nothing change here

After a time the last row becomes time after time Scan Inactive plc

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Write data to file
« Reply #5 on: May 25, 2004, 09:32:06 PM »
Do you actually have the PLC connected to the TLServer? Email or file write only works with the actual TLServer and the PLC, not on the simulation.

The TLServer should be running when you activate a function that writes to a file.  The PLC should be connected to the PC that runs the TLServer. Then activate an input to trigger a custom function that write a file to the PC. The best example is to try the "testFileWrite.pc5" file that resides in the folder:

  C:\TRiLOGI\TL5\usr\samples\FileService_Modem

Please transfer this file into the PLC and then trigger input #1 to write to the file.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

prosper

  • Newbie
  • Posts: 6
    • View Profile
Re:Write data to file
« Reply #6 on: May 27, 2004, 11:09:50 AM »
I have transfer the example file to the plc
When I trigger input#1 as you mention  is it still the same there is no writing to file
So I think thatnthe function write to file doesn't work on my plc because everything you mention I could do wrong don't solve the problem.

Thanks for the support and must you  jet  find any other solution please let me know

prosper

  • Newbie
  • Posts: 6
    • View Profile
Re:Write data to file
« Reply #7 on: May 27, 2004, 12:57:34 PM »
Sorry but I make a mistake
The sample to send Email that works perfect is
Email.pc5 and not the sample TestEmail.pc5
All the samples in folder" FileService-Modem"doesn't work!!
Can that help you to find the reason?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Write data to file
« Reply #8 on: May 29, 2004, 03:51:21 PM »
Is your TLServer version 1.x, 2.0 or 2.1? The File and Email services only works on TLServer version 2.0 or later. If your version is 1.x then please follow the "upgrade.htm" document in your CD-ROM to obtain the latest TRILOGI with TServer version 2.1.

In case you have more than one TRiLOGI version, then try to open the "C:\TRiLOGI\TL5" folder to locate the file "tlserver20.jar" and double-click on it to start the TLServer.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS