Jump to content
OMRON Forums

Recommended Posts

Posted

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".

 

 

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

Posted

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.

Posted
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.
Posted

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

 

Posted

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.

 

 

 

Posted

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

Posted

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

Posted
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.
Posted

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.

 

 

Posted

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"

 

Posted

This was the winning combination (from Sina):

cx system "/usr/local/bin/mono /var/ftp/usrflash/Project/C\ Language/Background\ Programs/TestApplication.exe"

  • 1 month later...
Posted

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.

Guest
This topic is now closed to further replies.

×
×
  • Create New...