Download a file from controller using HMI
Hello,
I have several AXC F 2152 with different parameters, I have managed to save the parameters in a CSV using the PBCL_ParamBackupMngt function block. Now I'd like to download the CSV from the controller to my laptop pressing an HMI button. Is this possible?
Next step is to upload a CSV file with the paremeter list from my laptop to the controller with another HMI button, is this also possible?
Thanks,
Comments
Hello!
1) I did'n test it in prod, but if you store copy of your backup file in
"/opt/plcnext/projects/PCWE/Services/Ehmi/ehmi/param.csv" (one of points where plcnext store support files configured in project). Than you can access your param.csv file via button on hmi without reconf of nginx. Be aware, file in this folder will be deleted, if you download new project.
This is one of variants.
2) Upload file to server seems to be impossible in unsafe manner. You have to use scp client and verification to deal with this task. If you dig into nginx configuration, perhaps, it can be solved in some approach. But native ehmi dynamic actions does not have upload functional.
Best regards
Hello,
by default the ehmi does not support File upload and download.
Downloads can be achieved like Oleksandr suggested or by adding a nginx configuration for file upload.
See this for reference:
Forum - PLCnext Community (plcnext-community.net)
Then this path can be added in the command URL used via eHMI Button to get a download.
I dont think uploading the parameters through this option is to be recommended as this is not password protected.
I will forward this request to the eHMI product management.
best regards,
Oliver
Appreciate your help Oliver and Oleksand.
To avoid file deletion when download new project I have edited nginx.conf, as Oliver suggested. I also add a line to automatically download the file. I added this to the "nginx.conf":
Then I added the dynamic to the button:
Please let me know if you create the function to load parameters from HMI.
Regards,