Jump to content
OMRON Forums

Is that possible to run Linux command in pmc file? Like echo?


yyterminal
 Share

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Somewhat. You can use Linux commands from Motion Programs or PLCs by using the "system" command, potentially in conjunction with "Ldata.SystemCmdStatus" and/or "sendallsystemcmds". If this is in relation to your other thread, though, you are better off just using the "send" command.

 

Sending Linux commands from Motion Programs/PLCs may not work exactly as you want, depending on the command. If the command is not "instantaneous" (such as if it requires waiting for some response/other action to "finish"), it may run into issues. For echo, I would not expect this to cause many problems, though.

Link to comment
Share on other sites

6 minutes ago, AAnikstein said:

Somewhat. You can use Linux commands from Motion Programs or PLCs by using the "system" command, potentially in conjunction with "Ldata.SystemCmdStatus" and/or "sendallsystemcmds". If this is in relation to your other thread, though, you are better off just using the "send" command.

 

Sending Linux commands from Motion Programs/PLCs may not work exactly as you want, depending on the command. If the command is not "instantaneous" (such as if it requires waiting for some response/other action to "finish"), it may run into issues. For echo, I would not expect this to cause many problems, though.

Thanks very muchAAnikstein for your suggestions in both threads:

In fact, I tested a C Background program that will be compiled into a .out file which could be further invoked by Linux.

This approach seems to be working in that from SSH connection, instead of entering the STDIN Open for ASCII Input, we could call that .out file to monitor status of specific variable and use C command of printf to send that message to the Terminal where could be obtained by its caller.

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...