BoneSkier Posted December 2, 2011 Posted December 2, 2011 How can you start a MONO application running using the SYSTEM command. I have tried to do something like this from the IDE terminal window which is nearly verbatim to the example given in the Power PMAC help on the "SYSTEM" command: system "/var/ftp/usrflash/Project/C\ Language/Background\ Programs/mono MotionMonitor.exe -L1" It says "no such file or directory".
Omron Forums Support Posted December 2, 2011 Posted December 2, 2011 BoneSkier, Is the "mono" program something you compiled? If so, the syntax should appear as follows: system "/var/ftp/usrflash/Project/C\ Language/Background\ Programs/mono.out" Then you can put whatever arguments you want to the right of mono.out.
BoneSkier Posted December 2, 2011 Author Posted December 2, 2011 No, my program is MotionMonitor.exe with a command line argument of "-L1". This is a VB.NET program that I am wanting to run on the Power PMAC. I also don't want the SYSTEM command to wait for my command to complete. The "mono" part is used to tell LINUX to run my VB.NET program using MONO.
BoneSkier Posted December 2, 2011 Author Posted December 2, 2011 Further, here is what I use to run my program on the command line from TELNET: root@192.168.0.200:/var/ftp/usrflash/Project/C Language/Background Programs# mono MotionManager.exe -L1
Sina.Sattari Posted December 2, 2011 Posted December 2, 2011 BoneSkier, Assume your .NET executable file is located in: /var/ftp/gather/testapp.exe You have to use the system command in following syntax: system "mono /var/ftp/gather/testapp.exe" This way you're telling the mono application to execute the testapp.exe with proper path.
BoneSkier Posted December 2, 2011 Author Posted December 2, 2011 OK --- that is probably closer to the solution, but it still doesn't work from the IDE terminal: My program is MotionManager.exe It is located in this directory: /var/ftp/usrflash/Project/C Language/Background Programs So, I tried this, but still got no such file or directory: system "mono /var/ftp/usrflash/Project/C\ Language/Background\ Programs/MotionManager.exe -L1" I was also able to successfully run this program from the /var directory with the following command at the command line in a TELNET session: mono /var/ftp/usrflash/Project/C\ Language/Background\ Programs/MotionManager.exe -L1
BoneSkier Posted December 2, 2011 Author Posted December 2, 2011 I just removed the quotes, and it now worked from the IDE Terminal: system mono /var/ftp/usrflash/Project/C\ Language/Background\ Programs/MotionManager.exe -L1
BoneSkier Posted December 2, 2011 Author Posted December 2, 2011 So, now that it runs, how do I get the SYSTEM command to return while my MotionManager program continues to run. Right now if I issue the command using GetResponse, I get a status of "2", which is Timeout. So, right now GetResponse must be waiting for the "system" command to return.
Sina.Sattari Posted December 2, 2011 Posted December 2, 2011 BoneSkier, Use the following command: system mono /var/ftp/usrflash/Project/C\ Language/Background\ Programs/MotionManager.exe -L1 & This will run your program in background and your gpascii channel stays available for you.
BoneSkier Posted December 2, 2011 Author Posted December 2, 2011 I tried that, but GetResponse still returns with TIMEOUT.
Sina.Sattari Posted December 6, 2011 Posted December 6, 2011 If you want to run a program in background without getting the responses back in terminal and let the program run in the background then use the "cx system" command: cx system "/usr/local/bin/mono /var/ftp/gather/TestApplication.exe"
BoneSkier Posted December 8, 2011 Author Posted December 8, 2011 This was the winning combination (from Sina): cx system "/usr/local/bin/mono /var/ftp/usrflash/Project/C\ Language/Background\ Programs/TestApplication.exe"
BoneSkier Posted January 11, 2012 Author Posted January 11, 2012 This will work: cx system "/usr/local/bin/mono /var/ftp/usrflash/Project/C\ Language/Background\ Programs/TestApplication.exe" Note that we needed the path to MONO as well as the path to the program.
Recommended Posts