wbzhong Posted November 17, 2023 Posted November 17, 2023 Hi, when we run "ecat reset" in the terminal, it reports an error: error#20: illegal cmd: ecat 3 Could you give us some insights in the error? Quote
Omron Forums Support Posted November 17, 2023 Posted November 17, 2023 That error is reporting that you typed ecat "3", not ecat reset. It would seem that somewhere in the project there is a #define statement defining reset as "3", i.e. #define reset 3. I would look in Global Includes first. Or, ctrl-F to search in the project. Quote
Alex Anikstein Posted November 20, 2023 Posted November 20, 2023 To add on a tiny bit-- While it is allowed, it is generally considered bad practice to have short words like that (reset, status, etc.) as #defines or variable names. Any string which is either a command or part of a command (for instance, a variable named "AbsPos" would be considered part of Motor[x].AbsPosSf) should be avoided. A better option would be to name your parameter "ResetVar" if it is a variable or "_reset" if it is not. This way it is similar, but unique. Quote
wbzhong Posted November 24, 2023 Author Posted November 24, 2023 On 11/20/2023 at 6:25 PM, Alex Anikstein said: To add on a tiny bit-- While it is allowed, it is generally considered bad practice to have short words like that (reset, status, etc.) as #defines or variable names. Any string which is either a command or part of a command (for instance, a variable named "AbsPos" would be considered part of Motor[x].AbsPosSf) should be avoided. A better option would be to name your parameter "ResetVar" if it is a variable or "_reset" if it is not. This way it is similar, but unique. Thanks for the comments. It turned out that I named a PLC "reset", and this PLC was assigned an ID of 3 by the IDE. Quote
Omron Forums Support Posted November 28, 2023 Posted November 28, 2023 You can name the PLC something like "ResetPLC" to keep the descriptive name and avoid the short word issues. Quote
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.