Rajiv Posted August 23, 2022 Share Posted August 23, 2022 I want to transfer the file PMAC to local system File is stored in /var/ftp/www. How can I transfer the file . Please guide me Quote Link to comment Share on other sites More sharing options...
teremock Posted August 23, 2022 Share Posted August 23, 2022 I think it's easy to do over SSH connect. You can try something like the following samples scp username@b:/path/to/file /path/to/destination scp -P 7121 /users/admin/downloads/* root@155.138.150.12:/home/ Quote Link to comment Share on other sites More sharing options...
Alex Anikstein Posted August 23, 2022 Share Posted August 23, 2022 scp is a great way to do it from the PMAC. If the file is already located in the /var/ftp/ directory and you want to transfer it to a computer, an even easier way may be to just go to "ftp://192.168.0.200/" into the Address Bar of File Explorer on Windows, then navigate to the file and drag to copy it to your desktop. 1 Quote Link to comment Share on other sites More sharing options...
Rajiv Posted August 25, 2022 Author Share Posted August 25, 2022 Thanks for responding. But I think my explanation was not enough to know the exact problem. Let me explain. Suppose when PMAC execute a program some data is generated like motor speed, velocity, distance etc and it is stored in PMAC memory /var/ftp/www. I want to transfer that data to my local machine that is having window OS. Automatically data should get transferred with the help of code once data is generated and for every time. waiting for valuable feedback. Quote Link to comment Share on other sites More sharing options...
Rajiv Posted August 25, 2022 Author Share Posted August 25, 2022 Hello, I am facing some other issue also . I have multiple program under Background Program. I want to execute second program under the first program. Sample Program ■open plc1 system "var/ftp/usrflash/Project/C\ Language/Background\ Programs/capp1.out" disable plc 1 close ■capp1 int main() { InitLibrary(); // ↓Here I want to execute capp2.out Command("cx system \"/var/ftp/usrflash/Project/C\\ Language/Background\\ Programs/capp2.out\""); CloseLibrary(); return 0; } ■capp2 int main() { InitLibrary(); //And in second capp2 want to execute capp3 and so on Command("cx system \"/var/ftp/usrflash/Project/C\\ Language/Background\\ Programs/capp3.out\""); CloseLibrary(); return 0; } I have tried to execute in many different ways by using system , Command etc command .But unable to execute. Quote Link to comment Share on other sites More sharing options...
Alex Anikstein Posted August 29, 2022 Share Posted August 29, 2022 Automatically sending files from the PMAC onto a Windows system may not be that simple--typically in a case like that, you would be better off with making an HMI on the Windows computer which queries the variables at some frequency and logs them. That said, the "scp" command teremock listed should work if you write to the IP Address of the Windows machine, using the username of that machine. Another option would be to try to map a section of a windows computer to your PMAC as a network drive. I'm attaching an app note which tried to do the same thing, though some users have reported that it did not work for them. It seems highly dependent on a bunch of settings for Windows that we don't fully know, but take a look at Example 4 anyways. For the second question, can you explain where it fails--does capp1 even run? I know when writing that app note, we ran into issues where we couldn't fully automate C Application execution that we intended to write to a file, as it was being blocked by the firmware. We ended up needing to introduce some new "gather" options to allow for this (Example 5 in the document). Advanced Data Gathering on Power PMAC.pdf 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.