yyterminal Posted March 3, 2022 Share Posted March 3, 2022 Hi all, Just wonder if pmc file is compatible with Linux command like echo. Quote Link to comment Share on other sites More sharing options...
Alex Anikstein Posted March 7, 2022 Share Posted March 7, 2022 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. Quote Link to comment Share on other sites More sharing options...
yyterminal Posted March 7, 2022 Author Share Posted March 7, 2022 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. 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.