Page 1 of 1

User selectable File Transfer to USB

Posted: Tue Jun 26, 2012 9:32 am
by vinit_patil
Hi,
i have stored database exported file in csv format in "\FlashDrive\Project\Project Files\"
area.
I want to transfer these files '*.csv" files to usb pen drive by using User Interface on Qterm A12 panel.
User Intrface should show all files in "\FlashDrive\Project\Project Files\"
there should be provision for user to select which file to transfer to pen drive.

Can you help me by providing sample project for the same or the control to be used for the same.

i am using iX Developer V 1.31

Thanks in advance.

Re: User selectable File Transfer to USB

Posted: Tue Jun 26, 2012 9:54 am
by mark.monroe
Is there a reason why you are not using the button to export the database file directly to the USB stick when it is pressed? To do what you want will require custom scripting. The button option is available in version 1.31.121 of iX Developer.
Snap 2012-06-26 at 10.51.16.jpg
Snap 2012-06-26 at 10.51.16.jpg (50.67 KiB) Viewed 10804 times

Re: User selectable File Transfer to USB

Posted: Tue Jul 03, 2012 4:48 am
by vinit_patil
In our application it is not recommended to keep plugging the USB pen drive to panel.
I have stored exported "CSV" databse files on A12 panel memory.
& whenever we required this data we will copy these files USB pen drive.
IS there any function to do this or i will have to do the custom scripting for this.

Re: User selectable File Transfer to USB

Posted: Tue Jul 03, 2012 7:40 am
by mark.monroe
There are no file explorer actions in iX. You will have to write your own script if you want to copy .csv files to a USB drive.

Since the database and the .csv files are on the same drive, there isn't any benefit to saving them as .csv files. If you only want to save certain date ranges or organize them in some other way you could just create a series of SQL queries and save the query results to your USB stick. You can also delete delete rows in the database using SQL as well.

I have attached an example project that shows you how to query the database and save the results to a csv file. It might be easier to do that, rather than write the code needed to copy and delete csv files on the HMI.