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.
User selectable File Transfer to USB
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: User selectable File Transfer to USB
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.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 9
- Joined: Sat Jun 09, 2012 11:30 am
Re: User selectable File Transfer to USB
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.
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.
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: User selectable File Transfer to USB
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.
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.
- Attachments
-
- Script_Database_Export.zip
- (189.58 KiB) Downloaded 1005 times
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer