Hello,
I am using hardware mentioned in the title. In my PLC application I log some process values and store them on the PLC.
At first I thought files will be copied from the PLC via SFTP connection, but now it turned out that there will be no connection to the machine. Logger files will have to be transferred in some other way. I thought of USB stick.
Does anybody have idea how to do this or if it’s even possible? I noticed that PLC has USB C port but my feeling is that this is only connection option to connect programming PC which has PLCnext Engineer with PLC. Or can it also be used for applications?
My next thought was USB port on panel. But I don’t know how to implement that PLC would be able to access panels USB port.
Has anybody done something like this before? I would really appreciate if someone can point me in the right direction.
Thank you very much.
Regards.
I noticed that PLC has USB C port but my feeling is that this is only connection option to connect programming PC which has PLCnext Engineer with PLC. Or can it also be used for applications?From page 9 of the user manual:
My next thought was USB port on panel. But I don’t know how to implement that PLC would be able to access panels USB port.I have asked the support team for that panel if they can suggest a way to transfer a file from a network device to a USB stick. For example, if the panel is running an FTP server, then perhaps that could be part of a solution.
Martin, thank you for your response.
Please let me know when you get the response from the support team.
Best regards
I have just received the following suggestion from the HMI support team:
The following steps should be executed in order, which should give a repeatable solution with no errors.
Open an SSH session to the PLCnext Control device, then execute the following commands in that SSH session:
SSH into the WP 4000ssh browser@[PANEL IP ADDRESS] # WP 4000 passwordbrowser # Elevate to root user to create directoriessu # Root user default passwordfoo # Making the directory to mount the USB stick tomkdir /media/usb # Mounting the first USB device plugged into the panel to the directory.mount /dev/sda /media/usb # SCP file from PLCnext to WP 4000. Does NOT work the other way around, it must be done this wayscp admin@[PLC IP ADDRESS]:/opt/plcnext/[FILEPATH HERE] /media/usb/ # Enter the PLCnext’s password to have access to the file[PLC PASSWORD] # Unmount the USB stick so it can be removed safelyumount /media/usb # Remove the directory that the USB was mounted to to prevent the possibility of duplicate files.rm -r /media/usb # Exit root user of WP 4000exit # Exit browser user of WP 4000exit NOTE: These commands do NOT work in a bash script! Bash does not allow for users to elevate permissions and execute multiple commands.
Thank you very much for your help. Currently I don’t have an option to check the proposed solution since the machine is already at the customer. But I will test it at first chance I get. I hope this will also be useful for someone else.
Best regards.