Writing to a file and sending to USB Pen Drive

This forum contains common answers to questions and tutorials produced for the community.
mwalker

Writing to a file and sending to USB Pen Drive

Post by mwalker » Wed Sep 22, 2010 5:43 am

I cannot get a file to load from the PV750 to a USB Pen Drive in v2.1

I have successfully loaded and run the configuration "Tutorial - Error Log Complete" using v2.0.
This writes to a file called ErrorLog and appends error messages.
I have run the same example in v2.1 but do not get the file on the USB Pen Drive.
dwills
Enovation Controls Development
Enovation Controls Development
Posts: 26
Joined: Fri Jul 30, 2010 8:27 am

Re: Writing to a file and sending to USB Pen Drive

Post by dwills » Wed Sep 22, 2010 11:20 am

The attached configuration demonstrates how to create files and write them to a USB stick.

Don
ScriptFileAccessDemo.7z
Demo Script
(2 MiB) Downloaded 136 times
pbj
Posts: 10
Joined: Mon Oct 11, 2010 3:02 pm

Re: Writing to a file and sending to USB Pen Drive

Post by pbj » Wed Mar 16, 2011 1:51 pm

The example posted shows how to write strings to a file. What are the functions for reading from files? Are there APIs available for these functions? I've looked in the PV Scripting Users Guide, and I've searched the AngelScript manual as well.
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: Writing to a file and sending to USB Pen Drive

Post by ksaenz » Mon Mar 28, 2011 8:03 am

The Angelscript file object found here:
http://www.angelcode.com/angelscript/sd ... _file.html
is supported, you can use that.
You files need to be in this directory: “/fs/etfs/script”